feat(ui): breadcrumb navigation across nested pages
CI / lint (push) Successful in 3s
CI / unit (push) Successful in 8s
CI / integration (push) Successful in 2m18s
CI / publish (push) Successful in 1m2s

Adds a breadcrumb trail to nested views for orientation. Mechanism: a
{% block breadcrumb %} slot in base.html (+ styling) and a shared crumbs()
macro in templates/_macros.html; each nested page fills the block with its
trail (root→current, last item is the current page). Pages without the block
render no bar, so top-level nav roots stay clean.

Applied to: Ansible (browse, schedules, playbook editor, run detail) +
inventory (targets/groups + detail), host_agent (fleet, host detail,
settings), hosts form, settings tabs (ansible/auth/notifications/plugins/
reports + plugin detail), dashboard (list, edit), and alerts (rule form,
maintenance + new). Dynamic labels (host/target/run/dashboard names) come
from the page context — no route changes. All 60 templates Jinja-compile.

Task #873.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-16 14:22:19 -04:00
parent 71e4724286
commit 389002fc6f
25 changed files with 78 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
{# Shared template macros. Import with: {% from "_macros.html" import crumbs %} #}
{# Breadcrumb trail. `items` is a list of (label, href) pairs, ordered root→current.
Intermediate items with a truthy href render as links; the last item (or any
item with an empty href) renders as plain current text. #}
{% macro crumbs(items) -%}
<nav class="breadcrumb" aria-label="Breadcrumb">
{%- for label, href in items -%}
{%- if loop.last -%}
<span class="breadcrumb-cur" aria-current="page">{{ label }}</span>
{%- elif href -%}
<a href="{{ href }}">{{ label }}</a><span class="breadcrumb-sep"></span>
{%- else -%}
<span>{{ label }}</span><span class="breadcrumb-sep"></span>
{%- endif -%}
{%- endfor -%}
</nav>
{%- endmacro %}