Make Shoboi ID editable

This commit is contained in:
Eduard Urbach 2017-06-28 18:39:52 +02:00
parent ba24b6e2d0
commit 9bae97f9db
3 changed files with 12 additions and 3 deletions

View File

@ -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)

View File

@ -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

View File

@ -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()
}
}