<%= @album.title %>

<% 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 ) %><% end %> <% if count / 4.0 == (count / 4.0).to_i %><% end %> <% end %>
<%= link_to image_tag( photo.path_modified_public("preview") ), [@album.collections.first, @album, photo] %>

<%= @album.description %>

<% if has_permission?("see_album_note") %>

<%= @album.note %>

<% end %> <% if has_role?("admin") %>
<%= link_to "Update album", edit_album_path(@album) %>
<%= link_to "Update photos", edit_multiple_album_photos_path(@album) %>
<%= link_to "Upload photos", upload_album_photos_path(@album) %> <% end %>
<%= link_to "All albums", albums_path %>