mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-11 18:11:32 +00:00
Use journalized attachments to prevent a query when displaying added file.
git-svn-id: http://svn.redmine.org/redmine/trunk@13937 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
726a9aa809
commit
e3ffb1f23b
@ -356,7 +356,8 @@ module IssuesHelper
|
||||
if detail.old_value && detail.value.blank? && detail.property != 'relation'
|
||||
old_value = content_tag("del", old_value)
|
||||
end
|
||||
if detail.property == 'attachment' && !value.blank? && atta = Attachment.find_by_id(detail.prop_key)
|
||||
if detail.property == 'attachment' && value.present? &&
|
||||
atta = detail.journal.journalized.attachments.detect {|a| a.id == detail.prop_key.to_i}
|
||||
# Link to the attachment if it has not been removed
|
||||
value = link_to_attachment(atta, :download => true, :only_path => options[:only_path])
|
||||
if options[:only_path] != false && atta.is_text?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user