fix(ui): section tabs above the breadcrumb, so the Ansible tab strip holds still (#5214)
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:
@@ -6,9 +6,9 @@
|
||||
{% from "ansible/_tabs.html" import ansible_tabs %}
|
||||
{% block title %}{{ group.name }} — Inventory — Steward{% endblock %}
|
||||
{% block breadcrumb %}{{ crumbs([("Ansible", "/ansible/"), ("Inventory", "/ansible/inventory/"), (group.name, "")]) }}{% endblock %}
|
||||
{% block section_tabs %}{{ ansible_tabs("inventory") }}{% endblock %}
|
||||
{% block content %}
|
||||
{% set can_edit = session.user_role in ('operator', 'admin') %}
|
||||
{{ ansible_tabs("inventory") }}
|
||||
{{ page_header(group.name) }}
|
||||
{#- The name a play uses for it (#5334): Ansible takes only letters, digits and _. #}
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
{% from "ansible/_tabs.html" import ansible_tabs %}
|
||||
{% block title %}Ansible Inventory — Steward{% endblock %}
|
||||
{% block breadcrumb %}{{ crumbs([("Ansible", "/ansible/"), ("Inventory", "")]) }}{% endblock %}
|
||||
{% block section_tabs %}{{ ansible_tabs("inventory") }}{% endblock %}
|
||||
{% block content %}
|
||||
{% set can_edit = session.user_role in ('operator', 'admin') %}
|
||||
{{ ansible_tabs("inventory") }}
|
||||
{% call page_header("Inventory") %}
|
||||
{% if can_edit %}
|
||||
<button type="button" class="btn btn-ghost" onclick="document.getElementById('add-group').showModal()">Add group</button>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
{% from "ansible/_tabs.html" import ansible_tabs %}
|
||||
{% block title %}{{ target.name }} — Inventory — Steward{% endblock %}
|
||||
{% block breadcrumb %}{{ crumbs([("Ansible", "/ansible/"), ("Inventory", "/ansible/inventory/"), (target.name, "")]) }}{% endblock %}
|
||||
{% block section_tabs %}{{ ansible_tabs("inventory") }}{% endblock %}
|
||||
{% block content %}
|
||||
{% set can_edit = session.user_role in ('operator', 'admin') %}
|
||||
{{ ansible_tabs("inventory") }}
|
||||
{{ page_header(target.name) }}
|
||||
|
||||
<p class="page-verdict">
|
||||
|
||||
Reference in New Issue
Block a user