|
|
@ -552,6 +552,7 @@ type CollectionPage struct { |
|
|
|
IsOwner bool |
|
|
|
IsOwner bool |
|
|
|
CanPin bool |
|
|
|
CanPin bool |
|
|
|
Username string |
|
|
|
Username string |
|
|
|
|
|
|
|
Monetization string |
|
|
|
Collections *[]Collection |
|
|
|
Collections *[]Collection |
|
|
|
PinnedPosts *[]PublicPost |
|
|
|
PinnedPosts *[]PublicPost |
|
|
|
IsAdmin bool |
|
|
|
IsAdmin bool |
|
|
@ -829,6 +830,7 @@ func handleViewCollection(app *App, w http.ResponseWriter, r *http.Request) erro |
|
|
|
// Add more data
|
|
|
|
// Add more data
|
|
|
|
// TODO: fix this mess of collections inside collections
|
|
|
|
// TODO: fix this mess of collections inside collections
|
|
|
|
displayPage.PinnedPosts, _ = app.db.GetPinnedPosts(coll.CollectionObj, isOwner) |
|
|
|
displayPage.PinnedPosts, _ = app.db.GetPinnedPosts(coll.CollectionObj, isOwner) |
|
|
|
|
|
|
|
displayPage.Monetization = app.db.GetCollectionAttribute(coll.ID, "monetization_pointer") |
|
|
|
|
|
|
|
|
|
|
|
collTmpl := "collection" |
|
|
|
collTmpl := "collection" |
|
|
|
if app.cfg.App.Chorus { |
|
|
|
if app.cfg.App.Chorus { |
|
|
@ -947,6 +949,7 @@ func handleViewCollectionTag(app *App, w http.ResponseWriter, r *http.Request) e |
|
|
|
// Add more data
|
|
|
|
// Add more data
|
|
|
|
// TODO: fix this mess of collections inside collections
|
|
|
|
// TODO: fix this mess of collections inside collections
|
|
|
|
displayPage.PinnedPosts, _ = app.db.GetPinnedPosts(coll.CollectionObj, isOwner) |
|
|
|
displayPage.PinnedPosts, _ = app.db.GetPinnedPosts(coll.CollectionObj, isOwner) |
|
|
|
|
|
|
|
displayPage.Monetization = app.db.GetCollectionAttribute(coll.ID, "monetization_pointer") |
|
|
|
|
|
|
|
|
|
|
|
err = templates["collection-tags"].ExecuteTemplate(w, "collection-tags", displayPage) |
|
|
|
err = templates["collection-tags"].ExecuteTemplate(w, "collection-tags", displayPage) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|