Files
member-console/internal/embeds/templates/partials/ui_empty_state.html
T
cgalo5758 fe19ee415c Add CLA and SPDX headers, fix docs
- Pin Dockerfile to Go 1.23 to match go.mod
- Record README front-door audit findings
2026-09-07 21:32:14 -05:00

27 lines
1.3 KiB
HTML

{{- /* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial */ -}}
{{- /* SPDX-FileCopyrightText: 2025-2026 Christian Galo */ -}}
{{/* Page anatomy: the empty state (docs/design-system.md §6; spec
page-anatomy "One empty-state idiom"; branches and copy per
empty-state-guidance). Pipeline: server.EmptyStateParams, computed in
Go so the branch is never guessed in a template. The only template
that renders an empty collection: a warning alert naming the missing
prerequisite when Blocked, otherwise centered muted text with an
optional note and an optional outline action. No borders, no boxes, no
bare "No X found." Parsed into every set by web.ParseUIPartials; the
searched-to-nothing state is the list scaffold's listNoMatch. */}}
{{ define "emptyState" }}
{{ if .Blocked }}
<div class="alert alert-warning" role="alert">
<p class="mb-2">{{ .BlockerCopy }}</p>
<a href="{{ .PrerequisiteURL }}" class="btn btn-outline-secondary btn-sm">{{ .PrerequisiteLabel }}</a>
</div>
{{ else }}
<div class="text-center py-4">
<p class="text-muted mb-2">{{ .Headline }}</p>
{{ if .Note }}<p class="text-muted small mb-2">{{ .Note }}</p>{{ end }}
{{ if .ActionURL }}<a href="{{ .ActionURL }}" class="btn btn-outline-secondary btn-sm">{{ .ActionLabel }}</a>{{ end }}
</div>
{{ end }}
{{ end }}