2023-08-14 18:18:26 +00:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: 2023 jordi fita mas <jordi@tandem.blog>
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
{{ define "title" -}}
|
|
|
|
{{( pgettext "Campsites" "title" )}}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{ define "content" -}}
|
|
|
|
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/campsite.campsiteIndex*/ -}}
|
2023-08-16 08:42:05 +00:00
|
|
|
{{ template "settings-tabs" "campsites" }}
|
2023-08-14 18:18:26 +00:00
|
|
|
<a href="/admin/campsites/new">{{( pgettext "Add Campsite" "action" )}}</a>
|
|
|
|
<h2>{{( pgettext "Campsites" "title" )}}</h2>
|
|
|
|
{{ if .Campsites -}}
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th scope="col">{{( pgettext "Label" "header" )}}</th>
|
|
|
|
<th scope="col">{{( pgettext "Type" "header" )}}</th>
|
|
|
|
<th scope="col">{{( pgettext "Active" "campsite" )}}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{ range .Campsites -}}
|
|
|
|
<tr>
|
|
|
|
<td><a href="/admin/campsites/{{ .Slug }}">{{ .Label }}</a></td>
|
|
|
|
<td>{{ .Type }}</td>
|
|
|
|
<td>{{ if .Active }}{{( gettext "Yes" )}}{{ else }}{{( gettext "No" )}}{{ end }}</td>
|
|
|
|
</tr>
|
|
|
|
{{- end }}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{{ else -}}
|
|
|
|
<p>{{( gettext "No campsites added yet." )}}</p>
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|