And for 0 episodes last episode

This commit is contained in:
Jarmo Riikonen 2018-07-06 19:53:27 +03:00
parent 2617a84b4a
commit 7d2f93f344

View File

@ -8,13 +8,13 @@ component AnimeEpisode(anime *arn.Anime, episode *arn.AnimeEpisode, user *arn.Us
h3.episode-view-number= "Episode " + strconv.Itoa(episode.Number)
//- if episode.Number - 1 >= anime.Episodes().Items[0].Number
//- a.button(href=anime.Link() + "/episode/" + strconv.Itoa(episode.Number - 1))
//- Icon("chevron-left")
if episode.Number > anime.Episodes().Items[0].Number
a.button(href=anime.Link() + "/episode/" + strconv.Itoa(episode.Number - 1))
Icon("chevron-left")
//- if episode.Number + 1 <= len(anime.Episodes().Items)
//- a.button(href=anime.Link() + "/episode/" + strconv.Itoa(episode.Number + 1))
//- Icon("chevron-right")
if episode.Number < anime.Episodes().Items[len(anime.Episodes().Items) - 1].Number
a.button(href=anime.Link() + "/episode/" + strconv.Itoa(episode.Number + 1))
Icon("chevron-right")
if episode.Title.Japanese != ""
.episode-view-title