{% load i18n %} {% comment %} Toolbar above the inline: actions, filters and (for stacked inlines, or columns without a header) sort links. Override per inline with `inline_controls_toolbar_template`. The JS moves this element under the inline's heading and relies on the data-inline-controls-* attributes. {% endcomment %} {% block toolbar %} {% if controls.has_toolbar %}
{% block toolbar_start %}{% endblock %} {% block actions %} {% if controls.bulk_actions %}
{% block action_menu %} {% endblock action_menu %} {% block action_button %} {% endblock action_button %} {% block action_selection %} {% endblock action_selection %} {% block action_status %} {% endblock action_status %}
{% endif %} {% endblock actions %} {% block filters %} {% if controls.filter_form %} {% if controls.filter_sheet %} {% comment %} inline_filter_sheet: behind a button (always, or only when the inline is narrow). A
: open or closed, it stays so when the inline is refreshed. {% endcomment %}
{% block filter_toggle %} {% translate "Filters" %} {% if controls.active_filter_count %}{{ controls.active_filter_count }}{% endif %} {% endblock filter_toggle %} {% endif %} {% if controls.filter_sheet %}
{% endif %} {% endif %} {% endblock filters %} {% block ordering %} {% if controls.ordering_columns %}
{% block ordering_label %}{% translate "Sort by:" %}{% endblock %} {% for column in controls.ordering_columns %} {% block ordering_column %} {{ column.label }} {% if column.priority %} {{ column.priority }} × {% endif %} {% endblock ordering_column %} {% endfor %}
{% endif %} {% endblock ordering %} {% block toolbar_end %}{% endblock %}
{% endif %} {% endblock toolbar %}