{% import 'macro/form.html' as form %} {# Filter bar for /parts and /parts/problem. Both pages carry the same seven filters, so there is one template rather than two that drift apart. Every dropdown gets the = / != toggle, so "everything except X" works the same way it does on the sets page. #}
{% if owners | length %}
Owner {{ form.filter_toggle('filter-owner') }}
{% endif %} {# ponytail: colour has no != toggle. "Everything except red" is not a thing people ask for, and it would need its own branch in the query. Add both if it comes up. #} {% if colors | length %}
Color
{% endif %} {% if themes | length %}
Theme {{ form.filter_toggle('filter-theme') }}
{% endif %} {% if years | length %}
Year {{ form.filter_toggle('filter-year') }}
{% endif %} {% if storages | length %}
Storage {{ form.filter_toggle('filter-storage') }}
{% endif %} {% if tags | length %}
Tag {{ form.filter_toggle('filter-tag') }}
{% endif %} {% if statuses | length %}
Status {{ form.filter_toggle('filter-status') }}
{% endif %}