{% extends 'creme_core/bricks/base/paginated-table.html' %} {% load i18n creme_bricks reports_tags creme_widgets %} {% load jsondata has_perm_to jsonify url from creme_core_tags %} {% block brick_extra_class %}{{block.super}} reports-graphs-brick{% endblock %} {% block brick_header_title %} {% translate 'Graphs' context 'reports-graphs' as empty_label %} {% brick_header_title title=_('{count} Graph') plural=_('{count} Graphs') empty=empty_label icon='graph' %} {% endblock %} {% block brick_header_actions %} {% has_perm_to change object.report as has_perm %} {% brick_header_action id='add' url='reports__create_graph'|url:object.id label=_('Create a new graph') enabled=has_perm %} {% endblock %} {% block brick_table_columns %} {% brick_table_column title=_('X axis (field)') %} {% brick_table_column title=_('X axis (grouping)') %} {% brick_table_column title=_('Y axis (type)') %} {% brick_table_column title=_('Y axis (field)') %} {% brick_table_column title=_('Actions') status='action' colspan=2 %} {% endblock %} {% block brick_table_rows %} {% has_perm_to admin 'reports' as admin_perm %} {% for row in rows %} {% with hand=row.graph.hand graph=row.graph %}