diff lib/redmine/wiki_formatting/macros.rb @ 1517:dffacf8a6908 redmine-2.5

Update to Redmine SVN revision 13367 on 2.5-stable branch
author Chris Cannam
date Tue, 09 Sep 2014 09:29:00 +0100
parents e248c7af89ec
children
line wrap: on
line diff
--- a/lib/redmine/wiki_formatting/macros.rb	Tue Sep 09 09:28:31 2014 +0100
+++ b/lib/redmine/wiki_formatting/macros.rb	Tue Sep 09 09:29:00 2014 +0100
@@ -221,7 +221,7 @@
         out = ''.html_safe
         out << link_to_function(show_label, js, :id => "#{html_id}-show", :class => 'collapsible collapsed')
         out << link_to_function(hide_label, js, :id => "#{html_id}-hide", :class => 'collapsible', :style => 'display:none;')
-        out << content_tag('div', textilizable(text, :object => obj), :id => html_id, :class => 'collapsed-text', :style => 'display:none;')
+        out << content_tag('div', textilizable(text, :object => obj, :headings => false), :id => html_id, :class => 'collapsed-text', :style => 'display:none;')
         out
       end
 
@@ -236,8 +236,11 @@
         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)
+          thumbnail_url = url_for(:controller => 'attachments', :action => 'thumbnail', :id => attachment, :size => size, :only_path => false)
+          image_url = url_for(:controller => 'attachments', :action => 'show', :id => attachment, :only_path => false)
+
+          img = image_tag(thumbnail_url, :alt => attachment.filename)
+          link_to(img, image_url, :class => 'thumbnail', :title => title)
         else
           raise "Attachment #{filename} not found"
         end