1
0
Fork 0
oldhaven/app/views/playlist/_tracks.html.haml

20 lines
835 B
Plaintext

.row.album
.span3.columns.art
- unless @data[:pic_url].nil?
%img{ src: @data[:pic_url] }
.button-container
%a.btn.success.authorized-action.add-album{ 'data-tracks' => @data[:tracks].map{|_|_[:id]}.join(",") }= t('player.play_all')
.span8.columns.tracks
%h3= @data[:name]
%table.zebra-striped.tracklist
- @data[:tracks].each do |track|
%tr{ class: (track[:available] == false ? "unavailable" : nil) }
%td.album-pic
%img{ src: track[:album_pic]}
%td.song-title
%a.data.artist= track[:artist]
—
= track[:name]
%td.song-duration
.s-duration= (track[:duration] != '0:00' ? track[:duration] : ' '.html_safe)
%span.label.success.s-add{ 'data-id' => track[:id] }= t('player.add_one')