Added new editor lists for anime
This commit is contained in:
parent
bb26e12f86
commit
5b77fa98cc
@ -28,14 +28,6 @@ component Editor(url string, score int, scoreTitle string, scoreTypes map[string
|
||||
a.footer-element(href="/editor/kitsu/new/anime") Kitsu
|
||||
|
||||
component EditorTabs(url string, user *arn.User)
|
||||
//- .tabs
|
||||
//- Tab("Editor", "pencil", "/editor")
|
||||
//- Tab("MAL", "exchange", "/editor/mal/diff/anime" + user.Settings().Editor.Filter.Suffix())
|
||||
//- Tab("Anime", "tv", "/editor/anime/mapping/mal" + user.Settings().Editor.Filter.Suffix())
|
||||
//- Tab("Tracks", "music", "/editor/soundtracks/links")
|
||||
//- Tab("Companies", "building", "/editor/companies/description")
|
||||
//- Tab("Kitsu", "download", "/editor/kitsu/new/anime")
|
||||
|
||||
.corner-buttons-left
|
||||
a.button(href="/editor")
|
||||
Icon("arrow-left")
|
||||
@ -47,8 +39,14 @@ component EditorTabs(url string, user *arn.User)
|
||||
Tab("Mappings", "arrows-h", "/editor/anime/mapping/mal" + user.Settings().Editor.Filter.Suffix())
|
||||
Tab("Images", "image", "/editor/anime/image/lowres" + user.Settings().Editor.Filter.Suffix())
|
||||
Tab("Companies", "building", "/editor/anime/companies/studios" + user.Settings().Editor.Filter.Suffix())
|
||||
Tab("Connections", "exchange", "/editor/anime/connections/relations" + user.Settings().Editor.Filter.Suffix())
|
||||
Tab("Details", "search-plus", "/editor/anime/details/genres" + user.Settings().Editor.Filter.Suffix())
|
||||
|
||||
if strings.Contains(url, "/editor/anime/connections")
|
||||
.tabs
|
||||
Tab("Relations", "exchange", "/editor/anime/connections/relations" + user.Settings().Editor.Filter.Suffix())
|
||||
Tab("Characters", "users", "/editor/anime/connections/characters" + user.Settings().Editor.Filter.Suffix())
|
||||
|
||||
if strings.Contains(url, "/editor/anime/details")
|
||||
.tabs
|
||||
Tab("Genres", "clone", "/editor/anime/details/genres" + user.Settings().Editor.Filter.Suffix())
|
||||
|
18
pages/editor/filteranime/characters.go
Normal file
18
pages/editor/filteranime/characters.go
Normal file
@ -0,0 +1,18 @@
|
||||
package filteranime
|
||||
|
||||
import (
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
)
|
||||
|
||||
// Characters ...
|
||||
func Characters(ctx *aero.Context) string {
|
||||
return editorList(
|
||||
ctx,
|
||||
"Anime without characters",
|
||||
func(anime *arn.Anime) bool {
|
||||
return len(anime.Characters().Items) == 0
|
||||
},
|
||||
nil,
|
||||
)
|
||||
}
|
20
pages/editor/filteranime/relations.go
Normal file
20
pages/editor/filteranime/relations.go
Normal file
@ -0,0 +1,20 @@
|
||||
package filteranime
|
||||
|
||||
import (
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
)
|
||||
|
||||
// Relations ...
|
||||
func Relations(ctx *aero.Context) string {
|
||||
return editorList(
|
||||
ctx,
|
||||
"Anime without relations",
|
||||
func(anime *arn.Anime) bool {
|
||||
return len(anime.Relations().Items) == 0
|
||||
},
|
||||
func(anime *arn.Anime) string {
|
||||
return "http://notify.moe/search/" + anime.Title.Canonical
|
||||
},
|
||||
)
|
||||
}
|
@ -284,6 +284,9 @@ func Configure(app *aero.Application) {
|
||||
editorFilterable("/editor/anime/companies/producers", filteranime.Producers)
|
||||
editorFilterable("/editor/anime/companies/licensors", filteranime.Licensors)
|
||||
|
||||
editorFilterable("/editor/anime/connections/relations", filteranime.Relations)
|
||||
editorFilterable("/editor/anime/connections/characters", filteranime.Characters)
|
||||
|
||||
editorFilterable("/editor/anime/details/synopsis", filteranime.Synopsis)
|
||||
editorFilterable("/editor/anime/details/genres", filteranime.Genres)
|
||||
editorFilterable("/editor/anime/details/trailers", filteranime.Trailers)
|
||||
|
Loading…
Reference in New Issue
Block a user