1
0
Fork 0
oldhaven/app/views/artist/view.rhtml

29 lines
1008 B
Plaintext
Raw Normal View History

<% if @artist.nil? %>
<div class="search">
<h1>We don`t know such artist yet..</h1>
<%= link_to "Try again", main_path %>
2011-04-05 22:58:11 +00:00
</div>
<% else %>
<h1 class="artist"><%= @artist.name %></h1>
2011-04-12 02:46:07 +00:00
<% @albums.each do |album| %>
<div class="album">
2011-04-12 02:46:07 +00:00
<div class="pic"><img src="<%= album[:object].cover(@artist.name) %>" width="250" height="250" alt=""/></div>
<h3 class="name"><%= album[:object].name %> <%= (album[:object].year ? album[:object].year : '') %></h3>
<ul class="tracks">
2011-04-12 02:46:07 +00:00
<% album[:tracks].each do |track| %>
<li id="<%= track[:object].id %>">
<span class="play<%= (track[:in_db].nil? ? '' : ' disabled') %>">
<img src="/images/player/play.svg" alt="play" />
</span>
<span class="track-name"><%= track[:object].name %></span>
<% unless track[:object].length.nil? %>
<span class="duration" data-length="<%= track[:object].length %>"><%= track[:object].length.toTime %></span>
2011-04-11 16:49:25 +00:00
<% end %>
</li>
<% end %>
</ul>
</div>
2011-04-05 22:58:11 +00:00
<% end %>
<% end %>