summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-10-29 14:02:15 -0700
committerSteve Manuel <nilslice@gmail.com>2016-10-29 14:02:15 -0700
commitec0c753e8386d0dabe6c65ffb9d26484fa361eb0 (patch)
treeb0d7f1cae0a24a2323a58085101ffa89474d5305
parente3d9f80a8bbb0dab11259b132976fd9c7a5e2a8f (diff)
initial set up for external/internal toggle view
-rw-r--r--system/admin/handlers.go8
-rw-r--r--system/admin/server.go1
2 files changed, 7 insertions, 2 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index 9f0b81e..b511339 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -638,7 +638,7 @@ func postsHandler(res http.ResponseWriter, req *http.Request) {
switch created {
case "internal":
- html += `<div class="row">
+ html += `<div class="row externalable">
Created by:
<a class="active" href="` + intURL + `">Internal</a>
&nbsp;&vert;&nbsp;
@@ -646,7 +646,7 @@ func postsHandler(res http.ResponseWriter, req *http.Request) {
</div>`
case "external":
- html += `<div class="row">
+ html += `<div class="row externalable">
Created by:
<a href="` + intURL + `">Internal</a>
&nbsp;&vert;&nbsp;
@@ -753,6 +753,10 @@ func adminPostListItem(p editor.Editable, t string) []byte {
return []byte(post)
}
+func approvePostHandler(res http.ResponseWriter, req *http.Request) {
+
+}
+
func editHandler(res http.ResponseWriter, req *http.Request) {
switch req.Method {
case http.MethodGet:
diff --git a/system/admin/server.go b/system/admin/server.go
index c22c278..161220e 100644
--- a/system/admin/server.go
+++ b/system/admin/server.go
@@ -24,6 +24,7 @@ func Run() {
http.HandleFunc("/admin/configure/users/delete", user.Auth(configUsersDeleteHandler))
http.HandleFunc("/admin/posts", user.Auth(postsHandler))
+ http.HandleFunc("/admin/posts/approve", user.Auth(approvePostHandler))
http.HandleFunc("/admin/posts/search", user.Auth(searchHandler))
http.HandleFunc("/admin/edit", user.Auth(editHandler))