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

22 lines
571 B
Plaintext
Raw Normal View History

2011-04-05 22:58:11 +00:00
<h1 class="artist"><%= @artist.name %></h1>
<% @artist.albums.each do |album| %>
<% if album.releases.length > 0 %>
<div class="album">
<div class="pic"></div>
<h3 class="name"><%= album.name %> (<%= album.year %>)</h3>
<%
releases = album.releases
first_release = releases.first
%>
<ul class="tracks">
<% first_release.tracks.each do |track| %>
<li>
<span class="play"></span>
<span class="track-name"><%= track.name %></span>
<span class="duration"><%= track.length %></span>
</li>
<% end %>
</ul>
</div>
<% end %>
<% end %>