Changed editor panel links
This commit is contained in:
parent
fa719fb13b
commit
b77dcfb98c
@ -1,5 +1,5 @@
|
|||||||
component AnimeEditorListFull(title string, missing []*arn.Anime, count int, pageURI string, generateSearchLink func(*arn.Anime) string)
|
component AnimeEditorListFull(title string, missing []*arn.Anime, count int, pageURI string, generateSearchLink func(*arn.Anime) string)
|
||||||
EditorTabs
|
EditorTabs(pageURI)
|
||||||
h1.editor-list-title.mountable= title
|
h1.editor-list-title.mountable= title
|
||||||
.footer.editor-list-entry-count.mountable= strconv.Itoa(count) + " anime"
|
.footer.editor-list-entry-count.mountable= strconv.Itoa(count) + " anime"
|
||||||
AnimeEditorList(missing, pageURI, generateSearchLink)
|
AnimeEditorList(missing, pageURI, generateSearchLink)
|
||||||
|
@ -7,5 +7,5 @@ import (
|
|||||||
|
|
||||||
// Get the dashboard.
|
// Get the dashboard.
|
||||||
func Get(ctx *aero.Context) string {
|
func Get(ctx *aero.Context) string {
|
||||||
return ctx.HTML(components.Database())
|
return ctx.HTML(components.Database(ctx.URI()))
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
component Database
|
component Database(url string)
|
||||||
EditorTabs
|
EditorTabs(url)
|
||||||
|
|
||||||
.widget-form
|
.widget-form
|
||||||
.widget
|
.widget
|
||||||
|
@ -51,7 +51,7 @@ func AniList(ctx *aero.Context) string {
|
|||||||
"Anime without Anilist links",
|
"Anime without Anilist links",
|
||||||
missing,
|
missing,
|
||||||
count,
|
count,
|
||||||
"/editor/anilist",
|
"/editor/anime/missing/anilist",
|
||||||
func(anime *arn.Anime) string {
|
func(anime *arn.Anime) string {
|
||||||
return "https://anilist.co/search?type=anime&q=" + anime.Title.Canonical
|
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.Redirect("/")
|
||||||
}
|
}
|
||||||
|
|
||||||
return ctx.HTML(components.Editor())
|
return ctx.HTML(components.Editor(ctx.URI(), user))
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,21 @@
|
|||||||
component Editor
|
component Editor(url string, user *arn.User)
|
||||||
EditorTabs
|
EditorTabs(url)
|
||||||
h1.page-title Editor Panel
|
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
|
.tabs
|
||||||
Tab("Editor", "pencil", "/editor")
|
Tab("Editor", "pencil", "/editor")
|
||||||
Tab("Shoboi", "list", "/editor/shoboi")
|
Tab("MAL", "exchange", "/editor/anime/maldiff")
|
||||||
Tab("AniList", "list", "/editor/anilist")
|
Tab("Missing", "list", "/editor/anime/missing/shoboi")
|
||||||
Tab("Genres", "list", "/editor/genres")
|
|
||||||
Tab("MAL", "list", "/editor/mal")
|
|
||||||
Tab("Search", "search", "/database")
|
Tab("Search", "search", "/database")
|
||||||
|
|
||||||
//- a.tab.ajax(href="/admin", aria-label="Admin")
|
if strings.Contains(url, "/editor/anime/missing/")
|
||||||
//- Icon("wrench")
|
.tabs
|
||||||
//- span.tab-text Admin
|
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",
|
"Anime without genres",
|
||||||
missing,
|
missing,
|
||||||
count,
|
count,
|
||||||
"/editor/genres",
|
"/editor/anime/missing/genres",
|
||||||
nil,
|
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)
|
component CompareMAL(comparisons []*utils.MALComparison, url string, user *arn.User)
|
||||||
EditorTabs
|
EditorTabs(url)
|
||||||
h1.mountable MAL comparison
|
h1.mountable MAL comparison
|
||||||
|
|
||||||
.data-comparisons
|
.data-comparisons
|
||||||
|
@ -51,7 +51,7 @@ func Shoboi(ctx *aero.Context) string {
|
|||||||
"Anime without Shoboi links",
|
"Anime without Shoboi links",
|
||||||
missing,
|
missing,
|
||||||
count,
|
count,
|
||||||
"/editor/shoboi",
|
"/editor/anime/missing/shoboi",
|
||||||
func(anime *arn.Anime) string {
|
func(anime *arn.Anime) string {
|
||||||
return "http://cal.syoboi.jp/find?type=quick&sd=1&kw=" + anime.Title.Japanese
|
return "http://cal.syoboi.jp/find?type=quick&sd=1&kw=" + anime.Title.Japanese
|
||||||
},
|
},
|
||||||
|
@ -199,16 +199,16 @@ func Configure(app *aero.Application) {
|
|||||||
|
|
||||||
// Editor
|
// Editor
|
||||||
l.Page("/editor", editor.Get)
|
l.Page("/editor", editor.Get)
|
||||||
l.Page("/editor/anilist", editor.AniList)
|
l.Page("/editor/anime/missing/anilist", editor.AniList)
|
||||||
l.Page("/editor/anilist/:year", editor.AniList)
|
l.Page("/editor/anime/missing/anilist/:year", editor.AniList)
|
||||||
l.Page("/editor/anilist/:year/:type", editor.AniList)
|
l.Page("/editor/anime/missing/anilist/:year/:type", editor.AniList)
|
||||||
l.Page("/editor/shoboi", editor.Shoboi)
|
l.Page("/editor/anime/missing/shoboi", editor.Shoboi)
|
||||||
l.Page("/editor/shoboi/:year", editor.Shoboi)
|
l.Page("/editor/anime/missing/shoboi/:year", editor.Shoboi)
|
||||||
l.Page("/editor/shoboi/:year/:type", editor.Shoboi)
|
l.Page("/editor/anime/missing/shoboi/:year/:type", editor.Shoboi)
|
||||||
l.Page("/editor/genres", editor.Genres)
|
l.Page("/editor/anime/missing/genres", editor.Genres)
|
||||||
l.Page("/editor/genres/:year", editor.Genres)
|
l.Page("/editor/anime/missing/genres/:year", editor.Genres)
|
||||||
l.Page("/editor/genres/:year/:type", editor.Genres)
|
l.Page("/editor/anime/missing/genres/:year/:type", editor.Genres)
|
||||||
l.Page("/editor/mal", editor.CompareMAL)
|
l.Page("/editor/anime/maldiff", editor.CompareMAL)
|
||||||
|
|
||||||
// Mixed
|
// Mixed
|
||||||
l.Page("/database", database.Get)
|
l.Page("/database", database.Get)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user