fix(ui): section tabs above the breadcrumb, so the Ansible tab strip holds still (#5214)
CI / lint (push) Successful in 2s
CI / integration (push) Successful in 55s
CI / unit (push) Successful in 1m22s
CI / publish (push) Successful in 1m36s

The tabs were drawn in each page's content block, which base.html renders
after the breadcrumb, so on every nested Ansible page the strip moved down a
line. base.html now has a section_tabs block above the breadcrumb, and every
Ansible page fills it. A guard in test_breadcrumbs.py fails any page that calls
a tabs macro outside that block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 06:28:02 -04:00
co-authored by Claude Opus 5.5
parent c678379646
commit 955450d33f
13 changed files with 45 additions and 13 deletions
+1 -1
View File
@@ -7,9 +7,9 @@
{% from "ansible/_macros.html" import interval_words %}
{% block title %}{{ editing.name if editing else "New schedule" }} — Steward{% endblock %}
{% block breadcrumb %}{{ crumbs([("Ansible", "/ansible/"), ("Schedules", "/ansible/schedules"), (editing.name if editing else "New schedule", "")]) }}{% endblock %}
{% block section_tabs %}{{ ansible_tabs("schedules") }}{% endblock %}
{% block content %}
{% set can_edit = session.user_role in ('operator', 'admin') %}
{{ ansible_tabs("schedules") }}
{% call page_header(editing.name if editing else "New schedule") %}
{% if editing and can_edit %}
<form method="post" action="/ansible/schedules/{{ editing.id }}/run-now">{{ csrf_field() }}