{%- set total_text -%} {%- set number = "{:,}".format(page.total) if page.total is not none else "" -%} {%- if page.at_least %}{{ _("more than {count}", count=number) }} {%- elif page.estimated %}{{ _("about {count}", count=number) }} {%- else %}{{ number }}{% endif -%} {%- endset -%}
{{ csrf_input | safe if csrf_input }} {% if actions %}
{{ _('selected') }} {% if page.total is not none %} {{ _("All {count} matching rows are selected.", count=total_text) }} {% endif %} {% for item in actions %} {% if item.needs_dialog %} {% else %} {% endif %} {% endfor %}
{% endif %}
{% if actions %} {% endif %} {% for path in columns %} {% set state = sort_state(request, path) %} {% endfor %} {% for row in page %} {% set key = view.identity_of(row) %} {% if actions %} {% endif %} {% for path in columns %} {% set widget = view.field_for(path).widget %} {% set text = view.display(row, path) %} {% endfor %} {% else %} {% endfor %}
{{ view.label_plural }}
{{ view.label_for(path) }} {% if state == "asc" %}{% endif %} {% if state == "desc" %}{% endif %}
{% if loop.first %} {{ text or view.title_of(row) }} {% elif widget == "image" and text %} {% set stored = view.value_at(row, path) %} {{ text }} {% elif widget == "file" and text %} {{ text }} {% elif widget == "select" and text %} {{ text }} {% elif widget == "checkbox" and text %} {{ text }} {% else %} {{ text }} {% endif %} {{ _('Edit') }}
{{ _("No {things} to show.", things=view.label_plural|lower) }}
{#- 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 %}
{% 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.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 %}