Editors can now add anime from scratch
This commit is contained in:
@ -60,6 +60,10 @@ func filterAnime(year, season, status, typ string) []*arn.Anime {
|
||||
results := make([]*arn.Anime, 0, 1024)
|
||||
|
||||
for anime := range arn.StreamAnime() {
|
||||
if anime.IsDraft {
|
||||
continue
|
||||
}
|
||||
|
||||
if year != "any" {
|
||||
if len(anime.StartDate) < 4 {
|
||||
continue
|
||||
|
@ -29,6 +29,17 @@ component ExploreAnime(animes []*arn.Anime, year string, season string, status s
|
||||
p.no-data.mountable No anime found using the above filters.
|
||||
else
|
||||
AnimeGrid(animes, user)
|
||||
|
||||
if user != nil && (user.Role == "editor" || user.Role == "admin")
|
||||
.buttons
|
||||
if user.DraftIndex().AnimeID == ""
|
||||
button.mountable.action(data-action="newObject", data-trigger="click", data-type="anime")
|
||||
Icon("plus")
|
||||
span Add anime
|
||||
else
|
||||
a.button.mountable(href="/anime/" + user.DraftIndex().AnimeID + "/edit")
|
||||
Icon("pencil")
|
||||
span Edit draft
|
||||
|
||||
component ExploreFilters(year string, season string, status string, typ string, advancedFilters bool)
|
||||
.explore-filters
|
||||
|
Reference in New Issue
Block a user