camper/web/templates/admin/legal/index.gohtml

32 lines
933 B
Plaintext
Raw Normal View History

2023-12-22 01:23:18 +00:00
<!--
SPDX-FileCopyrightText: 2023 jordi fita mas <jordi@tandem.blog>
SPDX-License-Identifier: AGPL-3.0-only
-->
{{ define "title" -}}
{{( pgettext "Legal Texts" "title" )}}
{{- end }}
{{ define "content" -}}
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/legal.legalIndex*/ -}}
<a href="/admin/legal/new">{{( pgettext "Add Legal Text" "action" )}}</a>
<h2>{{( pgettext "Legal Texts" "title" )}}</h2>
{{ if .Texts -}}
<table>
<thead>
<tr>
<th scope="col">{{( pgettext "Name" "header" )}}</th>
</tr>
</thead>
<tbody>
{{ range $text := .Texts -}}
<tr>
<td><a href="{{ .URL }}">{{ .Name }}</a></td>
</tr>
{{- end }}
</tbody>
</table>
{{ else -}}
<p>{{( gettext "No legal texts added yet." )}}</p>
{{- end }}
{{- end }}