diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-12-14 14:01:08 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-12-14 14:01:08 -0800 |
commit | b20c5bdee38682edc851e646d815a34689c3c923 (patch) | |
tree | 004e82f87ada877d67322d6e5763797c950ca21e | |
parent | 793835bc695013433e85b1835d9220ff98a358f4 (diff) |
fix pagination on pending items.
-rw-r--r-- | system/admin/handlers.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go index 7fb1692..1e6a26c 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -823,7 +823,14 @@ func contentsHandler(res http.ResponseWriter, req *http.Request) { Order: order, } - total, posts := db.Query(t+"__sorted", opts) + var specifier string + if status == "public" { + specifier = "__sorted" + } else if status == "pending" { + specifier = "__pending" + } + + total, posts := db.Query(t+specifier, opts) b := &bytes.Buffer{} html := `<div class="col s9 card"> |