{# Caller may set toolbar_hx_target (e.g. "#portfolio-body") to enable HTMX-driven swaps. When absent, the toolbar falls back to a plain GET form whose period/account changes do a full page reload (preserving the prior behavior on pages like /positions that have no body fragment endpoint). #} {% if toolbar_hx_target %}
{% include "_spinner.html" %} {% else %} {% endif %}
{% import "_account_multi_select.html" as macros_acc %}
{{ macros_acc.account_multi_select(accounts_available, selected_accounts) }}
{# Edit layout / Done / Reset controls — client-side Alpine; no form submission. Sized to match the Period / Account selects on the same row (px-2 py-1 text-[12px]) so the right end of the toolbar doesn't tower over the left. #} {# Freshness chip — absorbs the data-source disclaimer in its tooltip. #} {# Overflow menu — admin-grade actions live behind a kebab to keep the primary toolbar focused on Period/Account + freshness. Pattern mirrors _row_actions.html. #}