{{/* operator_list_controls.html Shared controls for governed operator lists (operator-list-scale). Defines, all taking a server.ListNav: listSearch — the search form alone. Input names come from the nav's QParam (parameter prefix applied) so several embedded lists can share one URL; sibling-list state (nav.ExtraInputs) rides along as hidden inputs because a GET form replaces the whole query string. listControls — listSearch + optional facet pills, rendered above the table (the standalone-page layout). Facet pills are links (one click to set, "All" to clear), the active pill marked. listTabs — the nav-tabs rendering of FacetOptions, for embedded lists whose facet is a small set of modes (e.g. the grants ledger's Active/History). Unlike the pills there is no synthetic "All": an option with Value "" IS the default mode, so give it a real label. Rendered inside a .card-header (card-header-tabs). listPager — "Showing X–Y of N", the page-size picker when the nav offers options, and Previous/Next, rendered below the table. The true total comes from the paged query's count(*) OVER() (design D2). listNoMatch — the searched-or-filtered-to-nothing state, distinct from the list's true-empty state (which empty-state-guidance owns): names the term, links back to the bare list. When nav.Target is set (embedded lists), every control issues a scoped htmx request — hx-get with hx-target/hx-select on the panel's selector, outerHTML swap, URL pushed — so only that panel re-renders and the page never scrolls (scroll-into-view is opt-in in htmx; a boosted full-page navigation is what jumps to the top). The plain href/action stays as the no-JS fallback. */}} {{ define "listSearch" }} {{ end }} {{ define "listControls" }}
{{ template "listSearch" . }} {{ if .FacetOptions }} {{/* The pill list may shrink and wrap: an unshrinkable list of eight status pills is wider than a phone, and a flex item wider than the viewport widens the whole page (page-anatomy H7). */}} {{ end }}
{{ end }} {{ define "listTabs" }} {{ end }} {{ define "listPager" }} {{ if gt .Total 0 }}

{{ .Showing }}

{{ if .PerPageOptions }}

Per page: {{ range .PerPageOptions }} {{ if $.PerPageActive . }}{{ . }}{{ else }}{{ . }}{{ end }} {{ end }}

{{ end }} {{ if gt .Pages 1 }} {{ end }}
{{ end }} {{ end }} {{ define "listNoMatch" }}

No rows match{{ if .Q }} "{{ .Q }}"{{ end }}{{ if .Facet }}{{ if .Q }} with{{ else }} with{{ end }} the current filter{{ end }}.

Clear search and filters

{{ end }}