{% extends 'creme_core/bricks/base/paginated-table.html' %} {% load i18n creme_bricks creme_widgets %} {% load has_perm_to url from creme_core_tags %} {% block brick_extra_class %}{{block.super}} projects-parent-tasks-brick{% endblock %} {% block brick_header_title %} {% brick_header_title title=_('{count} Parent Task') plural=_('{count} Parent Tasks') empty=_('Parent Tasks') icon='task' %} {% endblock %} {% block brick_header_actions %} {% has_perm_to change object as has_perm %} {% brick_header_action id='add' url='projects__add_parent_task'|url:object.id label=_('Add parent tasks') enabled=has_perm %} {% endblock %} {% block brick_table_columns %} {% brick_table_column title=_('Name') status='primary' %} {% brick_table_column title=_('Action') status='action' %} {% endblock %} {% block brick_table_rows %} {% has_perm_to change object as has_perm %}{% url 'projects__remove_parent_task' as remove_url %} {% for task in page.object_list %} {% widget_entity_hyperlink task user %} {% brick_table_action id='delete' url=remove_url __id=object.id __parent_id=task.id label=_('Remove this parent') icon='unlink' enabled=has_perm %} {% endfor %} {% endblock %} {% block brick_table_empty %} {% translate 'No parent task for the moment' %} {% endblock %}