{% load vantage vantage_list i18n %}{% comment %} The filter rail. A plain GET form, submitted by a button: no JavaScript is involved and none is required, so the page filters with scripting off and every state it can reach is a URL that can be bookmarked, shared or opened in a second tab. Search and sort ride along as hidden inputs — a form submission replaces the whole query string, so anything not restated here would be silently dropped, which is the classic "filtering cleared my search" bug. `page` is deliberately *not* carried: changing the predicate invalidates which page you were on. Counts are opt-in (`?_facets=1`) because they cost an aggregate per render. The rail works identically without them; they are a refinement, not the feature. {% endcomment %} {% facets_on as facets %}
{% icon "filter" %} {% translate "Filters" %} {% if has_active_filters %}{% translate "On" %}{% endif %}
{% if facets %} {% translate "Hide counts" %} {% else %} {% translate "Show counts" %} {% endif %} {% if has_active_filters %} {% translate "Clear all filters" %} {% endif %}
{% if query %}{% endif %} {% if sort %} {% endif %} {% if facets %}{% endif %} {% for filt in filters %}
{{ filt.label }} {% if filt.low_parameter %} {# A continuous range has no options to tick and nothing to count. #}
{% else %} {% with choices=filt.choices %} {% if choices %}
{% if not filt.multi %} {# Without an "Any", a radio group is a one-way door. #} {% endif %} {% for choice in choices %} {% endfor %}
{% else %}

{% translate "Too many values to list here." %}

{% endif %} {% endwith %} {% endif %}
{% endfor %}