##// END OF EJS Templates
Use helper....
Jean-Philippe Lang -
r10960:1386c10074f9
parent child
Show More
@@ -775,8 +775,7 module ApplicationHelper
775 when 'attachment'
775 when 'attachment'
776 attachments = options[:attachments] || (obj && obj.respond_to?(:attachments) ? obj.attachments : nil)
776 attachments = options[:attachments] || (obj && obj.respond_to?(:attachments) ? obj.attachments : nil)
777 if attachments && attachment = attachments.detect {|a| a.filename == name }
777 if attachments && attachment = attachments.detect {|a| a.filename == name }
778 link = link_to h(attachment.filename), {:only_path => only_path, :controller => 'attachments', :action => 'download', :id => attachment},
778 link = link_to_attachment(attachment, :only_path => only_path, :download => true, :class => 'attachment')
779 :class => 'attachment'
780 end
779 end
781 when 'project'
780 when 'project'
782 if p = Project.visible.where("identifier = :s OR LOWER(name) = :s", :s => name.downcase).first
781 if p = Project.visible.where("identifier = :s OR LOWER(name) = :s", :s => name.downcase).first
General Comments 0
You need to be logged in to leave comments. Login now