{% extends 'creme_core/bricks/base/paginated-table.html' %} {% load i18n creme_widgets creme_bricks %} {% load and_op has_perm_to url from creme_core_tags %} {% block brick_extra_class %}{{block.super}} activities-subjects-brick{% endblock %} {% block brick_header_title %} {% brick_header_title title=_('{count} Subject') plural=_('{count} Subjects') empty=verbose_name %} {% endblock %} {% block brick_header_actions %} {% has_perm_to link object as activity_link_perm %} {% brick_header_action id='link' url='activities__add_subjects'|url:object.id label=_('Add entities') enabled=activity_link_perm %} {% endblock %} {% block brick_table_head %}{% endblock %} {% block brick_table_rows %} {% has_perm_to unlink object as activity_unlink_perm %}{% url 'activities__remove_subject' as rm_subject_url %} {% for relation in page.object_list %}{% with subject=relation.real_object %}