{% extends 'creme_core/bricks/base/paginated-table.html' %} {% load i18n creme_bricks creme_perms creme_widgets %} {% load has_attr uca_sort url verbose_models from creme_core_tags %} {% block brick_extra_class %}{{block.super}} creme_config-instances-bricks-brick{% endblock %} {% block brick_header_title %} {% brick_header_title title=_("{count} Instance's block created") plural=_("{count} Instances' blocks created") empty=verbose_name icon='config' %} {% endblock %} {% block brick_before_content %}
{% translate 'This kind of block is created by specific apps (like «Reports») & can be placed on detailed views or home.' %}
{% endblock %} {% block brick_table_columns %} {% brick_table_column title=_('Name') status='primary nowrap' class='instancebrick-config-name' %} {% brick_table_column title=_('Can be displayed on') %} {% brick_table_column title=_('Errors') class='instancebrick-config-errors' %} {% brick_table_column title=_('Action') status='action' %} {% endblock %} {% block brick_table_rows %} {% with admin_perm=user|has_perm_to_admin:'creme_core' delete_url='creme_config__delete_instance_brick'|url %} {% for brick_type in page.object_list %} {% with brick=brick_type.brick %} {{brick_type}} {% for error in brick.errors %} {% if not forloop.first %}, {% endif %} {{error}} {% empty %}— {% endfor %} {% brick_table_action id='delete' url=delete_url __id=brick_type.id label=_('Delete this type of block') enabled=admin_perm %} {% endwith %} {% endfor %} {% endwith %} {% endblock %} {% block brick_table_empty %} {% translate 'No type of instance block created for the moment' %} {% endblock %}