Models refactoring, artist page draft

This commit is contained in:
magnolia-fan
2011-04-06 02:58:11 +04:00
parent d3d0f993c5
commit e14303c044
14 changed files with 18065 additions and 329 deletions
+22 -1
View File
@@ -1 +1,22 @@
<h1><%= @artist.name %></h1>
<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 %>