- <% if ((can? :edit, picture) && (picture.user_id == current_user.id || current_user.role?(:admin) )) %>
- <%= link_to(edit_picture_path(picture, :album_id => @album.id, :imageable_id => @album.id, :imageable_type => 'Album'),
- class: "button-sm") do %>
-
- <% end %>
- <% end %>
- <% if ((can? :destroy, picture) && (@album.user_id == current_user.id || current_user.role?(:admin) )) %>
- <%= link_to(picture, class: "button-sm-danger",
- :data => { :confirm => "Are you sure you want to delete #{picture.name}?" }, :method => :delete) do %>
-
- <% end %>
- <% end %>
- <%= link_to(picture_path(picture)) do %>
-
- <% end %>
-
-
<%= picture.description %>
- <%= picture.date_taken %>
-
-