Files
member-console/internal/embeds/templates/partials/operator_persons.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

65 lines
2.3 KiB
HTML

{{- /* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial */ -}}
{{- /* SPDX-FileCopyrightText: 2025-2026 Christian Galo */ -}}
{{/* operator_persons.html
People directory body partial for GET /operator/persons
(operator-people-directory D6), dispatched by GetPersonsPage.
Built from the page-anatomy parts (docs/design-system.md §6).
Governed by operator-list-scale (operator_list_controls.html):
search over display name and email, true-total pagination. No status
facet -- People has no status vocabulary controls filter on.
Newest-joined first, so "who joined this week?" is page one.
Three states:
- Error: the load failed.
- Zero rows AND Nav.Filtered: the search/clear-search matched
nothing -- listNoMatch, distinct from true-empty
(empty-state-guidance).
- Zero rows AND not Nav.Filtered: the deployment has no persons at
all yet -- honest empty copy naming how a person row comes to
exist, no controls (nothing to search or clear).
*/}}
{{ template "pageHeader" .Header }}
{{ if .Error }}
<div class="alert alert-danger" role="alert">
<strong>Error:</strong> {{ .Error }}
</div>
{{ else if eq (len .Persons) 0 }}
{{ if .Nav.Filtered }}
{{ template "listControls" .Nav }}
{{ template "listNoMatch" .Nav }}
{{ else }}
{{ template "emptyState" .Empty }}
{{ end }}
{{ else }}
{{ template "listControls" .Nav }}
<div class="table-responsive">
<table class="table table-hover table-sm table-record">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Status</th>
<th>First seen</th>
</tr>
</thead>
<tbody>
{{ range .Persons }}
<tr>
<th scope="row">
<a href="/operator/persons/{{ .PersonID }}">{{ .DisplayName }}</a>
</th>
<td>
{{ .Email }}
{{ if not .EmailVerified }}<span class="ms-1">{{ template "statusBadge" .UnverifiedBadge }}</span>{{ end }}
</td>
<td>{{ template "statusBadge" .StatusBadge }}</td>
<td class="text-nowrap">{{ .JoinedAt }}</td>
</tr>
{{ end }}
</tbody>
</table>
</div>
{{ template "listPager" .Nav }}
{{ end }}