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

34 lines
1.1 KiB
Plaintext
Raw Normal View History

2012-07-24 23:26:16 +02:00
<h2><%= @photo.title %></h2>
2009-06-11 13:05:09 +02:00
<div id="fullimage">
2012-07-24 23:26:16 +02:00
<div id="navigation">
<p class="links">
<% unless @previous.nil? %>
<%= link_to "Previous", [@photo.album.collections.first, @photo.album, @previous] %>
<% unless @next.nil? %>
|
<% end %>
<% end %>
<% unless @next.nil? %>
<%= link_to "Next", [@photo.album.collections.first, @photo.album, @next] %>
<% end %>
</p>
</div>
<p><%= link_to_if @next, image_tag(@photo.attachment.single.url), [@photo.album.collections.first, @photo.album, @next] %></p>
2009-06-11 13:05:09 +02:00
</div>
2009-05-25 21:39:43 +02:00
<p><%= @photo.description %></p>
2012-07-24 23:26:16 +02:00
<p>Tagged with:
<% for tag in @photo.tags.map { |tag| tag.title }.sort %>
<%= link_to tag, tag_photos_path(tag) %>
<% end %>
2009-06-09 00:30:22 +02:00
2012-07-24 23:26:16 +02:00
<%= 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 %>
2009-06-16 21:43:03 +02:00
<% end %>