remove "del" tag from deleted issue relation (#1005)

It is confused with deleted issue.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11886 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2013-05-19 02:09:49 +00:00
parent 1f9e1ca318
commit b3a6555b30
2 changed files with 5 additions and 3 deletions

View File

@ -328,7 +328,9 @@ module IssuesHelper
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])

View File

@ -232,7 +232,7 @@ class IssuesHelperTest < ActionView::TestCase
: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&#x27;t print recipes</i></del>\)},
assert_match %r{<strong>Precedes</strong> deleted \(<i><a href="/issues/1" class=".+">Bug #1</a>: Can&#x27;t print recipes</i>\)},
show_detail(detail, false)
non_existed_issue_number = 9999
assert_nil Issue.find_by_id(non_existed_issue_number)
@ -240,6 +240,6 @@ class IssuesHelperTest < ActionView::TestCase
: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