{% extends 'creme_core/bricks/base/paginated-table.html' %} {% load i18n creme_bricks %} {% load get_value has_perm_to url from creme_core_tags %} {% block brick_extra_class %}{{block.super}} brick-selectable emails-emailsync-brick{% endblock %} {% block brick_extra_attributes %}data-crudity-backend="{{backend.get_id}}"{% endblock %} {% block brick_header_actions %} {% brick_header_action id='emailsync-delete' url='creme_core__delete_entities'|url type='delete' icon='cancel' %} {% endblock %} {% block brick_table_columns %} {% brick_table_column title=_('Status') status='primary' %} {% brick_table_column title=_('Sender(s)') %} {% brick_table_column title=_('Recipient(s)') %} {% brick_table_column title=_('Subject') %} {% brick_table_column title=_('Received on') %} {% brick_table_column title=_('Actions') status='action' colspan=5 %}{# TODO: pass rigth colspan #} {% endblock %} {% block brick_table_rows %} {% url 'creme_core__delete_entities' as delete_multi_url %} {% for mail in page.object_list %} {{MAIL_STATUS|get_value:mail.status}} {{mail.sender}} {{mail.recipient}} {{mail.subject}} {{mail.reception_date|default:'—'}} {% block mail_sync_actions %} {% brick_table_action id='redirect' url=mail.get_absolute_url label=_('See the entity') icon='view' %} {% has_perm_to delete mail as delete_perm %} {% brick_table_action id='delete' url=delete_multi_url __ids=mail.id label=_('Delete this email') enabled=delete_perm %} {% endblock %} {% endfor %} {% endblock %} {% block brick_table_empty %} {% translate 'No received email to synchronize' %} {% endblock %}