summaryrefslogtreecommitdiff
path: root/src/http/tpl/draft-posts-manage.html
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2024-05-18 18:29:19 +0200
committerBrian Picciano <mediocregopher@gmail.com>2024-05-18 18:29:19 +0200
commit0665d0c65974533fbd313f4e0b062b5103057aeb (patch)
tree5287795eed9767bd959a5139b77ef78b4024216d /src/http/tpl/draft-posts-manage.html
parentffa26298c95451639a6e01db6692d02d50b3d518 (diff)
Replace all URL rendering within templates by a URLConstructor
Diffstat (limited to 'src/http/tpl/draft-posts-manage.html')
-rw-r--r--src/http/tpl/draft-posts-manage.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/http/tpl/draft-posts-manage.html b/src/http/tpl/draft-posts-manage.html
index b1b4362..417f716 100644
--- a/src/http/tpl/draft-posts-manage.html
+++ b/src/http/tpl/draft-posts-manage.html
@@ -1,6 +1,6 @@
{{ define "body" }}
- {{ $page := .GetQueryIntValue "p" 0 -}}
+ {{ $page := .GetQueryIntValue "page" 0 -}}
{{ $getPostsRes := .GetDraftPosts $page 20 -}}
<script>
@@ -11,18 +11,18 @@
</script>
<p>
- <a href="{{ BlogURL "admin" }}">Back to Admin</a>
+ <a href="{{ .RootURL.Path "admin" }}">Back to Admin</a>
</p>
<h1>Drafts</h1>
<p>
- <a href="{{ BlogURL "drafts" }}?method=edit">New Draft</a>
+ <a href="{{ .RootURL.Drafts.MethodEdit }}">New Draft</a>
</p>
{{ if gt $page 0 }}
<p>
- <a href="?method=manage&p={{ .Add $page -1 }}">&lt; &lt; Previous Page</a>
+ <a href="{{ .RootURL.Drafts.MethodManage.Page (.Add $page -1) }}">&lt; &lt; Previous Page</a>
</p>
{{ end }}
@@ -32,13 +32,13 @@
<tr>
<td>{{ .Title }}</td>
<td>
- <a href="{{ DraftURL .ID }}?method=edit">
+ <a href="{{ ($.RootURL.Draft .ID).MethodEdit }}">
Edit
</a>
</td>
<td>
<form
- action="{{ DraftURL .ID }}?method=delete"
+ action="{{ ($.RootURL.Draft .ID).MethodDelete }}"
method="POST"
>
<input
@@ -55,7 +55,7 @@
{{ if $getPostsRes.HasMore }}
<p>
- <a href="?method=manage&p={{ .Add $page 1 }}">Next Page &gt; &gt;</a>
+ <a href="{{ .RootURL.Drafts.MethodManage.Page (.Add $page 1) }}">Next Page &gt; &gt;</a>
</p>
{{ end }}