38 lines
2.1 KiB
Plaintext
Raw Normal View History

2017-06-20 10:41:26 +00:00
component AnimeListItem(viewUser *arn.User, item *arn.AnimeListItem, anime *arn.Anime)
2017-07-09 02:22:14 +00:00
.widget-form.mountable
2017-10-11 20:54:26 +00:00
.widget.anime-list-item-view(data-api="/api/animelist/" + viewUser.ID + "/field/Items[AnimeID=\"" + anime.ID + "\"]")
2017-07-06 20:08:49 +00:00
h1= anime.Title.Canonical
2017-06-26 09:43:47 +00:00
2017-07-13 05:53:36 +00:00
.anime-list-item-progress-edit
.anime-list-item-episodes-edit
InputNumber("Episodes", float64(item.Episodes), "Episodes", "Number of episodes you watched", "0", arn.EpisodeCountMax(anime.EpisodeCount), "1")
2017-10-09 13:47:40 +00:00
.widget-section.anime-list-item-status-edit
2017-07-13 05:53:36 +00:00
label(for="Status") Status:
2017-10-09 13:47:40 +00:00
select.widget-ui-element.action(id="Status", data-field="Status", value=item.Status, data-action="save", data-trigger="change")
2017-07-13 05:53:36 +00:00
option(value=arn.AnimeListStatusWatching) Watching
option(value=arn.AnimeListStatusCompleted) Completed
option(value=arn.AnimeListStatusPlanned) Plan to watch
option(value=arn.AnimeListStatusHold) On hold
option(value=arn.AnimeListStatusDropped) Dropped
2017-06-29 13:55:04 +00:00
2017-06-26 09:43:47 +00:00
.anime-list-item-rating-edit
2017-07-01 00:14:14 +00:00
InputNumber("Rating.Overall", item.Rating.Overall, arn.OverallRatingName(item.Episodes), "Overall rating on a scale of 0 to 10", "0", "10", "0.1")
2017-06-26 09:43:47 +00:00
InputNumber("Rating.Story", item.Rating.Story, "Story", "Story rating on a scale of 0 to 10", "0", "10", "0.1")
InputNumber("Rating.Visuals", item.Rating.Visuals, "Visuals", "Visuals rating on a scale of 0 to 10", "0", "10", "0.1")
InputNumber("Rating.Soundtrack", item.Rating.Soundtrack, "Soundtrack", "Soundtrack rating on a scale of 0 to 10", "0", "10", "0.1")
InputNumber("RewatchCount", float64(item.RewatchCount), "Rewatched", "How often you rewatched this anime", "0", "100", "1")
2017-06-19 18:59:02 +00:00
2017-06-21 12:00:52 +00:00
InputTextArea("Notes", item.Notes, "Notes", "Your notes")
2017-06-20 10:41:26 +00:00
2017-06-20 18:13:04 +00:00
.buttons.mountable
2017-10-13 11:55:33 +00:00
a.ajax.button(href="/animelist/" + item.Status)
2017-06-20 10:41:26 +00:00
Icon("list")
span View collection
a.ajax.button(href=anime.Link())
Icon("search-plus")
span View anime
2017-10-14 10:45:22 +00:00
button.action(data-action="removeAnimeFromCollection", data-trigger="click", data-api="/api/animelist/" + viewUser.ID, data-anime-id=anime.ID, data-nick=viewUser.Nick)
2017-06-20 10:41:26 +00:00
Icon("trash")
span Remove from collection