Files
2026-08-14 20:35:37 +02:00

27 lines
1.4 KiB
HTML

{#
The section switcher shared by the three permission pages. Every one of them
carries a `page.tabs` (crate::pages::permissions::common::state::Tabs), which
says which section is open and which the signed-in role may open at all.
The three are deliberately separate pages: making a role, handing it to
someone, and deciding what it may do are three different decisions, and doing
them on one screen was what made the old page hard to read.
#}
<nav class="tabs" aria-label="{{ nav.tr("perm-tabs-aria") }}">
{% if page.tabs.can_manage_roles %}
<a href="/permissions/roles" class="tab {% if page.tabs.is("roles") %}selected{% endif %}" {% if page.tabs.is("roles") %}aria-current="page"{% endif %}>
<span>{{ nav.tr("perm-tab-roles") }}</span><small>{{ nav.tr("perm-tab-roles-sub") }}</small>
</a>
{% endif %}
{% if page.tabs.can_manage_users %}
<a href="/permissions/users" class="tab {% if page.tabs.is("users") %}selected{% endif %}" {% if page.tabs.is("users") %}aria-current="page"{% endif %}>
<span>{{ nav.tr("perm-tab-people") }}</span><small>{{ nav.tr("perm-tab-people-sub") }}</small>
</a>
{% endif %}
{% if page.tabs.can_manage_roles %}
<a href="/permissions/grants" class="tab {% if page.tabs.is("grants") %}selected{% endif %}" {% if page.tabs.is("grants") %}aria-current="page"{% endif %}>
<span>{{ nav.tr("perm-tab-access") }}</span><small>{{ nav.tr("perm-tab-access-sub") }}</small>
</a>
{% endif %}
</nav>