Use named route with attachment filename for inline images.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11189 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
6ce28450c0
commit
2230c11baa
2 files changed
+10
-11
No files matched your search
@@ -559,8 +559,7 @@ module ApplicationHelper
|
||||
filename, ext, alt, alttext = $1.downcase, $2, $3, $4
|
||||
# search for the picture in attachments
|
||||
if found = Attachment.latest_attach(attachments, filename)
|
||||
image_url = url_for :only_path => only_path, :controller => 'attachments',
|
||||
:action => 'download', :id => found
|
||||
image_url = download_named_attachment_path(found, found.filename, :only_path => only_path)
|
||||
desc = found.description.to_s.gsub('"', '')
|
||||
if !desc.blank? && alttext.blank?
|
||||
alt = " title=\"#{desc}\" alt=\"#{desc}\""
|
||||
|
||||
Reference in new issue
Block a user