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

32 lines
914 B
Plaintext

<!--
SPDX-FileCopyrightText: 2023 jordi fita mas <jordi@tandem.blog>
SPDX-License-Identifier: AGPL-3.0-only
-->
{{ define "title" -}}
{{( pgettext "Pages" "title" )}}
{{- end }}
{{ define "content" -}}
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/page.pageIndex*/ -}}
<a href="/admin/pages/new">{{( pgettext "Add Page" "action" )}}</a>
<h2>{{( pgettext "Pages" "title" )}}</h2>
{{ if .Pages -}}
<table>
<thead>
<tr>
<th scope="col">{{( pgettext "Title" "header" )}}</th>
</tr>
</thead>
<tbody>
{{ range .Pages -}}
<tr>
<td><a href="/admin/pages/{{ .Slug }}">{{ .Title }}</a></td>
</tr>
{{- end }}
</tbody>
</table>
{{ else -}}
<p>{{( gettext "No pages added yet." )}}</p>
{{- end }}
{{- end }}