From 44526b1efb9a3f7e564f807b3f5218b5e48ef75a Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Mon, 25 Sep 2023 20:10:33 +0200 Subject: [PATCH] Add the edit form for services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This one has an input to select the icon. It makes no sense to choose an icon only by name, thus a + + {{ template "error-message" . }} + + {{- end }} + {{ with .Name -}} + + {{ template "error-message" . }} + {{- end }} + {{ with .Description -}} + + {{ template "error-message" . }} + {{- end }} + + + + + +{{- end }} diff --git a/web/templates/admin/services/index.gohtml b/web/templates/admin/services/index.gohtml index 6c2d244..23d510f 100644 --- a/web/templates/admin/services/index.gohtml +++ b/web/templates/admin/services/index.gohtml @@ -46,4 +46,38 @@ {{ else -}}

{{( gettext "No slides added yet." )}}

{{- end }} + +

{{( pgettext "Services" "title" )}}

+ {{ if .Services -}} + + + + + + + + + + {{ range .Services -}} + + + + + + {{- end }} + +
{{( pgettext "Service" "header" )}}{{( pgettext "Translations" "campsite type" )}}{{( pgettext "Actions" "campsite type" )}}
{{ .Name }} + {{ range .Translations }} + {{ .Endonym }} + {{ end }} + +
+ +
+
+ {{ else -}} +

{{( gettext "No services added yet." )}}

+ {{- end }} {{- end }} diff --git a/web/templates/admin/services/l10n.gohtml b/web/templates/admin/services/l10n.gohtml new file mode 100644 index 0000000..5d9fceb --- /dev/null +++ b/web/templates/admin/services/l10n.gohtml @@ -0,0 +1,48 @@ + +{{ define "title" -}} + {{- /*gotype: dev.tandem.ws/tandem/camper/pkg/services.serviceL10nForm*/ -}} + {{printf (pgettext "Translate Service to %s" "title") .Locale.Endonym }} +{{- end }} + +{{ define "content" -}} + {{- /*gotype: dev.tandem.ws/tandem/camper/pkg/services.serviceL10nForm*/ -}} +
+

+ {{printf (pgettext "Translate Service to %s" "title") .Locale.Endonym }} +

+ {{ CSRFInput }} +
+ {{ with .Name -}} +
+ {{( pgettext "Name" "input")}} + {{( gettext "Source:" )}} {{ .Source }}
+ + {{ template "error-message" . }} +
+ {{- end }} + {{ with .Description -}} +
+ + {{( gettext "Source:" )}}
+ {{ .Source | raw }}
+ + {{ template "error-message" . }} +
+ {{- end }} +
+
+ +
+
+{{- end }} diff --git a/web/templates/public/layout.gohtml b/web/templates/public/layout.gohtml index 6e20c03..24b487a 100644 --- a/web/templates/public/layout.gohtml +++ b/web/templates/public/layout.gohtml @@ -12,6 +12,7 @@ + {{ range .LocalizedAlternates -}} {{ end }}