Project

General

Profile

Defect #20466 » Outlook-Fix.patch

Benedikt Huss, 2015-08-11 09:01

View differences:

app/helpers/issues_helper.rb (working copy)
315 315

  
316 316
  def render_email_issue_attributes(issue, user, html=false)
317 317
    items = email_issue_attributes(issue, user)
318
    if html
319
      content_tag('ul', items.map{|s| content_tag('li', s)}.join("\n").html_safe)
320
    else
321
      items.map{|s| "* #{s}"}.join("\n")
318
	
319
	output = []
320
	
321
	if html
322
	  output << '<table>'
323
	  output << '<tr>'
324
	  output << '<td>'
325
	  output << '<ul>'
322 326
    end
327
	
328
	items.each do |i|
329
      if html
330
		output << '<li>'
331
		output << i
332
		output << '</li>'
333
      else
334
        output << '* #{i}'
335
      end
336
    end
337
	
338
	if html
339
	  output << '</ul>'
340
	  output << '</td>'
341
	  output << '</tr>'
342
	  output << '</table>'
343
	  output = content_tag('p', output.join("\n").html_safe) if html
344
	else 
345
	  output = output.join("\n")
346
	end
347
	
348
	return output 
323 349
  end
324 350

  
325 351
  # Returns the textual representation of a journal details
app/views/layouts/mailer.html.erb (working copy)
47 47
</style>
48 48
</head>
49 49
<body>
50

  
51
<!--[if gte mso 9]>
52
<table cellpadding="0" cellspacing="0" border="0" id="backgroundTable" align="center" style="background: #fff;">
53
<tr>
54
<td>
55

  
56
<table cellpadding="0" cellspacing="0" border="0" align="center">
57
<tr>
58
<td>
59

  
60
<![endif]-->
61

  
50 62
<div id="content">
51 63
<% if Setting.emails_header.present? -%>
52 64
<span class="header"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_header).html_safe %></span>
......
57 69
<span class="footer"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_footer).html_safe %></span>
58 70
<% end -%>
59 71
</div>
72

  
73
<!--[if gte mso 9]>
74
</td>
75
</tr>
76
</table>
77

  
78
</td>
79
</tr>
80
</table>
81
<![endif]-->
82

  
60 83
</body>
61 84
</html>
app/views/mailer/_issue.html.erb (working copy)
1 1
<h1><%= link_to("#{issue.tracker.name} ##{issue.id}: #{issue.subject}", issue_url) %></h1>
2 2

  
3
<!--[if gte mso 9]>
4
<br/>
5
<![endif]-->
6

  
3 7
<%= render_email_issue_attributes(issue, users.first, true) %>
4 8

  
5 9
<div class="description"><%= textilizable(issue, :description, :only_path => false) %></div>
app/views/mailer/issue_edit.html.erb (working copy)
3 3
<% end %>
4 4
<p class="author"><%= l(:text_issue_updated, :id => "##{@issue.id}", :author => h(@journal.user)) %></p>
5 5

  
6
<br/>
7

  
8
<table>
9
<tr>
10
<td>
6 11
<ul>
7 12
<% details_to_strings(@journal_details, false, :only_path => false).each do |string| %>
8
  <li><%= string %></li>
13
	<li><%= string %></li>
9 14
<% end %>
10 15
</ul>
16
</td>
17
</tr>
18
</table>
11 19

  
12 20
<div class="note"><%= textilizable(@journal, :notes, :only_path => false) %></div>
13 21
<hr />
app/views/mailer/reminder.html.erb (working copy)
1 1
<p><%= l(:mail_body_reminder, :count => @issues.size, :days => @days) %></p>
2 2

  
3
<table>
4
<tr>
5
<td>
3 6
<ul>
4 7
<% @issues.each do |issue| -%>
5 8
  <li><%= link_to_issue(issue, :project => true, :only_path => false) %></li>
6 9
<% end -%>
7 10
</ul>
11
</td>
12
</tr>
13
</table>
8 14

  
9 15
<p><%= link_to l(:label_issue_view_all), @issues_url %></p>
(4-4/4)