{# Pagination fragment — preserves sort/filter/search state across page hops. v0.62 CSS refactor: inline Tailwind → semantic .dz-pagination* classes (components/fragments.css). Active-page tinting via .is-current modifier instead of inline `bg-[hsl(var(--primary))]`. #} {% if table and table.total > table.page_size %} {% set total_pages = (table.total + table.page_size - 1) // table.page_size %}
{# Left: selection summary or row count. #978: CSS-driven visibility via `[data-dz-bulk-count]` on the outer .dz-table wrapper (no Alpine bindings on children of the dzTable scope — see ADR-0022 + bulk_actions.html). Count text is mirrored to `[data-dz-bulk-count-target]` imperatively by dzTable's $watch. #} 0 of {{ table.total }} selected {{ table.total }} row{{ 's' if table.total != 1 else '' }} {# Right: page buttons. #984: rendered page-list is bounded — `pagination_pages(current, total)` returns at most ~9 entries (first + window-around-current + last, with `None` markers for ellipses) regardless of total page count. Pre-fix the template emitted one button per page; on entity lists with many pages the row stretched several thousand pixels past
. #}
{% for p in pagination_pages(table.page, total_pages) %} {% if p is none %} {% else %} {% endif %} {% endfor %}
{% endif %}