1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-03-11 03:33:07 +00:00

Merged r16813 (#26379).

git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@16819 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2017-07-16 11:49:22 +00:00
parent e57b5ddbcc
commit 742440e038

View File

@ -220,11 +220,12 @@ module ApplicationHelper
end
def thumbnail_tag(attachment)
thumbnail_size = Setting.thumbnails_size.to_i
link_to(
image_tag(
thumbnail_path(attachment),
:srcset => "#{thumbnail_path(attachment, :size => Setting.thumbnails_size.to_i * 2)} 2x",
:width => Setting.thumbnails_size
:srcset => "#{thumbnail_path(attachment, :size => thumbnail_size * 2)} 2x",
:style => "max-width: #{thumbnail_size}px; max-height: #{thumbnail_size}px;"
),
named_attachment_path(
attachment,