{% extends 'creme_core/bricks/base/paginated-table.html' %} {% load i18n creme_widgets creme_bricks %} {% load has_perm_to uca_sort url from creme_core_tags %} {% block brick_extra_class %}{{block.super}} creme_config-relation-types-brick{% endblock %} {% block brick_header_title %} {% if custom %} {% brick_header_title title=_('{count} Custom type of relation') plural=_('{count} Custom types of relation') empty=verbose_name icon='relations' %} {% else %} {% brick_header_title title=_('{count} Standard type of relation') plural=_('{count} Standard types of relation') empty=verbose_name icon='relations' %} {% endif %} {% endblock %} {% block brick_header_actions %} {% if custom %} {% has_perm_to admin 'creme_core' as admin_perm %} {% brick_header_action id='add' url='creme_config__create_rtype'|url label=_('New custom type') enabled=admin_perm %} {% endif %} {% endblock %} {% block brick_table_columns %} {% brick_table_column title=_('Subject(s)') class='relation-subject' colspan=4 %} {% brick_table_column title=_('Predicate') class='relation-predicate' status='nowrap' %} {% brick_table_column title=_('Object(s)') class='relation-object' colspan=4 %} {% if custom %} {% brick_table_column title=_('Actions') status='action' colspan=3 %} {% else %} {% brick_table_column title=_('Actions') status='action' colspan=1 %} {% endif %} {% endblock %} {% block brick_table_rows %} {% has_perm_to admin 'creme_core' as admin_perm %}{% url 'creme_config__delete_rtype' as delete_url %} {% for relation_type in page.object_list %} {% with sym_type=relation_type.symmetric_type %}