diff options
Diffstat (limited to 'src/http/tpl.go')
-rw-r--r-- | src/http/tpl.go | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/http/tpl.go b/src/http/tpl.go index 3e1a2ba..a9f89d7 100644 --- a/src/http/tpl.go +++ b/src/http/tpl.go @@ -49,19 +49,31 @@ func (a *api) postURL(id string, abs bool) string { return a.blogURL(path, abs) } -func (a *api) postsURL(abs bool) string { - return a.blogURL("posts", abs) +func (a *api) editPostURL(id string, abs bool) string { + return a.postURL(id, abs) + "?method=edit" } -func (a *api) assetsURL(abs bool) string { - return a.blogURL("assets", abs) +func (a *api) managePostsURL(abs bool) string { + return a.blogURL("posts?method=manage", abs) } -func (a *api) draftURL(id string, abs bool) string { +func (a *api) manageAssetsURL(abs bool) string { + return a.blogURL("assets?method=manage", abs) +} + +func (a *api) draftPostURL(id string, abs bool) string { path := filepath.Join("drafts", id) return a.blogURL(path, abs) } +func (a *api) editDraftPostURL(id string, abs bool) string { + return a.draftPostURL(id, abs) + "?method=edit" +} + +func (a *api) manageDraftPostsURL(abs bool) string { + return a.blogURL("drafts", abs) + "?method=manage" +} + func (a *api) draftsURL(abs bool) string { return a.blogURL("drafts", abs) } @@ -88,7 +100,7 @@ func (a *api) tplFuncs() template.FuncMap { return a.blogURL(path, false) }, "DraftURL": func(id string) string { - return a.draftURL(id, false) + return a.draftPostURL(id, false) }, "DateTimeFormat": func(t time.Time) string { return t.Format("2006-01-02") |