Added episode count filter for editors
This commit is contained in:
parent
81f18ec233
commit
3738b46ce9
@ -66,6 +66,7 @@ component EditorTabs(url string, user *arn.User)
|
|||||||
Tab("Start date", "calendar", "/editor/anime/details/startdate" + user.Settings().Editor.Filter.Suffix())
|
Tab("Start date", "calendar", "/editor/anime/details/startdate" + user.Settings().Editor.Filter.Suffix())
|
||||||
Tab("End date", "calendar", "/editor/anime/details/enddate" + user.Settings().Editor.Filter.Suffix())
|
Tab("End date", "calendar", "/editor/anime/details/enddate" + user.Settings().Editor.Filter.Suffix())
|
||||||
Tab("Ep. Length", "clock-o", "/editor/anime/details/episodelength" + user.Settings().Editor.Filter.Suffix())
|
Tab("Ep. Length", "clock-o", "/editor/anime/details/episodelength" + user.Settings().Editor.Filter.Suffix())
|
||||||
|
Tab("Ep. Count", "clock-o", "/editor/anime/details/episodecount" + user.Settings().Editor.Filter.Suffix())
|
||||||
Tab("Source", "book", "/editor/anime/details/source" + user.Settings().Editor.Filter.Suffix())
|
Tab("Source", "book", "/editor/anime/details/source" + user.Settings().Editor.Filter.Suffix())
|
||||||
|
|
||||||
if strings.Contains(url, "/editor/anime/companies")
|
if strings.Contains(url, "/editor/anime/companies")
|
||||||
|
18
pages/editor/filteranime/episodecount.go
Normal file
18
pages/editor/filteranime/episodecount.go
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package filteranime
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/aerogo/aero"
|
||||||
|
"github.com/animenotifier/notify.moe/arn"
|
||||||
|
)
|
||||||
|
|
||||||
|
// EpisodeCount ...
|
||||||
|
func EpisodeCount(ctx aero.Context) error {
|
||||||
|
return editorList(
|
||||||
|
ctx,
|
||||||
|
"Anime without an episode count",
|
||||||
|
func(anime *arn.Anime) bool {
|
||||||
|
return anime.EpisodeCount == 0
|
||||||
|
},
|
||||||
|
nil,
|
||||||
|
)
|
||||||
|
}
|
@ -46,6 +46,7 @@ func Register(app *aero.Application) {
|
|||||||
editorFilterable("/editor/anime/details/startdate", filteranime.StartDate)
|
editorFilterable("/editor/anime/details/startdate", filteranime.StartDate)
|
||||||
editorFilterable("/editor/anime/details/enddate", filteranime.EndDate)
|
editorFilterable("/editor/anime/details/enddate", filteranime.EndDate)
|
||||||
editorFilterable("/editor/anime/details/episodelength", filteranime.EpisodeLength)
|
editorFilterable("/editor/anime/details/episodelength", filteranime.EpisodeLength)
|
||||||
|
editorFilterable("/editor/anime/details/episodecount", filteranime.EpisodeCount)
|
||||||
editorFilterable("/editor/anime/details/source", filteranime.Source)
|
editorFilterable("/editor/anime/details/source", filteranime.Source)
|
||||||
editorFilterable("/editor/anime/details/status", filteranime.Status)
|
editorFilterable("/editor/anime/details/status", filteranime.Status)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user