|
|
|
@ -783,11 +783,7 @@ func handleViewCollection(app *App, w http.ResponseWriter, r *http.Request) erro |
|
|
|
|
|
|
|
|
|
// Add more data
|
|
|
|
|
// TODO: fix this mess of collections inside collections
|
|
|
|
|
if isOwner { |
|
|
|
|
displayPage.PinnedPosts, _ = app.db.GetPinnedPosts(coll.CollectionObj, true) |
|
|
|
|
} else { |
|
|
|
|
displayPage.PinnedPosts, _ = app.db.GetPinnedPosts(coll.CollectionObj, false) |
|
|
|
|
} |
|
|
|
|
displayPage.PinnedPosts, _ = app.db.GetPinnedPosts(coll.CollectionObj, isOwner) |
|
|
|
|
|
|
|
|
|
err = templates["collection"].ExecuteTemplate(w, "collection", displayPage) |
|
|
|
|
if err != nil { |
|
|
|
@ -884,11 +880,7 @@ func handleViewCollectionTag(app *App, w http.ResponseWriter, r *http.Request) e |
|
|
|
|
coll.Owner = displayPage.Owner |
|
|
|
|
// Add more data
|
|
|
|
|
// TODO: fix this mess of collections inside collections
|
|
|
|
|
if isOwner { |
|
|
|
|
displayPage.PinnedPosts, _ = app.db.GetPinnedPosts(coll.CollectionObj, true) |
|
|
|
|
} else { |
|
|
|
|
displayPage.PinnedPosts, _ = app.db.GetPinnedPosts(coll.CollectionObj, false) |
|
|
|
|
} |
|
|
|
|
displayPage.PinnedPosts, _ = app.db.GetPinnedPosts(coll.CollectionObj, isOwner) |
|
|
|
|
|
|
|
|
|
err = templates["collection-tags"].ExecuteTemplate(w, "collection-tags", displayPage) |
|
|
|
|
if err != nil { |
|
|
|
|