Changed editor panel links
This commit is contained in:
@ -51,7 +51,7 @@ func AniList(ctx *aero.Context) string {
|
||||
"Anime without Anilist links",
|
||||
missing,
|
||||
count,
|
||||
"/editor/anilist",
|
||||
"/editor/anime/missing/anilist",
|
||||
func(anime *arn.Anime) string {
|
||||
return "https://anilist.co/search?type=anime&q=" + anime.Title.Canonical
|
||||
},
|
||||
|
@ -14,5 +14,5 @@ func Get(ctx *aero.Context) string {
|
||||
return ctx.Redirect("/")
|
||||
}
|
||||
|
||||
return ctx.HTML(components.Editor())
|
||||
return ctx.HTML(components.Editor(ctx.URI(), user))
|
||||
}
|
||||
|
@ -1,17 +1,21 @@
|
||||
component Editor
|
||||
EditorTabs
|
||||
component Editor(url string, user *arn.User)
|
||||
EditorTabs(url)
|
||||
h1.page-title Editor Panel
|
||||
p.text-center.mountable Welcome to the Editor Panel!
|
||||
p.text-center.mountable= "Welcome to the Editor Panel, " + user.Nick + "!"
|
||||
|
||||
component EditorTabs
|
||||
component EditorTabs(url string)
|
||||
.tabs
|
||||
Tab("Editor", "pencil", "/editor")
|
||||
Tab("Shoboi", "list", "/editor/shoboi")
|
||||
Tab("AniList", "list", "/editor/anilist")
|
||||
Tab("Genres", "list", "/editor/genres")
|
||||
Tab("MAL", "list", "/editor/mal")
|
||||
Tab("MAL", "exchange", "/editor/anime/maldiff")
|
||||
Tab("Missing", "list", "/editor/anime/missing/shoboi")
|
||||
Tab("Search", "search", "/database")
|
||||
|
||||
//- a.tab.ajax(href="/admin", aria-label="Admin")
|
||||
//- Icon("wrench")
|
||||
//- span.tab-text Admin
|
||||
if strings.Contains(url, "/editor/anime/missing/")
|
||||
.tabs
|
||||
Tab("Shoboi", "list", "/editor/anime/missing/shoboi")
|
||||
Tab("AniList", "list", "/editor/anime/missing/anilist")
|
||||
Tab("Genres", "list", "/editor/anime/missing/genres")
|
||||
|
||||
//- a.tab.ajax(href="/admin", aria-label="Admin")
|
||||
//- Icon("wrench")
|
||||
//- span.tab-text Admin
|
@ -51,7 +51,7 @@ func Genres(ctx *aero.Context) string {
|
||||
"Anime without genres",
|
||||
missing,
|
||||
count,
|
||||
"/editor/genres",
|
||||
"/editor/anime/missing/genres",
|
||||
nil,
|
||||
))
|
||||
}
|
||||
|
@ -109,5 +109,5 @@ func CompareMAL(ctx *aero.Context) string {
|
||||
}
|
||||
}
|
||||
|
||||
return ctx.HTML(components.CompareMAL(comparisons, user))
|
||||
return ctx.HTML(components.CompareMAL(comparisons, ctx.URI(), user))
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
component CompareMAL(comparisons []*utils.MALComparison, user *arn.User)
|
||||
EditorTabs
|
||||
component CompareMAL(comparisons []*utils.MALComparison, url string, user *arn.User)
|
||||
EditorTabs(url)
|
||||
h1.mountable MAL comparison
|
||||
|
||||
.data-comparisons
|
||||
|
@ -51,7 +51,7 @@ func Shoboi(ctx *aero.Context) string {
|
||||
"Anime without Shoboi links",
|
||||
missing,
|
||||
count,
|
||||
"/editor/shoboi",
|
||||
"/editor/anime/missing/shoboi",
|
||||
func(anime *arn.Anime) string {
|
||||
return "http://cal.syoboi.jp/find?type=quick&sd=1&kw=" + anime.Title.Japanese
|
||||
},
|
||||
|
Reference in New Issue
Block a user