Permalink
Browse files

When click on thumbnail open preview

  • Loading branch information...
1 parent c970992 commit 43c0671d10468805a34f2ab4171642293faea62b @nodecarter nodecarter committed Jan 29, 2013
Showing with 6 additions and 1 deletion.
  1. +1 −1 app/views/attachments/_links.html.erb
  2. +5 −0 lib/redmine_lightbox/patches/issues_helper_patch.rb
@@ -20,7 +20,7 @@
<% if images.any? %>
<div class="thumbnails">
<% images.each do |attachment| %>
- <div><%= thumbnail_tag(attachment) %></div>
+ <div><%= thumbnail_with_preview_tag(attachment) %></div>
<% end %>
</div>
<% end %>
@@ -16,6 +16,11 @@ def link_to_attachment_with_preview(attachment, options = {})
raw("#{download_link} #{preview_link_with(attachment, preview_button)}")
end
+ def thumbnail_with_preview_tag(attachment)
+ preview_link_with(attachment,
+ image_tag(url_for(:controller => 'attachments', :action => 'thumbnail', :id => attachment)))
+ end
+
def show_detail_with_only_path_disabled(detail, no_html = false, options={})
show_detail_without_only_path_disabled(detail, no_html, options.merge(:only_path => false))
end

0 comments on commit 43c0671

Please sign in to comment.