{% load i18n %} {# Quick selection of an entry type and vendor, retaining any other filters #} {# The partials depend on the current query, and are replaced whenever the table is updated (e.g. by a quick search) #}
{% partialdef type_filters inline %}
{% with selected_type=filter_form.cleaned_data.type %} {% trans "All types" %} {% for value, label in filter_form.fields.type.choices %} {% if value %} {{ label }} {% endif %} {% endfor %} {% endwith %}
{% endpartialdef %}
{% partialdef vendor_filter_params inline %}
{% for name, value in request.GET.items %} {% if name != 'vendor' and name != 'page' %} {% endif %} {% endfor %}
{% endpartialdef %}
{% partialdef clear_filters inline %}
{% if filter_form.changed_data %} {% trans "Clear filters" %} {% endif %}
{% endpartialdef %}