mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
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
This commit is contained in:
parent
831a2d58ab
commit
e8e92ca054
@ -295,23 +295,31 @@ module IssuesHelper
|
|||||||
users
|
users
|
||||||
end
|
end
|
||||||
|
|
||||||
def email_issue_attributes(issue, user)
|
def email_issue_attributes(issue, user, html)
|
||||||
items = []
|
items = []
|
||||||
%w(author status priority assigned_to category fixed_version).each do |attribute|
|
%w(author status priority assigned_to category fixed_version).each do |attribute|
|
||||||
unless issue.disabled_core_fields.include?(attribute+"_id")
|
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
|
||||||
end
|
end
|
||||||
issue.visible_custom_field_values(user).each do |value|
|
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
|
end
|
||||||
items
|
items
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_email_issue_attributes(issue, user, html=false)
|
def render_email_issue_attributes(issue, user, html=false)
|
||||||
items = email_issue_attributes(issue, user)
|
items = email_issue_attributes(issue, user, html)
|
||||||
if 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
|
else
|
||||||
items.map{|s| "* #{s}"}.join("\n")
|
items.map{|s| "* #{s}"}.join("\n")
|
||||||
end
|
end
|
||||||
|
|||||||
@ -38,6 +38,7 @@ pre {
|
|||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
}
|
}
|
||||||
|
ul.details {color:#959595; margin-bottom: 1.5em;}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@ -2,8 +2,9 @@
|
|||||||
(<%= l(:field_private_notes) %>)
|
(<%= l(:field_private_notes) %>)
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= l(:text_issue_updated, :id => link_to("##{@issue.id}", @issue_url), :author => h(@journal.user)).html_safe %>
|
<%= l(:text_issue_updated, :id => link_to("##{@issue.id}", @issue_url), :author => h(@journal.user)).html_safe %>
|
||||||
|
<hr />
|
||||||
|
|
||||||
<ul>
|
<ul class="details">
|
||||||
<% details_to_strings(@journal_details, false, :only_path => false).each do |string| %>
|
<% details_to_strings(@journal_details, false, :only_path => false).each do |string| %>
|
||||||
<li><%= string %></li>
|
<li><%= string %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user