{% extends 'creme_core/bricks/base/paginated-table.html' %} {% load i18n creme_bricks creme_perms %} {% load and_op print_field url from creme_core_tags %} {% block brick_extra_class %}{{block.super}} emails-mails-history-brick{% endblock %} {% block brick_header_title %} {% brick_header_title title=_('{count} Email in the history') plural=_('{count} Emails in the history') empty=verbose_name icon='email' %} {% endblock %} {% block brick_header_actions %} {% if not relation_types_all_disabled %} {% with creation_perm=user|has_perm_to_create:objects_ctype link_perm=user|has_perm_to_link:object %} {% with create_linked_perm=creation_perm|and_op:link_perm %} {% brick_header_action id='add' url='emails__create_email'|url:object.id label=_('Send a new related email') enabled=create_linked_perm %} {% brick_header_action id='add' url='emails__create_email_from_template'|url:object.id label=_('Send a email (with a template)') enabled=create_linked_perm %} {% brick_header_action id='link' url='emails__link_emails'|url:object.id label=_('Link to emails') enabled=link_perm %} {% endwith %} {% endwith %} {% endif %} {% endblock %} {% block brick_before_content %} {% if relation_types_all_disabled %}