Unified diff viewer for attached files with .patch or .diff extension (#1403).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1516 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-06-08 18:26:39 +00:00
parent e833cab30e
commit d77c1d2829
7 changed files with 37 additions and 5 deletions
+4
View File
@@ -22,4 +22,8 @@ module AttachmentsHelper
render :partial => 'attachments/links', :locals => {:attachments => attachments, :options => options}
end
end
def to_utf8(str)
str
end
end
+1 -1
View File
@@ -91,7 +91,7 @@ module IssuesHelper
old_value = content_tag("strike", old_value) if detail.old_value and (!detail.value or detail.value.empty?)
if detail.property == 'attachment' && !value.blank? && Attachment.find_by_id(detail.prop_key)
# Link to the attachment if it has not been removed
value = link_to(value, :controller => 'attachments', :action => 'download', :id => detail.prop_key)
value = link_to(value, :controller => 'attachments', :action => 'show', :id => detail.prop_key)
else
value = content_tag("i", h(value)) if value
end