{% from "admin/components/ui/combobox.html" import combobox %} {% from "admin/components/icons.html" import icon %} {# Filter drawer: one "Filters" trigger in the toolbar plus a sheet that slides in from the right listing every declared filter. One trigger stays one trigger however many filters a ModelAdmin declares, and vertical space in a drawer is free in a way horizontal space in a toolbar is not. Each choice is a link, not a form control, so filtering works with JS off and the URLs are the real navigation. The precomputed URLs keep query-string assembly out of the template. Reset lives in the footer rather than the toolbar: it clears search *and* every filter, so it belongs with the things it clears. The open flag is mirrored onto a window global so it survives htmx's outerHTML swap of #resource-list -- applying a filter re-renders this component, and the drawer would otherwise slam shut on every click. It is read back at init, so a fresh page load still starts closed. Included, not a macro, so it shares list_content.html's ambient context (filter_controls, active_filter_count, has_active_filters, reset_url). #} {% if filter_controls %}
{% endif %}