2009-06-11 13:05:09 +02:00
|
|
|
<h2><%= @album.title %></h2>
|
|
|
|
|
|
|
|
<div id="multipleimages">
|
|
|
|
<table>
|
|
|
|
<% count = 0.0 %>
|
|
|
|
<% for photo in @album.photos.find(:all, :order => "Id ASC") %>
|
|
|
|
<% count += 1%>
|
|
|
|
<% if count == 1 || ( (count-1) / 4.0 == ( (count-1) / 4.0).to_i ) %><tr><% end %>
|
2010-04-13 21:10:40 +02:00
|
|
|
<td><%= link_to image_tag( photo.file.preview.url ), [@album.collections.first, @album, photo] %></td>
|
2009-06-11 13:05:09 +02:00
|
|
|
<% if count / 4.0 == (count / 4.0).to_i %></tr><% end %>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
2009-06-05 14:18:03 +02:00
|
|
|
<p><%= @album.description %></p>
|
2009-07-06 23:38:20 +02:00
|
|
|
|
|
|
|
<% unless @album.photo_tags.empty? %>
|
2009-06-30 21:24:06 +02:00
|
|
|
<p>Tagged with:
|
|
|
|
<% for tag in @album.photo_tags.map{|tag|tag.title}.sort %>
|
2009-08-10 22:17:58 +02:00
|
|
|
<%= link_to tag, album_tag_photos_path(@album, tag) %>
|
2009-06-30 21:24:06 +02:00
|
|
|
<% end %>
|
|
|
|
</p>
|
2009-07-06 23:38:20 +02:00
|
|
|
<% end %>
|
2009-06-16 21:43:03 +02:00
|
|
|
|
2009-08-10 22:17:58 +02:00
|
|
|
<% unless @album.collections.empty? %>
|
|
|
|
<p>Part of:
|
|
|
|
<% for collection in @album.collections.find(:all, :order => 'title') %>
|
|
|
|
<%= link_to collection.title, collection_path(collection) %>
|
|
|
|
<% end %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
2009-06-16 21:43:03 +02:00
|
|
|
<% if has_role?("admin") %>
|
|
|
|
<p><%= @album.address %></p>
|
|
|
|
<% end %>
|
|
|
|
<% if has_role?("admin") %>
|
2009-06-05 14:18:03 +02:00
|
|
|
<p><%= @album.note %></p>
|
|
|
|
<% end %>
|
2009-05-25 21:39:43 +02:00
|
|
|
|
2009-08-10 22:17:58 +02:00
|
|
|
|
|
|
|
|
2011-04-25 07:54:40 +02:00
|
|
|
<%= content_for :action_links do %>
|
2009-06-09 00:30:22 +02:00
|
|
|
<% if has_role?("admin") %>
|
2010-10-11 17:47:50 +02:00
|
|
|
<% if params[:collection_id] %>
|
|
|
|
<%= link_to "PDF", collection_album_path(params[:collection_id],@album, :format => 'pdf') %> |
|
|
|
|
<%= link_to "Edit album", edit_collection_album_path(params[:collection_id],@album) %> |
|
|
|
|
<%= link_to "Edit all photos", edit_multiple_collection_album_photos_path(params[:collection_id],@album) %> |
|
|
|
|
<%= link_to "Edit untouched photos", untouched_collection_album_photos_path(params[:collection_id], @album) %> |
|
|
|
|
<%= link_to "Add photos", upload_collection_album_photos_path(params[:collection_id], @album) %>
|
|
|
|
<% else %>
|
2009-06-20 16:30:54 +02:00
|
|
|
<%= link_to "PDF", album_path(@album, :format => 'pdf') %> |
|
2009-06-16 21:43:03 +02:00
|
|
|
<%= link_to "Edit album", edit_album_path(@album) %> |
|
|
|
|
<%= link_to "Edit all photos", edit_multiple_album_photos_path(@album) %> |
|
2009-06-28 18:02:19 +02:00
|
|
|
<%= link_to "Edit untouched photos", untouched_album_photos_path(@album) %> |
|
2010-10-11 17:47:50 +02:00
|
|
|
<%= link_to "Add photos", upload_album_photos_path(@album) %>
|
|
|
|
<% end %>
|
|
|
|
|
2009-06-09 00:30:22 +02:00
|
|
|
<% end %>
|
2010-10-11 16:03:34 +02:00
|
|
|
<% end %>
|