% if image.gallery? && options[:gallery_view] %> <% images = image.parent.images current_index = images.index(image.encapsulated_file) total_of_images = images.count link_to_previous = if current_index >= 1 link_to(_('« Previous'), images[current_index - 1].view_url, :class => 'previous') else content_tag('span', _('« Previous'), :class => 'previous') end link_to_next = if current_index < total_of_images - 1 link_to(_('Next »'), images[current_index + 1].view_url, :class => 'next') else content_tag('span', _('Next »'), :class => 'next') end %>
<% end %> <%# image_tag(article.public_filename(:display), :class => article.css_class_name, :style => 'max-width: 100%') %>