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

26 lines
759 B
Plaintext
Raw Permalink Normal View History

<!--
SPDX-FileCopyrightText: 2023 jordi fita mas <jordi@tandem.blog>
SPDX-License-Identifier: AGPL-3.0-only
-->
{{ define "title" -}}
{{( pgettext "Media" "title" )}}
{{- end }}
{{ define "breadcrumb" -}}
{{- end }}
{{ define "content" -}}
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/media.mediaIndex*/ -}}
<h2>{{( pgettext "Media" "title" )}}</h2>
<a href="/admin/media/upload">{{( pgettext "Upload media" "action" )}}</a>
{{ if .Media -}}
<ul class="media-grid">
{{ range .Media -}}
<li><a href="/admin/media/{{ .ID }}"><img src="{{ .Path }}" alt=""></a></li>
{{- end }}
</ul>
{{ else -}}
<p>{{( gettext "No media uploaded yet." )}}</p>
{{- end }}
{{- end }}