1
0
Fork 0
oldhaven/app/views/artist/_page.html.haml

53 lines
2.3 KiB
Plaintext
Raw Normal View History

2011-10-20 11:01:57 +00:00
- if @artist.status == 0
2011-09-09 22:13:02 +00:00
.alert-message.warning
2011-11-26 15:38:50 +00:00
%p= t('search.loading')
2011-09-08 01:48:33 +00:00
.row.artist-info
.span4.columns.pic
2011-10-20 11:01:57 +00:00
= image_tag @artist.pic_url unless @artist.pic_url.nil?
2011-09-08 01:48:33 +00:00
.span7.columns.desc
2011-11-23 22:41:05 +00:00
%h2
2011-11-23 23:45:29 +00:00
=@artist.name
%small= " "+@artist.original_name.to_s
%p= @artist.desc.html_safe unless @artist.desc.nil?
2011-10-20 11:01:57 +00:00
- unless @artist.artist_links.empty?
2011-09-26 13:34:18 +00:00
.service-icons
2011-11-26 15:03:33 +00:00
%a.foreign-link{ href: "http://last.fm/artist/#{@artist.name.gsub(" ", "+")}", target: '_blank' }
= image_tag 'services/lastfm.ico'
2011-10-20 11:01:57 +00:00
- @artist.artist_links.each do |service|
- if ['wikipedia', 'microblog', 'official_homepage', 'social_network', 'youtube'].include?(service.service)
2011-11-26 15:03:33 +00:00
%a.foreign-link{ href: service.url, target: '_blank' }
2011-09-26 13:34:18 +00:00
= image_tag 'services/'+service.service+(service.service == 'official_homepage' ? '.png' : '.ico')
2011-09-08 01:48:33 +00:00
2011-11-26 20:56:09 +00:00
.row
.span7.offset4
%h3= t('player.playlists')
%table.zebra-striped
%tr
%td
%span.label.success.dynamic-playlist{ href: "", 'data-playlist' => "lastfm-top50/#{@artist.id}" }= t('player.set_playlist')
%a.playlist-name{ href: "", 'data-playlist' => "lastfm-top50/#{@artist.id}" }= "#{@artist.name}: Last.fm TOP"
- @artist.playlists.each do |playlist|
2011-11-26 15:03:33 +00:00
%tr
- @artist.playlists.each do |playlist|
%td
2011-11-26 15:38:50 +00:00
%span.label.success.set-playlist{ href: "", 'data-playlist-id' => playlist.id }= t('player.set_playlist')
%a.playlist-name{ href: "", 'data-playlist-id' => playlist.id }= playlist.name
2011-09-09 22:13:02 +00:00
2011-10-20 11:01:57 +00:00
- @artist.albums.each do |album|
2011-09-08 01:48:33 +00:00
.row.album
.span4.columns.art
2011-11-26 15:03:33 +00:00
%img{ src: album.pic_url }
2011-09-08 01:48:33 +00:00
.button-container
2011-11-26 15:38:50 +00:00
%a.btn.add-album{ 'data-album-id' => album.id }= t('player.add')
2011-09-08 01:48:33 +00:00
.span7.columns.tracks
2011-11-26 15:03:33 +00:00
%h3{ 'data-album-id' => album.id }
2011-11-23 22:41:05 +00:00
= album.name
%small= " ("+album.year.to_s+")"
2011-09-08 01:48:33 +00:00
%table.zebra-striped.tracklist
2011-10-20 11:01:57 +00:00
- album.tracks.each do |track|
2011-11-23 23:37:41 +00:00
%tr{ class: (track.available == false ? "unavailable" : nil) }
2011-10-20 11:01:57 +00:00
%td.song-title= track.name
2011-09-26 13:34:18 +00:00
%td.song-duration
2011-10-20 11:01:57 +00:00
.s-duration= (track.duration != '0:00' ? track.duration : ' '.html_safe)
2011-11-26 15:38:50 +00:00
%span.label.success.s-add{ 'data-album-id' => album.id, 'data-id' => track.id }= t('player.add_one')