项目历史记录中“查看差别”:建议只有当issue描述内容更行时才“查看差别”,否则只显示一条更新记录即可

This commit is contained in:
huang 2017-01-20 09:08:26 +08:00
parent 113d7e9fc1
commit a8d25dab60
1 changed files with 7 additions and 5 deletions

View File

@ -416,11 +416,13 @@ module IssuesHelper
if detail.property == 'attr' && detail.prop_key == 'description' if detail.property == 'attr' && detail.prop_key == 'description'
s = l(:text_journal_changed_no_detail, :label => label) s = l(:text_journal_changed_no_detail, :label => label)
unless no_html unless no_html
diff_link = link_to l(:label_diff), if detail.try(:prop_key) == "description"
{:controller => 'journals', :action => 'diff', :id => detail.journal_id, diff_link = link_to l(:label_diff),
:detail_id => detail.id, :only_path => options[:only_path]}, {:controller => 'journals', :action => 'diff', :id => detail.journal_id,
:title => l(:label_view_diff) :detail_id => detail.id, :only_path => options[:only_path]},
s << " (#{ diff_link })" :title => l(:label_view_diff)
s << " (#{ diff_link })"
end
end end
s.html_safe s.html_safe
elsif detail.value.present? elsif detail.value.present?