]> source.dussan.org Git - redmine.git/commitdiff
Hires (2x DPR) image support for Thumbnails (#24927).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 30 Jan 2017 19:41:31 +0000 (19:41 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 30 Jan 2017 19:41:31 +0000 (19:41 +0000)
Patch by Jan Schulz-Hofen.

git-svn-id: http://svn.redmine.org/redmine/trunk@16314 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/application_helper.rb

index ced854693efa9be0fff926848ab619d1e680bfe5..c432472bcafd3e636399b218d91e5d0d9032b12b 100644 (file)
@@ -220,7 +220,7 @@ module ApplicationHelper
   end
 
   def thumbnail_tag(attachment)
-    link_to image_tag(thumbnail_path(attachment)),
+    link_to image_tag(thumbnail_path(attachment), :srcset => "#{thumbnail_path(attachment, :size => Setting.thumbnails_size.to_i * 2)} 2x"),
       named_attachment_path(attachment, attachment.filename),
       :title => attachment.filename
   end