{% from 'tables/macros/filter_item.html' import filter_item with context %} {% from "macros/form/attributes.html" import attributes %} {# Every id below is suffixed with table.id (unique per TableDefinition instance, see table.py) so two tables rendered on the same page — two Tables views on one resource, or a dashboard embedding render_table.html twice — never collide on a shared id. The outer .table-wrapper gives the JS module (tables-tabulator.ts) one common ancestor to scope its own lookups and its fullscreen state against. #}
{% block table_control %}
{% block table_search %} {% if table.search_fields %} {% endif %} {% endblock %} {% block table_quick_filters %} {% if table.quick_filters %}
{% for quick_filter in table.quick_filters %} {# the value kept in the URL, see _onQuickFilterChange in tables-tabulator.ts #} {% set selected = request.args.get('quick_filter_' ~ quick_filter.field ~ '-' ~ table.name, '') %} {% set select_attrs = dict(quick_filter.attrs, **{'class': ('form-select table-quick-filter ' ~ quick_filter.attrs.get('class', '')).strip()}) %} {% endfor %}
{% endif %} {% endblock %} {% block table_filters %} {% if table.show_filters %} {% snippet "tables/snippets/table_filters_modal.html", table=table %}
{% endif %} {% endblock %} {% block table_columns %} {% if table.show_columns %} {% snippet "tables/snippets/table_columns_modal.html", table=table %} {% endif %} {% endblock %} {% block table_global_filters %} {% if table.bulk_actions %} {% endif %} {% endblock %} {% block table_actions %} {% if table.table_actions %} {% endif %} {% endblock %} {% block table_exporters %} {% if table.exporters %} {% endif %} {% endblock %} {% block table_sheets %} {% if table.sheets|length > 1 %} {% endif %} {% endblock %} {% block table_refresh %} {% if table.show_refresh %} {% endif %} {% endblock %} {% block table_total_count %} {% if table.show_total_count %}
{% endif %} {% if table.show_fullscreen %} {% endif %} {% endblock %}
{% endblock table_control %} {% block table_empty_state %} {% if table.empty_state_template %}
{% snippet table.empty_state_template, table=table %}
{% endif %} {% endblock %} {% block table_container %}
{% snippet "tables/snippets/table_skeleton.html" %}
{% endblock %}