Project

General

Profile

Defect #20466 » Outlook-Fix.patch

Benedikt Huss, 2015-08-11 09:01

View differences:

app/helpers/issues_helper.rb (working copy)
def render_email_issue_attributes(issue, user, html=false)
items = email_issue_attributes(issue, user)
if html
content_tag('ul', items.map{|s| content_tag('li', s)}.join("\n").html_safe)
else
items.map{|s| "* #{s}"}.join("\n")
output = []
if html
output << '<table>'
output << '<tr>'
output << '<td>'
output << '<ul>'
end
items.each do |i|
if html
output << '<li>'
output << i
output << '</li>'
else
output << '* #{i}'
end
end
if html
output << '</ul>'
output << '</td>'
output << '</tr>'
output << '</table>'
output = content_tag('p', output.join("\n").html_safe) if html
else
output = output.join("\n")
end
return output
end
# Returns the textual representation of a journal details
app/views/layouts/mailer.html.erb (working copy)
</style>
</head>
<body>
<!--[if gte mso 9]>
<table cellpadding="0" cellspacing="0" border="0" id="backgroundTable" align="center" style="background: #fff;">
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td>
<![endif]-->
<div id="content">
<% if Setting.emails_header.present? -%>
<span class="header"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_header).html_safe %></span>
......
<span class="footer"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_footer).html_safe %></span>
<% end -%>
</div>
<!--[if gte mso 9]>
</td>
</tr>
</table>
</td>
</tr>
</table>
<![endif]-->
</body>
</html>
app/views/mailer/_issue.html.erb (working copy)
<h1><%= link_to("#{issue.tracker.name} ##{issue.id}: #{issue.subject}", issue_url) %></h1>
<!--[if gte mso 9]>
<br/>
<![endif]-->
<%= render_email_issue_attributes(issue, users.first, true) %>
<div class="description"><%= textilizable(issue, :description, :only_path => false) %></div>
app/views/mailer/issue_edit.html.erb (working copy)
<% end %>
<p class="author"><%= l(:text_issue_updated, :id => "##{@issue.id}", :author => h(@journal.user)) %></p>
<br/>
<table>
<tr>
<td>
<ul>
<% details_to_strings(@journal_details, false, :only_path => false).each do |string| %>
<li><%= string %></li>
<li><%= string %></li>
<% end %>
</ul>
</td>
</tr>
</table>
<div class="note"><%= textilizable(@journal, :notes, :only_path => false) %></div>
<hr />
app/views/mailer/reminder.html.erb (working copy)
<p><%= l(:mail_body_reminder, :count => @issues.size, :days => @days) %></p>
<table>
<tr>
<td>
<ul>
<% @issues.each do |issue| -%>
<li><%= link_to_issue(issue, :project => true, :only_path => false) %></li>
<% end -%>
</ul>
</td>
</tr>
</table>
<p><%= link_to l(:label_issue_view_all), @issues_url %></p>
(4-4/4)