camper/web/templates/admin/campsite/option/index.gohtml

42 lines
1.4 KiB
Plaintext

<!--
SPDX-FileCopyrightText: 2023 jordi fita mas <jordi@tandem.blog>
SPDX-License-Identifier: AGPL-3.0-only
-->
{{ define "title" -}}
{{( pgettext "Campsite Type Options" "title" )}}
{{- end }}
{{ define "content" -}}
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/campsite/types.optionIndex*/ -}}
<a href="/admin/campsites/types/{{ .TypeSlug }}/options/new">{{( pgettext "Add Option" "action" )}}</a>
<h2>{{( pgettext "Campsite Type Options" "title" )}}</h2>
{{ if .Options -}}
<table>
<thead>
<tr>
<th scope="col">{{( pgettext "Name" "header" )}}</th>
<th scope="col">{{( pgettext "Translations" "header" )}}</th>
</tr>
</thead>
<tbody>
{{ range .Options -}}
<tr>
<td><a href="{{ .URL }}">{{ .Name }}</a></td>
<td>
{{ range .Translations }}
<a
{{ if .Missing }}
class="missing-translation"
{{ end }}
href="{{ .URL }}">{{ .Endonym }}</a>
{{ end }}
</td>
</tr>
{{- end }}
</tbody>
</table>
{{ else -}}
<p>{{( gettext "No campsite type options added yet." )}}</p>
{{- end }}
{{- end }}