{% import "adminsite/_icons.html" as icons %}
{% import "adminsite/_values.html" as values %}
{% if request.headers.get("hx-request") %}
{% with oob = true %}{% include "adminsite/_records_total.html" %}{% endwith %}
{% endif %}
{#- Each dialog is its own form, so a required input in one dialog never
stops another action from submitting. On submit it copies the ticked
rows across from the table. -#}
{% for item in actions if item.needs_dialog %}
{% endfor %}
{% include "adminsite/_action_forms.html" %}
{% if page.keyset %}
{% if page.total is not none %}{{ total_text }} {{ view.label_plural|lower }}{% endif %}
{% elif page.total is not none %}
{{ _("{first} to {last} of {total}", first=page.first_position, last=page.last_position, total=total_text) }}
{% else %}
{{ _("{first} to {last}", first=page.first_position, last=page.last_position) }}
{% endif %}
{% if page_sizes %}
{% endif %}
{% if page.keyset %}
{% set previous = urls.here(page=None, after=None, before=page.previous_cursor or None) %}
{% set next = urls.here(page=None, before=None, after=page.next_cursor or None) %}
{% else %}
{% set previous = urls.here(page=page_number - 1 if page_number > 2 else None) %}
{% set next = urls.here(page=page_number + 1) %}
{% endif %}