2011-04-09 13:02:28 +00:00
|
|
|
<% 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>
|
2011-04-09 13:02:28 +00:00
|
|
|
<% else %>
|
2011-04-12 22:14:06 +00:00
|
|
|
<h1 class="artist">
|
|
|
|
<span>
|
|
|
|
<span><%= @artist.name %></span>
|
|
|
|
<span class="play"><img src="/images/player/add.svg" alt="play" /></span>
|
|
|
|
</span>
|
|
|
|
</h1>
|
2011-04-12 02:46:07 +00:00
|
|
|
<% @albums.each do |album| %>
|
2011-04-09 13:02:28 +00:00
|
|
|
<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>
|
2011-04-12 22:14:06 +00:00
|
|
|
<h3 class="name">
|
|
|
|
<span><%= album[:object].name %> <%= (album[:object].year ? album[:object].year : '') %></span>
|
|
|
|
<span class="play"><img src="/images/player/add.svg" alt="play" /></span>
|
|
|
|
</h3>
|
2011-04-09 13:02:28 +00:00
|
|
|
<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') %>">
|
2011-04-12 22:14:06 +00:00
|
|
|
<img src="/images/player/add.svg" alt="play" />
|
2011-04-12 02:46:07 +00:00
|
|
|
</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 %>
|
2011-04-09 13:02:28 +00:00
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2011-04-05 22:58:11 +00:00
|
|
|
<% end %>
|
2011-04-09 13:02:28 +00:00
|
|
|
<% end %>
|
|
|
|
|