{# Filterable table component — no Alpine, no datatable.js #} {# All state managed by dz.js initTable() via data-dz-table #} {% if table %}
{# Header row: title + actions #}

{{ table.title }}

{# Column visibility toggle #} {% if table.columns | length > 3 %}
{% endif %} {% if table.create_url %} + New {{ table.entity_name }} {% endif %}
{# Search bar #} {% if table.search_enabled %} {% with endpoint=table.api_endpoint, target='#' + (table.table_id or 'dt-table') + '-body' %} {% include 'fragments/search_input.html' with context %} {% endwith %} {% endif %} {# Filter bar #} {% set has_filters = table.columns | selectattr('filterable') | list | length > 0 %} {% if has_filters %} {% include 'fragments/filter_bar.html' with context %} {% endif %} {# Bulk actions toolbar #} {% if table.bulk_actions %} {% with entity_name=table.entity_name, actions_endpoint=table.api_endpoint %} {% include 'fragments/bulk_actions.html' %} {% endwith %} {% endif %} {# Loading indicator #}
{# Table #}
{% if table.bulk_actions %} {% endif %} {% for col in table.columns %} {% endfor %} {% include 'fragments/table_rows.html' %}
{{ col.label }} {% if col.sortable %} {% endif %}
{# Pagination #} {% include 'fragments/table_pagination.html' %} {# Slide-over panel for detail views #} {% if table.slide_over %} {% include 'components/alpine/slide_over.html' %} {% endif %}
{% endif %}