@php /** * Phone-only "Filters" toggle for a .qm-order-filters bar. * * On phones the filter bar collapses behind this tap-to-open control to reclaim vertical space; * on tablet/desktop the toggle is hidden and every field stays visible. Pure CSS — a hidden * checkbox + :has() drive it (same pattern as the storefront sidebar), so there is no JS. * * Place it as the FIRST child of the
so the checkbox precedes the * fields (the collapse selectors target the form's direct children). * * @var string|null $id unique checkbox id — pass one only when a page renders more than one bar * @var string|null $label toggle text (default "Filters"); pass e.g. "Settings" when the same * collapse drives a non-filter strip * @var string|null $icon Font Awesome glyph on the toggle (default fa-sliders-h) */ $__fid = $id ?? 'qm-filters-open'; $__flabel = $label ?? t_raw('common.filters'); $__ficon = $icon ?? 'fa-sliders-h'; @endphp @php // Applying a filter reloads the page (GET), which would reset this toggle to closed. Keep the // panel open whenever a filter is actually applied — that state already lives in the URL, so it // is simply read here. No cookie, no storage; it collapses again only when filters are cleared. @endphp query()), ['page'])) ? ' checked' : '' }}>