Defect #16989 ยป Fix thubmnail macro images to show inline in emails.macros.rb.patch
| trunk/lib/redmine/wiki_formatting/macros.rb (working copy) | ||
|---|---|---|
|
size = nil unless size > 0
|
||
|
if obj && obj.respond_to?(:attachments) && attachment = Attachment.latest_attach(obj.attachments, filename)
|
||
|
title = options[:title] || attachment.title
|
||
|
img = image_tag(url_for(:controller => 'attachments', :action => 'thumbnail', :id => attachment, :size => size), :alt => attachment.filename)
|
||
|
link_to(img, url_for(:controller => 'attachments', :action => 'show', :id => attachment), :class => 'thumbnail', :title => title)
|
||
|
img = image_tag(url_for(:only_path => false, :controller => 'attachments', :action => 'thumbnail', :id => attachment, :size => size), :alt => attachment.filename)
|
||
|
link_to(img, url_for(:only_path => false, :controller => 'attachments', :action => 'show', :id => attachment), :class => 'thumbnail', :title => title)
|
||
|
else
|
||
|
raise "Attachment #{filename} not found"
|
||
|
end
|
||