{% extends 'creme_core/bricks/base/paginated-table.html' %} {% load i18n creme_bricks creme_ctype %} {% load has_perm_to url from creme_core_tags %} {% block brick_extra_class %}{{block.super}} commercial-segments-info-brick{% endblock %} {% block brick_header_title %} {% brick_header_title title=_('{count} Market segment') plural=_('{count} Market segments') empty=_('Market segments') %} {% endblock %} {% block brick_header_actions %} {% has_perm_to change object as action_allowed %} {% brick_header_action id='add' url='commercial__create_segment_desc'|url:object.id label=_('New segment') enabled=action_allowed %} {% brick_header_action id='link' url='commercial__link_segment'|url:object.id label=_('Add existing segments') enabled=action_allowed %} {% endblock %} {% block brick_table_columns %} {% brick_table_column title=_('Name') status='primary nowrap' %} {% brick_table_column title=_('Product') %} {% brick_table_column title=_('Place') %} {% brick_table_column title=_('Price') %} {% brick_table_column title=_('Promotion') %} {% brick_table_column title=_('Actions') status='action' colspan=2 %} {% endblock %} {% block brick_table_rows %} {% has_perm_to change object as action_allowed %} {% ctype_for_model page.object_list.0 as segment_desc_ctype %} {% url 'creme_core__delete_related_to_entity' segment_desc_ctype.id as delete_url %} {% for segmentinfo in page.object_list %}