48 lines
2.0 KiB
Plaintext
48 lines
2.0 KiB
Plaintext
- if @status == "loading"
|
|
.alert-message.warning
|
|
%p= t('search.loading')
|
|
.row.artist-info
|
|
.span4.columns.pic
|
|
= image_tag @data[:pic_url] unless @data[:pic_url].nil?
|
|
.span7.columns.desc
|
|
%h2
|
|
=@data[:name]
|
|
%small= " "+@data[:original_name].to_s
|
|
%p= @data[:desc].html_safe unless @data[:desc].nil?
|
|
- unless @data[:artist_links].empty?
|
|
.service-icons
|
|
%a.foreign-link{ href: "http://last.fm/artist/#{@data[:url_name]}", target: '_blank' }
|
|
= image_tag 'services/lastfm.ico'
|
|
- @data[:artist_links].each do |link|
|
|
- if ['wikipedia', 'microblog', 'official_homepage', 'social_network', 'youtube'].include?(link[:service])
|
|
%a.foreign-link{ href: link[:url], target: '_blank' }
|
|
= image_tag 'services/'+link[:service]+(link[:service] == 'official_homepage' ? '.png' : '.ico')
|
|
|
|
.row
|
|
.span7.offset4
|
|
%h3= t('player.playlists')
|
|
%table.zebra-striped
|
|
%tr
|
|
%td
|
|
%span.label.success.authorized-action.set-playlist{ href: "", 'data-playlist' => "lastfm-top50/#{@data[:url_name]}" }
|
|
= t('player.set_playlist')
|
|
%a.page-link.playlist-name{ href: "/playlist/lastfm-top50/#{@data[:url_name]}" }= "#{@data[:name]}: Last.fm TOP"
|
|
|
|
- @data[:albums].each do |album|
|
|
.row.album
|
|
.span4.columns.art
|
|
%img{ src: album[:pic_url] }
|
|
.button-container.authorized-action
|
|
%a.btn.success.add-album{ 'data-tracks' => album[:tracks].map{|_|_[:id]}.join(",") }= t('player.add')
|
|
.span7.columns.tracks
|
|
%h3
|
|
= album[:name]
|
|
%small= " ("+album[:year].to_s+")"
|
|
%table.zebra-striped.tracklist
|
|
- album[:tracks].each do |track|
|
|
%tr{ class: (track[:available] == false ? "unavailable" : nil) }
|
|
%td.song-title= 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')
|