unless no_html
label = content_tag('strong', label)
old_value = content_tag("i", h(old_value)) if detail.old_value
- old_value = content_tag("del", old_value) if detail.old_value and detail.value.blank?
+ 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)
# Link to the attachment if it has not been removed
value = link_to_attachment(atta, :download => true, :only_path => options[:only_path])
:prop_key => 'label_precedes',
:old_value => 1)
assert_equal "Precedes deleted (Bug #1: Can't print recipes)", show_detail(detail, true)
- assert_match %r{<strong>Precedes</strong> deleted \(<del><i><a href="/issues/1" class=".+">Bug #1</a>: Can't print recipes</i></del>\)},
+ assert_match %r{<strong>Precedes</strong> deleted \(<i><a href="/issues/1" class=".+">Bug #1</a>: Can't print recipes</i>\)},
show_detail(detail, false)
non_existed_issue_number = 9999
assert_nil Issue.find_by_id(non_existed_issue_number)
:prop_key => 'label_precedes',
:old_value => non_existed_issue_number)
assert_equal "Precedes deleted (Issue 9999)", show_detail(detail, true)
- assert_equal "<strong>Precedes</strong> deleted (<del><i>Issue 9999</i></del>)", show_detail(detail, false)
+ assert_equal "<strong>Precedes</strong> deleted (<i>Issue 9999</i>)", show_detail(detail, false)
end
end