{% extends 'creme_core/bricks/base/paginated-table.html' %} {% load i18n creme_bricks %} {% load print_field url from creme_core_tags %} {% block brick_extra_class %}{{block.super}} creme_core-notifications-brick{% endblock %} {% block brick_header_title %} {% brick_header_title title=_('{count} Notification') plural=_('{count} Notifications') empty=verbose_name %} {% endblock %} {% block brick_table_columns %} {% brick_table_column_for_field ctype=objects_ctype field='created' status='primary' %} {% brick_table_column title=_('Subject') %} {% brick_table_column title=_('Body') %} {% brick_table_column_for_field ctype=objects_ctype field='channel'%} {% brick_table_column_for_field ctype=objects_ctype field='level'%} {% brick_table_column title=_('Actions') status='action' %} {% endblock %} {% block brick_table_rows %} {% with discard_url='creme_core__discard_notification'|url %} {% for notif in page.object_list %} {% print_field object=notif field='created' %} {{notif.content_subject}} {{notif.content_body}} {{notif.channel}} {{notif.get_level_display}} {% brick_table_action id='delete' url=discard_url __id=notif.id label=_('Discard this notification') %} {% endfor %} {% endwith %} {% endblock %} {% block brick_table_empty %} {% translate 'No notification for the moment' %} {% endblock %}