{% extends "page_view.html" %} {% load i18n static crispy_forms_tags mvp %} {% block title %} {{ page.title }} {% if page_obj and page_obj.paginator.num_pages > 1 %} {% blocktrans with number=page_obj.number total=page_obj.paginator.num_pages %}(page {{ number }} of {{ total }}){% endblocktrans %} {% endif %} {% endblock title %} {% block page.title %} {# The page's actions are in the toolbar below, so the title has none, whatever its layout. #} {% block page.eyebrow %}{{ page.title_args.eyebrow }}{% endblock page.eyebrow %} {% block page.heading %}{{ page.title_args.title }}{% endblock page.heading %} {% block page.lead %}{{ page.title_args.lead }}{% endblock page.lead %} {% block page.info %} {% endblock page.info %} {% endblock page.title %} {% block page.side %} {# The filterset fields the toolbar does not draw. They join the toolbar's form through the form #} {# attribute their widgets carry; the panel draws nothing when there are none. #} {% endblock page.side %} {% block page.content %} {# Blocks: page.toolbar (page.filters, page.controls, page.actions), page.refinements (page.summary), #} {# page.results (page.empty), page.pagination. #} {# Each control carries its own swap, not this region; the panel is refreshed out of band (docs/adr/0034-what-sits-beside-the-list-region-is-refreshed-out-of-band.md). #}
{% block page.toolbar %} {# The form is display: contents. The panel button and Add sit outside it, so Add's create #} {# dialog is never inside the filter form. A view with no filterset draws no form. #} {% block page.filters %} {% if filter %}
{# Enter in a text field submits only through a submit button, and some forms have none. #} {% for field in toolbar_fields %} {% endfor %} {% endif %} {% endblock page.filters %}
{% block page.controls %} {% if toolbar_sort %}{% endif %} {% if panel_fields %} {% endif %} {% block page.actions %} {% for action in page.title_args.actions %}{% endfor %} {% endblock page.actions %} {% endblock page.controls %}
{% endblock page.toolbar %} {% block page.refinements %} {% if result_count or refinements %} {# The result count leads the row of applied filters, directly above the results it counts. #}
{% block page.summary %} {% endblock page.summary %} {% if sort_label %}

{% blocktrans with order=sort_label %}Sorted by {{ order }}{% endblocktrans %}

{% endif %}
{% endif %} {% endblock page.refinements %} {% block page.results %} {% block page.empty %} {% endblock page.empty %} {% endblock page.results %}
{% block page.pagination %} {% if page_obj %} {% endif %} {% endblock page.pagination %}
{% endblock page.content %} {% block extra_js %} {{ block.super }} {% if filter %}{{ filter.form.media }}{% endif %} {% endblock extra_js %}