Patch #21550 » parse_redmine_links_force_download_option.diff
app/helpers/application_helper.rb | ||
---|---|---|
860 | 860 |
when 'attachment' |
861 | 861 |
attachments = options[:attachments] || [] |
862 | 862 |
attachments += obj.attachments if obj.respond_to?(:attachments) |
863 |
is_download_link = (options[:is_download_link] != false) |
|
863 | 864 |
if attachments && attachment = Attachment.latest_attach(attachments, name) |
864 |
link = link_to_attachment(attachment, :only_path => only_path, :download => true, :class => 'attachment')
|
|
865 |
link = link_to_attachment(attachment, :only_path => only_path, :download => is_download_link, :class => 'attachment')
|
|
865 | 866 |
end |
866 | 867 |
when 'project' |
867 | 868 |
if p = Project.visible.where("identifier = :s OR LOWER(name) = :s", :s => name.downcase).first |