Files
MeshTender/internal/web/templates/org_tabs.html
T
2026-06-24 22:56:00 -04:00

15 lines
1.2 KiB
HTML

{{/* org-tabs renders the organization sub-navigation. Data: a map with Slug,
Active ("home" | "repeaters" | "members" | "config") and IsMember
(the Members tab only shows for members — it exposes personal info). Nil-safe: a
missing map renders empty links (harmless for the empty-data compose test). Links
are same-host relative so they work on both the app host (signed-in) and the root
host (anonymous). */}}
{{define "org-tabs"}}
<ul class="nav nav-tabs mb-3" role="tablist">
<li class="nav-item"><a class="nav-link{{if eq .Active "home"}} active{{end}}" href="/orgs/{{.Slug}}">{{template "icon-world" "me-1"}}Home</a></li>
{{if .IsMember}}<li class="nav-item"><a class="nav-link{{if eq .Active "members"}} active{{end}}" href="/orgs/{{.Slug}}/members">{{template "icon-users" "me-1"}}Members</a></li>{{end}}
<li class="nav-item"><a class="nav-link{{if eq .Active "repeaters"}} active{{end}}" href="/orgs/{{.Slug}}/repeaters">{{template "icon-antenna" "me-1"}}Repeaters</a></li>
{{if .ShowConfig}}<li class="nav-item"><a class="nav-link{{if eq .Active "config"}} active{{end}}" href="/orgs/{{.Slug}}/config">{{template "icon-settings" "me-1"}}Configuration</a></li>{{end}}
</ul>
{{end}}