24 lines
699 B
Plaintext
Raw Normal View History

2017-10-16 10:56:46 +00:00
component SoundTracks(tracks []*arn.SoundTrack, tracksPerPage int, user *arn.User)
2017-07-06 20:08:49 +00:00
h1 Soundtracks
2017-06-27 12:56:22 +00:00
.music-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)
2017-10-16 10:56:46 +00:00
if len(tracks) == tracksPerPage
.buttons
LoadMore(tracksPerPage)
2017-10-16 09:53:47 +00:00
component SoundTracksScrollable(tracks []*arn.SoundTrack, user *arn.User)
each track in tracks
SoundTrack(track)