{# Plan tab — pooled targets across all accounts. KPI strip + tag strip +
sort/filter toolbar above a table of bullet-chart rows with inline tag
chips. #}
{% if plan_view is defined and plan_view and plan_view.rows %}
{% include "_positions_plan_kpi_strip.html" %}
{% if plan_view.tag_summaries %}
{% include "_positions_plan_tag_strip.html" %}
{% endif %}
{% include "_positions_plan_toolbar.html" %}
Pooled across accounts ·
{{ pagination.total_rows if (pagination is defined) else plan_view.rows|length }}
target{% if (pagination.total_rows if (pagination is defined) else plan_view.rows|length) != 1 %}s{% endif %}
{% if plan_view.selected_tag %} · filtered: {{ plan_view.selected_tag }}{% endif %}
{% if plan_view.sort_key == 'manual' %}
Drag handle
{% endif %}
Symbol
Target
Current
Gap to fill
% Filled
Last
{% for r in plan_view.rows %}
{% include "_positions_plan_row.html" %}
{% endfor %}
{# Pagination footer — shared partial. #}
{% set _qs = '&view=plan' %}
{% if selected_account %}{% set _qs = _qs + '&account=' + selected_account %}{% endif %}
{% if plan_view.selected_tag %}{% set _qs = _qs + '&tag=' + plan_view.selected_tag %}{% endif %}
{% if plan_view.sort_key and plan_view.sort_key != 'alpha' %}{% set _qs = _qs + '&sort=' + plan_view.sort_key %}{% endif %}
{% set page_base_url = '/positions' %}
{% set page_extra_qs = _qs %}
{% set page_target = '#positions-tab-content' %}
{% set page_swap = 'outerHTML' %}
{% include "_pagination_footer.html" %}
{% else %}
{% if plan_view and plan_view.selected_tag %}
No targets match the {{ plan_view.selected_tag }} filter.
{% else %}
No targets yet.
{% endif %}