Make Shoboi ID editable
This commit is contained in:
parent
ba24b6e2d0
commit
9bae97f9db
@ -23,7 +23,7 @@ component Anime(anime *arn.Anime, tracks []*arn.SoundTrack, user *arn.User)
|
||||
.buttons.anime-actions
|
||||
if user.Role == "editor" || user.Role == "admin"
|
||||
a.button.ajax(href=anime.Link() + "/edit")
|
||||
Icon("database")
|
||||
Icon("pencil-square-o")
|
||||
span Edit anime
|
||||
|
||||
if user.AnimeList().Contains(anime.ID)
|
||||
|
@ -4,4 +4,13 @@ component EditAnime(anime *arn.Anime)
|
||||
.widgets
|
||||
.widget(data-api="/api/anime/" + anime.ID)
|
||||
h3.anime-section-name Mappings
|
||||
InputText("ShoboiID", anime.GetMapping("shoboi/anime"), "Shoboi TID", "TID on http://cal.syoboi.jp")
|
||||
InputText("Custom:ShoboiID", anime.GetMapping("shoboi/anime"), "Shoboi TID", "TID on http://cal.syoboi.jp")
|
||||
|
||||
.buttons
|
||||
a.button.ajax(href="/anime/" + anime.ID)
|
||||
Icon("arrow-left")
|
||||
span View anime
|
||||
|
||||
a.button(href="/api/anime/" + anime.ID, target="_blank")
|
||||
Icon("search-plus")
|
||||
span JSON API
|
@ -22,7 +22,7 @@ func main() {
|
||||
}
|
||||
|
||||
fmt.Println(anime.ID, "=", mapping.Service, mapping.ServiceID)
|
||||
anime.AddMapping(mapping.Service, mapping.ServiceID)
|
||||
anime.AddMapping(mapping.Service, mapping.ServiceID, "4J6qpK1ve")
|
||||
anime.Save()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user