<%= link_to_if @next, image_tag(@photo.attachment.single.url), [@photo.album.collections.first, @photo.album, @next] %>
<%= @photo.description %>
Tagged with: <% for tag in @photo.tags.map { |tag| tag.title }.sort %> <%= link_to tag, tag_photos_path(tag) %> <% end %> <%= content_for :action_links do %> <% if current_user and current_user.has_role?("admin") %> <% if params[:collection_id] %> <%= link_to "Edit photo", edit_collection_album_photo_path(params[:collection_id], params[:album_id], @photo) %> <% else %> <%= link_to "Edit photo", edit_photo_path(@photo) %> <% end %> <% end %> <% end %>