fix attachment link has get parameter :class (#10602)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9327 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f277f127c6
commit
8828c0f13e
|
@ -97,9 +97,11 @@ module ApplicationHelper
|
||||||
def link_to_attachment(attachment, options={})
|
def link_to_attachment(attachment, options={})
|
||||||
text = options.delete(:text) || attachment.filename
|
text = options.delete(:text) || attachment.filename
|
||||||
action = options.delete(:download) ? 'download' : 'show'
|
action = options.delete(:download) ? 'download' : 'show'
|
||||||
|
opt_only_path = {}
|
||||||
|
opt_only_path[:only_path] = (options[:only_path] == false ? false : true)
|
||||||
link_to(h(text),
|
link_to(h(text),
|
||||||
{:controller => 'attachments', :action => action,
|
{:controller => 'attachments', :action => action,
|
||||||
:id => attachment, :filename => attachment.filename }.merge(options),
|
:id => attachment, :filename => attachment.filename}.merge(opt_only_path),
|
||||||
options)
|
options)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue