diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2022-11-29 20:59:31 +0100 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2022-11-29 20:59:31 +0100 |
commit | 1f3ae665ed2e58ca572678ce7caf8b711f226392 (patch) | |
tree | e023602e07e2a80d24ef9d9527ddca0e1640e929 /src/http/tpl | |
parent | 31f8f37c5ad3ad4ac7b3cc93d0257dd80c877c7c (diff) |
Introduce EDIT and MANAGE methods
All admin "index" pages are moved under MANAGE, so that we can have (for
example) and normal "GET /posts" page later which would replace the
current index page, and potentially corresponding pages for the other
categories.
The EDIT method replaces the old `?edit` pattern, which normalizes how
we differentiate page functionality generally.
Diffstat (limited to 'src/http/tpl')
-rw-r--r-- | src/http/tpl/admin.html | 6 | ||||
-rw-r--r-- | src/http/tpl/draft-posts-manage.html (renamed from src/http/tpl/draft-posts.html) | 6 | ||||
-rw-r--r-- | src/http/tpl/post-assets-manage.html (renamed from src/http/tpl/assets.html) | 0 | ||||
-rw-r--r-- | src/http/tpl/post-edit.html (renamed from src/http/tpl/edit-post.html) | 4 | ||||
-rw-r--r-- | src/http/tpl/posts-manage.html (renamed from src/http/tpl/posts.html) | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/http/tpl/admin.html b/src/http/tpl/admin.html index f2ba4d6..510d705 100644 --- a/src/http/tpl/admin.html +++ b/src/http/tpl/admin.html @@ -7,9 +7,9 @@ mostly left open to inspection, but you will not able to change anything without providing credentials. <ul> - <li><a href="{{ BlogURL "posts" }}">Posts</a></li> - <li><a href="{{ BlogURL "assets" }}">Assets</a></li> - <li><a href="{{ BlogURL "drafts" }}">Drafts</a> (private)</li> + <li><a href="{{ BlogURL "posts?method=manage" }}">Posts</a></li> + <li><a href="{{ BlogURL "assets?method=manage" }}">Assets</a></li> + <li><a href="{{ BlogURL "drafts?method=manage" }}">Drafts</a> (private)</li> </ul> {{ end }} diff --git a/src/http/tpl/draft-posts.html b/src/http/tpl/draft-posts-manage.html index 53261b9..12aadb2 100644 --- a/src/http/tpl/draft-posts.html +++ b/src/http/tpl/draft-posts-manage.html @@ -7,7 +7,7 @@ <h1>Drafts</h1> <p> - <a href="{{ BlogURL "drafts/" }}?edit">New Draft</a> + <a href="{{ BlogURL "drafts" }}?method=edit">New Draft</a> </p> {{ if ge .Payload.PrevPage 0 }} @@ -20,9 +20,9 @@ {{ range .Payload.Posts }} <tr> - <td><a href="{{ DraftURL .ID }}">{{ .Title }}</a></td> + <td>{{ .Title }}</td> <td> - <a href="{{ DraftURL .ID }}?edit"> + <a href="{{ DraftURL .ID }}?method=edit"> Edit </a> </td> diff --git a/src/http/tpl/assets.html b/src/http/tpl/post-assets-manage.html index f21717a..f21717a 100644 --- a/src/http/tpl/assets.html +++ b/src/http/tpl/post-assets-manage.html diff --git a/src/http/tpl/edit-post.html b/src/http/tpl/post-edit.html index f8e2730..2813754 100644 --- a/src/http/tpl/edit-post.html +++ b/src/http/tpl/post-edit.html @@ -2,11 +2,11 @@ <p> {{ if .Payload.IsDraft }} - <a href="{{ BlogURL "drafts/" }}"> + <a href="{{ BlogURL "drafts?method=manage" }}"> Back to Drafts </a> {{ else }} - <a href="{{ BlogURL "posts/" }}"> + <a href="{{ BlogURL "posts?method=manage" }}"> Back to Posts </a> {{ end }} diff --git a/src/http/tpl/posts.html b/src/http/tpl/posts-manage.html index fbeaa41..cfb2ec9 100644 --- a/src/http/tpl/posts.html +++ b/src/http/tpl/posts-manage.html @@ -19,7 +19,7 @@ <td>{{ .PublishedAt.Local.Format "2006-01-02 15:04:05 MST" }}</td> <td><a href="{{ PostURL .ID }}">{{ .Title }}</a></td> <td> - <a href="{{ PostURL .ID }}?edit"> + <a href="{{ PostURL .ID }}?method=edit"> Edit </a> </td> |