{% extends 'creme_core/bricks/base/paginated-table.html' %} {% load i18n creme_bricks creme_perms creme_widgets %} {% load 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 %} {% brick_header_action id='add' url='creme_config__create_rtype'|url label=_('New custom type') enabled=user|has_perm_to_admin:'creme_core' %} {% 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 %} {% with admin_perm=user|has_perm_to_admin:'creme_core' delete_url='creme_config__delete_rtype'|url %} {% for relation_type in page.object_list %} {% with sym_type=relation_type.symmetric_type %}