diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2024-05-18 18:29:19 +0200 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2024-05-18 18:29:19 +0200 |
commit | 0665d0c65974533fbd313f4e0b062b5103057aeb (patch) | |
tree | 5287795eed9767bd959a5139b77ef78b4024216d /src/http/tpl/post-edit.html | |
parent | ffa26298c95451639a6e01db6692d02d50b3d518 (diff) |
Replace all URL rendering within templates by a URLConstructor
Diffstat (limited to 'src/http/tpl/post-edit.html')
-rw-r--r-- | src/http/tpl/post-edit.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/http/tpl/post-edit.html b/src/http/tpl/post-edit.html index 28dcd0e..1c40a3a 100644 --- a/src/http/tpl/post-edit.html +++ b/src/http/tpl/post-edit.html @@ -6,17 +6,17 @@ <p> {{ if .Payload.IsDraft }} - <a href="{{ BlogURL "drafts?method=manage" }}"> + <a href="{{ .RootURL.Drafts.MethodManage }}"> Back to Drafts </a> {{ else }} - <a href="{{ BlogURL "posts?method=manage" }}"> + <a href="{{ .RootURL.Posts.MethodManage }}"> Back to Posts </a> {{ end }} </p> -<form method="POST" action="{{ BlogURL "posts/" }}"> +<form method="POST" action="{{ .RootURL.Posts }}"> <table> @@ -36,7 +36,7 @@ {{ $post.ID }} <input name="id" type="hidden" value="{{ $post.ID }}" /> {{ else }} - <a href="{{ PostURL $post.ID }}">{{ $post.ID }}</a> + <a href="{{ .RootURL.Post $post.ID }}">{{ $post.ID }}</a> <input name="id" type="hidden" value="{{ $post.ID }}" /> {{ end }} </td> @@ -135,12 +135,12 @@ <input type="submit" value="Preview" - formaction="{{ BlogURL "posts/" }}{{ $post.ID }}?method=preview" + formaction="{{ (.RootURL.Post $post.ID).MethodPreview }}" formtarget="_blank" /> {{ if .Payload.IsDraft }} - <input type="submit" value="Save" formaction="{{ BlogURL "drafts/" }}" /> + <input type="submit" value="Save" formaction="{{ .RootURL.Drafts }}" /> <script> @@ -154,12 +154,12 @@ <input type="submit" value="Publish" - formaction="{{ BlogURL "posts/" }}" + formaction="{{ .RootURL.Posts }}" onclick="confirmPublish(event)" /> {{ else }} - <input type="submit" value="Update" formaction="{{ BlogURL "posts/" }}" /> + <input type="submit" value="Update" formaction="{{ .RootURL.Posts }}" /> {{ end }} </p> |