修改缺陷:缺陷上传附件后,第一条回复中会显示附件。

dev_repository_hjq
huang 10 years ago
parent 5c2fdf7aee
commit b6f34045db

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

Loading…
Cancel
Save