Added editor list for trailers

This commit is contained in:
Eduard Urbach 2018-04-06 00:37:10 +02:00
parent a4bbd5cbbc
commit 84bb8fc2b8
3 changed files with 20 additions and 0 deletions

View File

@ -40,6 +40,7 @@ component EditorTabs(url string, user *arn.User)
.tabs .tabs
Tab("Genres", "clone", "/editor/anime/details/genres" + user.Settings().Editor.Filter.Suffix()) 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("Synopsis", "align-left", "/editor/anime/details/synopsis" + 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("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()) Tab("Ep. Length", "clock-o", "/editor/anime/details/episodelength" + 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())

View File

@ -0,0 +1,18 @@
package filteranime
import (
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
)
// Trailers ...
func Trailers(ctx *aero.Context) string {
return editorList(
ctx,
"Anime without trailers",
func(anime *arn.Anime) bool {
return len(anime.Trailers) == 0
},
nil,
)
}

View File

@ -286,6 +286,7 @@ func Configure(app *aero.Application) {
editorFilterable("/editor/anime/details/synopsis", filteranime.Synopsis) editorFilterable("/editor/anime/details/synopsis", filteranime.Synopsis)
editorFilterable("/editor/anime/details/genres", filteranime.Genres) editorFilterable("/editor/anime/details/genres", filteranime.Genres)
editorFilterable("/editor/anime/details/trailers", filteranime.Trailers)
editorFilterable("/editor/anime/details/startdate", filteranime.StartDate) editorFilterable("/editor/anime/details/startdate", filteranime.StartDate)
editorFilterable("/editor/anime/details/episodelength", filteranime.EpisodeLength) editorFilterable("/editor/anime/details/episodelength", filteranime.EpisodeLength)
editorFilterable("/editor/anime/details/source", filteranime.Source) editorFilterable("/editor/anime/details/source", filteranime.Source)