photomix/app/views/collections/show.html.erb

22 lines
825 B
Plaintext
Raw Normal View History

2009-06-11 13:05:09 +02:00
<h2><%= h @collection.title %></h2>
2009-06-03 22:12:11 +02:00
<p><%= h @collection.description %></p>
2009-06-11 13:05:09 +02:00
<% for album in @collection.albums %>
<div class="row">
<div class="title">
<%= render :partial => "photos/thumb", :locals => {:photo => album.photos.first } unless album.photos.empty? %>
2009-06-11 13:05:09 +02:00
<p><%= link_to album.title, collection_album_path(@collection, album) %></p>
</div>
<div class="image">
<%= render :partial => "photos/thumb", :collection => album.photos.find(:all, :limit => 5, :offset => 1), :as => :photo %>
</div>
</div>
<% end %>
2009-06-16 21:43:03 +02:00
<% content_for :action_links do %>
2009-06-09 00:30:22 +02:00
<% if has_role?("admin") %>
2009-06-20 16:30:54 +02:00
<%= link_to "PDF", collection_path(@collection, :format => 'pdf') %> |&nbsp;
2009-06-16 21:43:03 +02:00
<%= link_to "Edit collection", edit_collection_path(@collection) %> |
<%= link_to "New album", new_collection_album_path(@collection) %>
<% end %>
2009-06-16 21:43:03 +02:00
<% end %>