From e269b111a18c8822b0c16f1567548bc598b25997 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Sat, 21 May 2022 11:20:45 -0600 Subject: List existing tags on edit post page --- srv/src/http/tpl/edit-post.html | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'srv/src/http/tpl/edit-post.html') diff --git a/srv/src/http/tpl/edit-post.html b/srv/src/http/tpl/edit-post.html index 9ccfa2a..114369a 100644 --- a/srv/src/http/tpl/edit-post.html +++ b/srv/src/http/tpl/edit-post.html @@ -8,17 +8,17 @@
- {{ if eq .Payload.ID "" }} + {{ if eq .Payload.Post.ID "" }} + value="{{ .Payload.Post.ID }}" /> {{ else }} - {{ .Payload.ID }} - + {{ .Payload.Post.ID }} + {{ end }}
@@ -29,7 +29,10 @@ name="tags" class="u-full-width" type="text" - value="{{ range $i, $tag := .Payload.Tags }}{{ if ne $i 0 }} {{ end }}{{ $tag }}{{ end }}" /> + value="{{ range $i, $tag := .Payload.Post.Tags }}{{ if ne $i 0 }} {{ end }}{{ $tag }}{{ end }}" /> +

+ Existing tags: {{ range $i, $tag := .Payload.Tags }}{{ if ne $i 0 }} {{ end }}{{ $tag }}{{ end }} +

@@ -39,7 +42,7 @@ name="series" class="u-full-width" type="text" - value="{{ .Payload.Series }}" /> + value="{{ .Payload.Post.Series }}" />
@@ -53,7 +56,7 @@ name="title" class="u-full-width" type="text" - value="{{ .Payload.Title }}" /> + value="{{ .Payload.Post.Title }}" />
@@ -63,7 +66,7 @@ name="description" class="u-full-width" type="text" - value="{{ .Payload.Description }}" /> + value="{{ .Payload.Post.Description }}" />
@@ -76,7 +79,7 @@ placeholder="Blog body" style="height: 50vh;" > - {{- .Payload.Body -}} + {{- .Payload.Post.Body -}} @@ -84,7 +87,7 @@ -- cgit v1.2.3