- Restructure operator sidebar into a flat task list with indented children; fold plan topology into plan ladders - Expand member catalog non-plan section to all published non-tier products; require recurring Stripe-mapped prices for purchase - Add operator domains placements and terminal-claims ledger; redirect /domains to the FedWiki Sites Domains anchor - Apply canonical vocabulary and chrome/form conventions; migrate seeded FedWiki Sites display name
43 lines
2.3 KiB
HTML
43 lines
2.3 KiB
HTML
<!-- Shared empty-state define for operator list/creation surfaces
|
|
(ux-first-run 3.1). Every caller passes an EmptyStateParams value
|
|
(internal/server/operator_products.go) so the branch is computed in Go,
|
|
not guessed in the template.
|
|
|
|
Filename note: this lives in templates/partials/ but is NOT parsed by
|
|
the generic "*.html" glob some other packages use -- the operator
|
|
template set (NewOperatorPartialsHandler, and every operator render
|
|
test) parses this directory with the pattern "operator_*.html". A file
|
|
named "empty_state.html" would silently never be parsed into that set.
|
|
Hence the "operator_" prefix here, matching the same convention
|
|
member_*.html and workspace_*.html already follow for their own sets.
|
|
|
|
Renders one of two shapes:
|
|
- Blocked: a prerequisite is missing. Named in plain language, with
|
|
a link to the operator surface that creates it. Styled as a
|
|
warning alert (matches operator_plan_topology.html's structural-
|
|
issues banner) so it reads as distinct from a plain empty list.
|
|
- Not blocked: prerequisites are satisfied; nothing has been created
|
|
yet. States that plainly, adds an optional dependency note, and
|
|
(when the caller supplies one) presents a quick link to the
|
|
screen's own creation form. Styled like the existing text-center
|
|
empty rows. The link is btn-outline-primary, not filled: every
|
|
caller also renders that form's own submit button elsewhere on the
|
|
same screen, and chrome-conventions 7.2 allows at most one filled
|
|
.btn-primary per screen -- the form's Create/Add submit keeps it.
|
|
|
|
Neither branch is a bare "No X found." -- spec ux-first-run. -->
|
|
{{ 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-primary btn-sm">{{ .ActionLabel }}</a>{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|