diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-12-16 08:53:52 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-12-16 08:53:52 +0000 |
commit | e8e92ca054af52a036eda4c4db0f9b55e02a33d8 (patch) | |
tree | e3e03a819cd81a5afedf0f661aa9aadf31a272fc /app/helpers/issues_helper.rb | |
parent | 831a2d58aba5cc01947590ffff3705d4254ca300 (diff) | |
download | redmine-e8e92ca054af52a036eda4c4db0f9b55e02a33d8.tar.gz redmine-e8e92ca054af52a036eda4c4db0f9b55e02a33d8.zip |
Make the email notifications for adding/updating issues more readable/clear (#23978).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@16087 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/issues_helper.rb')
-rw-r--r-- | app/helpers/issues_helper.rb | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 15b4587d7..122c2ffca 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -295,23 +295,31 @@ module IssuesHelper users end - def email_issue_attributes(issue, user) + def email_issue_attributes(issue, user, html) items = [] %w(author status priority assigned_to category fixed_version).each do |attribute| unless issue.disabled_core_fields.include?(attribute+"_id") - items << "#{l("field_#{attribute}")}: #{issue.send attribute}" + if html + items << content_tag('strong', "#{l("field_#{attribute}")}: ") + (issue.send attribute) + else + items << "#{l("field_#{attribute}")}: #{issue.send attribute}" + end end end issue.visible_custom_field_values(user).each do |value| - items << "#{value.custom_field.name}: #{show_value(value, false)}" + if html + items << content_tag('strong', "#{value.custom_field.name}: ") + show_value(value, false) + else + items << "#{value.custom_field.name}: #{show_value(value, false)}" + end end items end def render_email_issue_attributes(issue, user, html=false) - items = email_issue_attributes(issue, user) + items = email_issue_attributes(issue, user, html) if html - content_tag('ul', items.map{|s| content_tag('li', s)}.join("\n").html_safe) + content_tag('ul', items.map{|s| content_tag('li', s)}.join("\n").html_safe, :class => "details") else items.map{|s| "* #{s}"}.join("\n") end |