@@ -295,23 +295,31 module IssuesHelper | |||||
295 | users |
|
295 | users | |
296 | end |
|
296 | end | |
297 |
|
297 | |||
298 | def email_issue_attributes(issue, user) |
|
298 | def email_issue_attributes(issue, user, html) | |
299 | items = [] |
|
299 | items = [] | |
300 | %w(author status priority assigned_to category fixed_version).each do |attribute| |
|
300 | %w(author status priority assigned_to category fixed_version).each do |attribute| | |
301 | unless issue.disabled_core_fields.include?(attribute+"_id") |
|
301 | unless issue.disabled_core_fields.include?(attribute+"_id") | |
|
302 | if html | |||
|
303 | items << content_tag('strong', "#{l("field_#{attribute}")}: ") + (issue.send attribute) | |||
|
304 | else | |||
302 | items << "#{l("field_#{attribute}")}: #{issue.send attribute}" |
|
305 | items << "#{l("field_#{attribute}")}: #{issue.send attribute}" | |
303 | end |
|
306 | end | |
304 | end |
|
307 | end | |
|
308 | end | |||
305 | issue.visible_custom_field_values(user).each do |value| |
|
309 | issue.visible_custom_field_values(user).each do |value| | |
|
310 | if html | |||
|
311 | items << content_tag('strong', "#{value.custom_field.name}: ") + show_value(value, false) | |||
|
312 | else | |||
306 | items << "#{value.custom_field.name}: #{show_value(value, false)}" |
|
313 | items << "#{value.custom_field.name}: #{show_value(value, false)}" | |
307 | end |
|
314 | end | |
|
315 | end | |||
308 | items |
|
316 | items | |
309 | end |
|
317 | end | |
310 |
|
318 | |||
311 | def render_email_issue_attributes(issue, user, html=false) |
|
319 | def render_email_issue_attributes(issue, user, html=false) | |
312 | items = email_issue_attributes(issue, user) |
|
320 | items = email_issue_attributes(issue, user, html) | |
313 | if html |
|
321 | if html | |
314 | content_tag('ul', items.map{|s| content_tag('li', s)}.join("\n").html_safe) |
|
322 | content_tag('ul', items.map{|s| content_tag('li', s)}.join("\n").html_safe, :class => "details") | |
315 | else |
|
323 | else | |
316 | items.map{|s| "* #{s}"}.join("\n") |
|
324 | items.map{|s| "* #{s}"}.join("\n") | |
317 | end |
|
325 | end |
@@ -38,6 +38,7 pre { | |||||
38 | overflow-x: auto; |
|
38 | overflow-x: auto; | |
39 | overflow-y: hidden; |
|
39 | overflow-y: hidden; | |
40 | } |
|
40 | } | |
|
41 | ul.details {color:#959595; margin-bottom: 1.5em;} | |||
41 | </style> |
|
42 | </style> | |
42 | </head> |
|
43 | </head> | |
43 | <body> |
|
44 | <body> |
@@ -2,8 +2,9 | |||||
2 | (<%= l(:field_private_notes) %>) |
|
2 | (<%= l(:field_private_notes) %>) | |
3 | <% end %> |
|
3 | <% end %> | |
4 | <%= l(:text_issue_updated, :id => link_to("##{@issue.id}", @issue_url), :author => h(@journal.user)).html_safe %> |
|
4 | <%= l(:text_issue_updated, :id => link_to("##{@issue.id}", @issue_url), :author => h(@journal.user)).html_safe %> | |
|
5 | <hr /> | |||
5 |
|
6 | |||
6 | <ul> |
|
7 | <ul class="details"> | |
7 | <% details_to_strings(@journal_details, false, :only_path => false).each do |string| %> |
|
8 | <% details_to_strings(@journal_details, false, :only_path => false).each do |string| %> | |
8 | <li><%= string %></li> |
|
9 | <li><%= string %></li> | |
9 | <% end %> |
|
10 | <% end %> |
General Comments 0
You need to be logged in to leave comments.
Login now