Project

General

Profile

Defect #16989 ยป Fix thubmnail macro images to show inline in emails.macros.rb.patch

Bahri Yardim, 2014-05-27 11:16

View differences:

trunk/lib/redmine/wiki_formatting/macros.rb (working copy)
236 236
        size = nil unless size > 0
237 237
        if obj && obj.respond_to?(:attachments) && attachment = Attachment.latest_attach(obj.attachments, filename)
238 238
          title = options[:title] || attachment.title
239
          img = image_tag(url_for(:controller => 'attachments', :action => 'thumbnail', :id => attachment, :size => size), :alt => attachment.filename)
240
          link_to(img, url_for(:controller => 'attachments', :action => 'show', :id => attachment), :class => 'thumbnail', :title => title)
239
          img = image_tag(url_for(:only_path => false, :controller => 'attachments', :action => 'thumbnail', :id => attachment, :size => size), :alt => attachment.filename)
240
          link_to(img, url_for(:only_path => false, :controller => 'attachments', :action => 'show', :id => attachment), :class => 'thumbnail', :title => title)
241 241
        else
242 242
          raise "Attachment #{filename} not found"
243 243
        end
    (1-1/1)