{# A segmented control, as a macro: components/segmented.html (the Python SegmentedControl), the period navigator's kinds and the CRUD list's quick filter all render it. {% from "components/_segmented.html" import segmented %} {{ segmented([{"label": "Open", "url": "?status=open", "current": true}, ...], label=t("status")) }} * options — dicts with ``label`` (text is escaped, Markup is not), ``url`` and ``current``. * label — the group's accessible name. * target — Unpoly follows each link into that fragment, with history. * wide — the options share the whole row. * id, css_class — on the group. The current option is a link too (aria-current="page", as tabs are): it reloads the view it names, and keeps its place in the tab order. #} {% macro segmented(options, label=none, target=none, wide=false, id=none, css_class=none) -%}