diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 02474ff..e7f3e1b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -860,8 +860,9 @@ module ApplicationHelper when 'attachment' attachments = options[:attachments] || [] attachments += obj.attachments if obj.respond_to?(:attachments) + is_download_link = (options[:is_download_link] != false) if attachments && attachment = Attachment.latest_attach(attachments, name) - link = link_to_attachment(attachment, :only_path => only_path, :download => true, :class => 'attachment') + link = link_to_attachment(attachment, :only_path => only_path, :download => is_download_link, :class => 'attachment') end when 'project' if p = Project.visible.where("identifier = :s OR LOWER(name) = :s", :s => name.downcase).first