|
|
|
@ -340,17 +340,18 @@ module IssuesHelper
|
|
|
|
|
if detail.property == 'attachment' && !value.blank? && atta = Attachment.find_by_id(detail.prop_key)
|
|
|
|
|
# Link to the attachment if it has not been removed
|
|
|
|
|
if options[:token].nil?
|
|
|
|
|
value = link_to_attachment(atta, :download => true, :only_path => options[:only_path], :class=> "info_foot_num c_blue")
|
|
|
|
|
value = atta.filename
|
|
|
|
|
else
|
|
|
|
|
value = link_to_attachment(atta, :download => true, :only_path => options[:only_path], :token => options[:token], :class=> "info_foot_num c_blue")
|
|
|
|
|
end
|
|
|
|
|
if options[:only_path] != false && atta.is_text?
|
|
|
|
|
value += link_to(
|
|
|
|
|
image_tag('magnifier.png'),
|
|
|
|
|
:controller => 'attachments', :action => 'show',
|
|
|
|
|
:id => atta, :filename => atta.filename
|
|
|
|
|
)
|
|
|
|
|
value = atta.filename
|
|
|
|
|
end
|
|
|
|
|
# 放大镜搜索功能
|
|
|
|
|
# if options[:only_path] != false && atta.is_text?
|
|
|
|
|
# value += link_to(
|
|
|
|
|
# image_tag('magnifier.png'),
|
|
|
|
|
# :controller => 'attachments', :action => 'show',
|
|
|
|
|
# :id => atta, :filename => atta.filename
|
|
|
|
|
# )
|
|
|
|
|
# end
|
|
|
|
|
else
|
|
|
|
|
value = content_tag("i", h(value)) if value
|
|
|
|
|
end
|
|
|
|
|