Added an editor list to see incorrect status

This commit is contained in:
Eduard Urbach 2020-02-14 16:31:49 +09:00
parent 492229e6db
commit 915b6c96ae
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0
3 changed files with 20 additions and 0 deletions

View File

@ -61,6 +61,7 @@ component EditorTabs(url string, user *arn.User)
.tabs
Tab("Genres", "clone", "/editor/anime/details/genres" + user.Settings().Editor.Filter.Suffix())
Tab("Synopsis", "align-left", "/editor/anime/details/synopsis" + user.Settings().Editor.Filter.Suffix())
Tab("Status", "calendar-check-o", "/editor/anime/details/status" + user.Settings().Editor.Filter.Suffix())
Tab("Trailers", "youtube", "/editor/anime/details/trailers" + user.Settings().Editor.Filter.Suffix())
Tab("Start date", "calendar", "/editor/anime/details/startdate" + user.Settings().Editor.Filter.Suffix())
Tab("Ep. Length", "clock-o", "/editor/anime/details/episodelength" + user.Settings().Editor.Filter.Suffix())

View File

@ -0,0 +1,18 @@
package filteranime
import (
"github.com/aerogo/aero"
"github.com/animenotifier/notify.moe/arn"
)
// Status ...
func Status(ctx aero.Context) error {
return editorList(
ctx,
"Anime with an incorrect status",
func(anime *arn.Anime) bool {
return anime.Status != anime.CalculatedStatus()
},
nil,
)
}

View File

@ -45,6 +45,7 @@ func Register(app *aero.Application) {
editorFilterable("/editor/anime/details/startdate", filteranime.StartDate)
editorFilterable("/editor/anime/details/episodelength", filteranime.EpisodeLength)
editorFilterable("/editor/anime/details/source", filteranime.Source)
editorFilterable("/editor/anime/details/status", filteranime.Status)
editorFilterable("/editor/anime/all", filteranime.All)