{# 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 %} {# hx-push-url is intentionally NOT "true": HTMX would push the fragment URL (toolbar_hx_get), which reload-breaks the page. /portfolio/body sets a canonical HX-Push-Url header so the address bar shows the parent URL. #}
{% 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 + line-height-matched to the Period/Account selects on the same row (px-2 py-1 text-[12px] leading-[18px]) so the toolbar reads as one row of equal-height controls instead of a button towering over selects. #} {# 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. #}