31 lines
838 B
Plaintext
Raw Normal View History

2018-02-26 11:48:25 +00:00
component SoundTracks(tracks []*arn.SoundTrack, loadMoreIndex int, user *arn.User)
2017-11-19 16:02:20 +00:00
h1.page-title Soundtracks
SoundTracksTabs
2017-06-27 12:56:22 +00:00
2017-11-18 23:42:22 +00:00
.corner-buttons
2017-10-15 19:11:12 +00:00
if user != nil
if user.DraftIndex().SoundTrackID == ""
2017-10-17 21:17:04 +00:00
button.action(data-action="newObject", data-trigger="click", data-type="soundtrack")
2017-10-15 19:11:12 +00:00
Icon("plus")
span Add soundtrack
else
a.button.ajax(href="/soundtrack/" + user.DraftIndex().SoundTrackID + "/edit")
Icon("pencil")
span Edit draft
2017-06-27 11:06:19 +00:00
2017-10-16 09:53:47 +00:00
#load-more-target.sound-tracks
SoundTracksScrollable(tracks, user)
2018-02-26 11:48:25 +00:00
if loadMoreIndex != 0
2017-10-16 10:56:46 +00:00
.buttons
2018-02-26 11:48:25 +00:00
LoadMore(loadMoreIndex)
2017-10-16 09:53:47 +00:00
component SoundTracksScrollable(tracks []*arn.SoundTrack, user *arn.User)
each track in tracks
2017-11-19 16:02:20 +00:00
SoundTrack(track)
component SoundTracksTabs
.tabs
Tab("Latest", "music", "/soundtracks")
Tab("Best", "heart", "/soundtracks/best")