2009-06-28 18:02:19 +02:00
|
|
|
<% for album in @albums %>
|
|
|
|
<div class="row">
|
|
|
|
<div class="title">
|
|
|
|
<%= render :partial => "photos/thumb", :locals => {:photo => album.photos.first } unless album.photos.empty? %>
|
|
|
|
<p><%= link_to album.title, 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-04 22:28:28 +02:00
|
|
|
|
2011-04-25 07:54:40 +02:00
|
|
|
<%= content_for :action_links do %>
|
2009-06-28 18:02:19 +02:00
|
|
|
<%= link_to "Show just the photos tagged with #{params[:q]}", photos_path(:q => params[:q]) if params[:q] %>
|
|
|
|
<% if has_role?("admin") %>
|
|
|
|
<%= " | " if params[:q] %>
|
|
|
|
<%= link_to "New album", new_album_path() %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|