summaryrefslogtreecommitdiff
path: root/srv/src/http/tpl/edit-post.html
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2022-08-18 23:07:09 -0600
committerBrian Picciano <mediocregopher@gmail.com>2022-08-18 23:07:09 -0600
commitc3135306b32e3ee18c3c412fbb2ea81b455201d5 (patch)
treef7dd21fc9e0bab9b06a713a8218e52be777f1b15 /srv/src/http/tpl/edit-post.html
parentdfa9bcb9e23b10bb28973d1d27f05e04e8638320 (diff)
drafts functionality added, needs a publish button still
Diffstat (limited to 'srv/src/http/tpl/edit-post.html')
-rw-r--r--srv/src/http/tpl/edit-post.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/srv/src/http/tpl/edit-post.html b/srv/src/http/tpl/edit-post.html
index a585b82..ea1f2c1 100644
--- a/srv/src/http/tpl/edit-post.html
+++ b/srv/src/http/tpl/edit-post.html
@@ -15,6 +15,9 @@
type="text"
placeholder="e.g. how-to-fly-a-kite"
value="{{ .Payload.Post.ID }}" />
+ {{ else if .Payload.IsDraft }}
+ {{ .Payload.Post.ID }}
+ <input name="id" type="hidden" value="{{ .Payload.Post.ID }}" />
{{ else }}
<a href="{{ PostURL .Payload.Post.ID }}">{{ .Payload.Post.ID }}</a>
<input name="id" type="hidden" value="{{ .Payload.Post.ID }}" />
@@ -107,10 +110,17 @@
</form>
<p>
+ {{ if .Payload.IsDraft }}
+ <a href="{{ BlogURL "drafts/" }}">
+ Back to Drafts
+ </a>
+ {{ else }}
<a href="{{ BlogURL "posts/" }}">
Back to Posts
</a>
+ {{ end }}
</p>
+
{{ end }}
{{ template "base.html" . }}