Changeset - f028c24a714d
[Not reviewed]
default
0 2 0
Thomas De Schampheleire - 8 years ago 2018-02-03 22:01:46
thomas.de_schampheleire@nokia.com
HTML email templates: Outlook: fix list bullets

The rendering of HTML emails in Outlook is very restricted and based on old
Internet Explorer versions (more or less the same rendering as in Microsoft
Word). To make the Kallithea emails look the same as in the browser, some
adaptations are needed.

List bullets (to identify different changesets in pullrequests) are not
shown in Outlook. In order to fix that, a proprietary CSS property is
required.
Fix found via:
https://litmus.com/community/discussions/752-can-we-use-ul-and-li-in-email
2 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/email_templates/pull_request.html
Show inline comments
 
<%inherit file="main.html"/>\
 
\
 
<%block name="header">\
 
<% title = _('Mention on Pull Request %s "%s" by %s') % (pr_nice_id, pr_title, pr_user_created) if is_mention else _('Added as Reviewer of Pull Request %s "%s" by %s') % (pr_nice_id, pr_title, pr_user_created) %>\
 
<%include file="header.html" args="title=title,link=pr_url"/>\
 
</%block>\
 
\
 
<table cellpadding="0" cellspacing="0" border="0" width="100%">
 
    <tr>
 
        <td>
 
            <div>
 
                ${_('Pull request from')}
 
                <a style="color:${color_link};text-decoration:none"
 
                   href="${pr_source_repo}">${pr_source_repo}</a>
 
                ${_('at')}
 
                <span style="color:${color_link}">${pr_source_branch}</span>
 
                ${_('to')}
 
                <a style="color:${color_link};text-decoration:none"
 
                   href="${pr_target_repo}">${pr_target_repo}</a>
 
                ${_('at')}
 
                <span style="color:${color_link}">${pr_target_branch}</span>:
 
            </div>
 
            <div>
 
                <a style="color:${color_link};text-decoration:none"
 
                   href="${pr_url}">${pr_nice_id}</a>
 
                "<span style="color:${color_link}">${pr_title}</span>"
 
                ${_('by')}
 
                <span style="color:${color_link}">${pr_owner.full_name_and_username}</span>.
 
            </div>
 
        </td>
 
    </tr>
 
    <tr><td height="10px" style="height:10px"></td></tr>
 
    <tr>
 
        <td>
 
            <div>
 
                ${_('Description')}:
 
            </div>
 
        </td>
 
    </tr>
 
    <tr><td height="10px" style="height:10px"></td></tr>
 
    <tr>
 
        <td>
 
            <div style="${comment_style};color:${color_link}">${body}</div>
 
        </td>
 
    </tr>
 
    <tr><td height="15px" style="height:15px"></td></tr>
 
    <tr>
 
        <td>
 
            <div>${_('Changesets')}:</div>
 
        </td>
 
    </tr>
 
    <tr><td height="10px" style="height:10px"></td></tr>
 

	
 
    <tr>
 
        <td style="${sans_style}">
 
            <ul style="color:${color_link};padding-left:15px;margin:0">
 
                %for revision, desc in pr_revisions:
 
                    <li>
 
                    <li style="mso-special-format:bullet">
 
                        <a style="color:${color_link};text-decoration:none"
 
                           href="${h.canonical_url('changeset_home', repo_name=org_repo_name, revision=revision)}">
 
                            ${h.shorter(desc, 80, firstline=True)}
 
                        </a>
 
                    </li>
 
                %endfor
 
            </ul>
 
        </td>
 
    </tr>
 
    <tr>
 
        <td>
 
<%include file="button.html" args="url=pr_url,title=_('View Pull Request'),padding_bottom=False"/>\
 
        </td>
 
    </tr>
 
</table>
kallithea/tests/models/test_dump_html_mails.ref.html
Show inline comments
 
@@ -908,374 +908,374 @@ Make one plus two equal tree
 

	
 

	
 
View Pull Request: http://pr.org/7
 
</pre>
 
<hr/>
 
<!--!doctype html-->
 
<!--html lang="en"-->
 
<!--head-->
 
    <!--title--><!--/title-->
 
    <!--meta name="viewport" content="width=device-width"-->
 
    <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"-->
 
<!--/head-->
 
<!--body-->
 
<table align="center" cellpadding="0" cellspacing="0" border="0" style="min-width:348px;max-width:800px;font-family:Helvetica,Arial,sans-serif;font-weight:200;font-size:14px;line-height:17px;color:#202020">
 
    <tr>
 
        <td width="30px" style="width:30px"></td>
 
        <td>
 
            <table width="100%" cellpadding="0" cellspacing="0" border="0"
 
                   style="table-layout:fixed;font-family:Helvetica,Arial,sans-serif;border:1px solid #ddd">
 
                <tr><td width="30px" style="width:30px"></td><td></td><td width="30px" style="width:30px"></td></tr>
 
                <tr>
 
                    <td colspan="3">
 
<table bgcolor="#f9f9f9" width="100%" cellpadding="0" cellspacing="0"
 
       style="border-bottom:1px solid #ddd">
 
    <tr>
 
        <td height="20px" style="height:20px" colspan="3"></td>
 
    </tr>
 
    <tr>
 
        <td width="30px" style="width:30px"></td>
 
        <td style="font-family:Helvetica,Arial,sans-serif;font-size:19px;line-height:24px">
 
            <a style="text-decoration:none;font-weight:600;color:#395fa0" href="http://pr.org/7"
 
               target="_blank">Added as Reviewer of Pull Request #7 &#34;The Title&#34; by Requesting User (root)</a>
 
        </td>
 
        <td width="30px" style="width:30px"></td>
 
    </tr>
 
    <tr>
 
        <td height="20px" style="height:20px" colspan="3"></td>
 
    </tr>
 
</table>
 
                    </td>
 
                </tr>
 
                <tr>
 
                    <td height="30px" style="height:30px" colspan="3"></td>
 
                </tr>
 
                <tr>
 
                    <td></td>
 
                    <td>
 
<table cellpadding="0" cellspacing="0" border="0" width="100%">
 
    <tr>
 
        <td>
 
            <div>
 
                Pull request from
 
                <a style="color:#395fa0;text-decoration:none"
 
                   href="https://dev.org/repo">https://dev.org/repo</a>
 
                at
 
                <span style="color:#395fa0">devbranch</span>
 
                to
 
                <a style="color:#395fa0;text-decoration:none"
 
                   href="http://mainline.com/repo">http://mainline.com/repo</a>
 
                at
 
                <span style="color:#395fa0">trunk</span>:
 
            </div>
 
            <div>
 
                <a style="color:#395fa0;text-decoration:none"
 
                   href="http://pr.org/7">#7</a>
 
                "<span style="color:#395fa0">The Title</span>"
 
                by
 
                <span style="color:#395fa0">u2 u3 (u2)</span>.
 
            </div>
 
        </td>
 
    </tr>
 
    <tr><td height="10px" style="height:10px"></td></tr>
 
    <tr>
 
        <td>
 
            <div>
 
                Description:
 
            </div>
 
        </td>
 
    </tr>
 
    <tr><td height="10px" style="height:10px"></td></tr>
 
    <tr>
 
        <td>
 
            <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap;color:#395fa0"><div class="formatted-fixed">This PR is awesome because it does stuff<br/> - please approve indented!</div></div>
 
        </td>
 
    </tr>
 
    <tr><td height="15px" style="height:15px"></td></tr>
 
    <tr>
 
        <td>
 
            <div>Changesets:</div>
 
        </td>
 
    </tr>
 
    <tr><td height="10px" style="height:10px"></td></tr>
 

	
 
    <tr>
 
        <td style="font-family:Helvetica,Arial,sans-serif">
 
            <ul style="color:#395fa0;padding-left:15px;margin:0">
 
                    <li>
 
                    <li style="mso-special-format:bullet">
 
                        <a style="color:#395fa0;text-decoration:none"
 
                           href="http://changeset_home/?repo_name=repo_org&amp;revision=123abc123abc123abc123abc123abc123abc123abc">
 
                            Introduce one and two
 
                        </a>
 
                    </li>
 
                    <li>
 
                    <li style="mso-special-format:bullet">
 
                        <a style="color:#395fa0;text-decoration:none"
 
                           href="http://changeset_home/?repo_name=repo_org&amp;revision=567fed567fed567fed567fed567fed567fed567fed">
 
                            Make one plus two equal tree
 
                        </a>
 
                    </li>
 
            </ul>
 
        </td>
 
    </tr>
 
    <tr>
 
        <td>
 
<center>
 
    <table cellspacing="0" cellpadding="0" style="margin-left:auto;margin-right:auto">
 
        <tr>
 
            <td height="25px" style="height:25px"></td>
 
        </tr>
 
        <tr>
 
            <td style="border-collapse:collapse;border-radius:2px;text-align:center;display:block;border:solid 1px #395fa0;padding:11px 20px 11px 20px">
 
                <a href="http://pr.org/7" style="text-decoration:none;display:block" target="_blank">
 
                    <center>
 
                        <font size="3">
 
                            <span style="font-family:Helvetica,Arial,sans-serif;font-weight:700;font-size:15px;line-height:14px;color:#395fa0;white-space:nowrap;vertical-align:middle">View Pull Request</span>
 
                        </font>
 
                    </center>
 
                </a>
 
            </td>
 
        </tr>
 
    </table>
 
</center>
 
        </td>
 
    </tr>
 
</table>
 
                    </td>
 
                    <td></td>
 
                </tr>
 
                <tr>
 
                    <td height="30px" style="height:30px" colspan="3"></td>
 
                </tr>
 
            </table>
 
        </td>
 
        <td width="30px" style="width:30px"></td>
 
    </tr>
 
</table>
 
<!--/body-->
 
<!--/html-->
 
<hr/>
 
<hr/>
 
<h1>pull_request, is_mention=True</h1>
 
<pre>
 
From: u1
 
To: u2@example.com
 
Subject: [Review] repo/name PR #7 "The Title" from devbranch by u2
 
</pre>
 
<hr/>
 
<pre>http://pr.org/7
 

	
 
Mention on Pull Request #7 "The Title" by Requesting User (root)
 

	
 

	
 
Pull request from https://dev.org/repo at devbranch to http://mainline.com/repo at trunk:
 
#7 "The Title" by u2 u3 (u2).
 

	
 

	
 
Description:
 

	
 
This PR is awesome because it does stuff
 
 - please approve indented!
 

	
 

	
 
Changesets:
 

	
 
Introduce one and two
 
Make one plus two equal tree
 

	
 

	
 
View Pull Request: http://pr.org/7
 
</pre>
 
<hr/>
 
<!--!doctype html-->
 
<!--html lang="en"-->
 
<!--head-->
 
    <!--title--><!--/title-->
 
    <!--meta name="viewport" content="width=device-width"-->
 
    <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"-->
 
<!--/head-->
 
<!--body-->
 
<table align="center" cellpadding="0" cellspacing="0" border="0" style="min-width:348px;max-width:800px;font-family:Helvetica,Arial,sans-serif;font-weight:200;font-size:14px;line-height:17px;color:#202020">
 
    <tr>
 
        <td width="30px" style="width:30px"></td>
 
        <td>
 
            <table width="100%" cellpadding="0" cellspacing="0" border="0"
 
                   style="table-layout:fixed;font-family:Helvetica,Arial,sans-serif;border:1px solid #ddd">
 
                <tr><td width="30px" style="width:30px"></td><td></td><td width="30px" style="width:30px"></td></tr>
 
                <tr>
 
                    <td colspan="3">
 
<table bgcolor="#f9f9f9" width="100%" cellpadding="0" cellspacing="0"
 
       style="border-bottom:1px solid #ddd">
 
    <tr>
 
        <td height="20px" style="height:20px" colspan="3"></td>
 
    </tr>
 
    <tr>
 
        <td width="30px" style="width:30px"></td>
 
        <td style="font-family:Helvetica,Arial,sans-serif;font-size:19px;line-height:24px">
 
            <a style="text-decoration:none;font-weight:600;color:#395fa0" href="http://pr.org/7"
 
               target="_blank">Mention on Pull Request #7 &#34;The Title&#34; by Requesting User (root)</a>
 
        </td>
 
        <td width="30px" style="width:30px"></td>
 
    </tr>
 
    <tr>
 
        <td height="20px" style="height:20px" colspan="3"></td>
 
    </tr>
 
</table>
 
                    </td>
 
                </tr>
 
                <tr>
 
                    <td height="30px" style="height:30px" colspan="3"></td>
 
                </tr>
 
                <tr>
 
                    <td></td>
 
                    <td>
 
<table cellpadding="0" cellspacing="0" border="0" width="100%">
 
    <tr>
 
        <td>
 
            <div>
 
                Pull request from
 
                <a style="color:#395fa0;text-decoration:none"
 
                   href="https://dev.org/repo">https://dev.org/repo</a>
 
                at
 
                <span style="color:#395fa0">devbranch</span>
 
                to
 
                <a style="color:#395fa0;text-decoration:none"
 
                   href="http://mainline.com/repo">http://mainline.com/repo</a>
 
                at
 
                <span style="color:#395fa0">trunk</span>:
 
            </div>
 
            <div>
 
                <a style="color:#395fa0;text-decoration:none"
 
                   href="http://pr.org/7">#7</a>
 
                "<span style="color:#395fa0">The Title</span>"
 
                by
 
                <span style="color:#395fa0">u2 u3 (u2)</span>.
 
            </div>
 
        </td>
 
    </tr>
 
    <tr><td height="10px" style="height:10px"></td></tr>
 
    <tr>
 
        <td>
 
            <div>
 
                Description:
 
            </div>
 
        </td>
 
    </tr>
 
    <tr><td height="10px" style="height:10px"></td></tr>
 
    <tr>
 
        <td>
 
            <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap;color:#395fa0"><div class="formatted-fixed">This PR is awesome because it does stuff<br/> - please approve indented!</div></div>
 
        </td>
 
    </tr>
 
    <tr><td height="15px" style="height:15px"></td></tr>
 
    <tr>
 
        <td>
 
            <div>Changesets:</div>
 
        </td>
 
    </tr>
 
    <tr><td height="10px" style="height:10px"></td></tr>
 

	
 
    <tr>
 
        <td style="font-family:Helvetica,Arial,sans-serif">
 
            <ul style="color:#395fa0;padding-left:15px;margin:0">
 
                    <li>
 
                    <li style="mso-special-format:bullet">
 
                        <a style="color:#395fa0;text-decoration:none"
 
                           href="http://changeset_home/?repo_name=repo_org&amp;revision=123abc123abc123abc123abc123abc123abc123abc">
 
                            Introduce one and two
 
                        </a>
 
                    </li>
 
                    <li>
 
                    <li style="mso-special-format:bullet">
 
                        <a style="color:#395fa0;text-decoration:none"
 
                           href="http://changeset_home/?repo_name=repo_org&amp;revision=567fed567fed567fed567fed567fed567fed567fed">
 
                            Make one plus two equal tree
 
                        </a>
 
                    </li>
 
            </ul>
 
        </td>
 
    </tr>
 
    <tr>
 
        <td>
 
<center>
 
    <table cellspacing="0" cellpadding="0" style="margin-left:auto;margin-right:auto">
 
        <tr>
 
            <td height="25px" style="height:25px"></td>
 
        </tr>
 
        <tr>
 
            <td style="border-collapse:collapse;border-radius:2px;text-align:center;display:block;border:solid 1px #395fa0;padding:11px 20px 11px 20px">
 
                <a href="http://pr.org/7" style="text-decoration:none;display:block" target="_blank">
 
                    <center>
 
                        <font size="3">
 
                            <span style="font-family:Helvetica,Arial,sans-serif;font-weight:700;font-size:15px;line-height:14px;color:#395fa0;white-space:nowrap;vertical-align:middle">View Pull Request</span>
 
                        </font>
 
                    </center>
 
                </a>
 
            </td>
 
        </tr>
 
    </table>
 
</center>
 
        </td>
 
    </tr>
 
</table>
 
                    </td>
 
                    <td></td>
 
                </tr>
 
                <tr>
 
                    <td height="30px" style="height:30px" colspan="3"></td>
 
                </tr>
 
            </table>
 
        </td>
 
        <td width="30px" style="width:30px"></td>
 
    </tr>
 
</table>
 
<!--/body-->
 
<!--/html-->
 
<hr/>
 
<hr/>
 
<h1>pull_request_comment, is_mention=False, status_change=None, closing_pr=False</h1>
 
<pre>
 
From: u1
 
To: u2@example.com
 
Subject: [Comment] repo/name PR #7 "The Title" from devbranch by u2
 
</pre>
 
<hr/>
 
<pre>http://pr.org/comment
 

	
 
Comment on Pull Request #7 "The Title"
 

	
 

	
 
Opinionated User (jsmith):
 

	
 
Me too!
 

	
 
 - and indented on second line
 

	
 

	
 
Pull request from https://dev.org/repo at devbranch to http://mainline.com/repo at trunk:
 
#7 "The Title" by u2 u3 (u2).
 

	
 

	
 
View Comment: http://pr.org/comment
 
</pre>
 
<hr/>
 
<!--!doctype html-->
 
<!--html lang="en"-->
 
<!--head-->
 
    <!--title--><!--/title-->
 
    <!--meta name="viewport" content="width=device-width"-->
 
    <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"-->
 
<!--/head-->
 
<!--body-->
 
<table align="center" cellpadding="0" cellspacing="0" border="0" style="min-width:348px;max-width:800px;font-family:Helvetica,Arial,sans-serif;font-weight:200;font-size:14px;line-height:17px;color:#202020">
 
    <tr>
 
        <td width="30px" style="width:30px"></td>
 
        <td>
 
            <table width="100%" cellpadding="0" cellspacing="0" border="0"
 
                   style="table-layout:fixed;font-family:Helvetica,Arial,sans-serif;border:1px solid #ddd">
 
                <tr><td width="30px" style="width:30px"></td><td></td><td width="30px" style="width:30px"></td></tr>
 
                <tr>
 
                    <td colspan="3">
 
<table bgcolor="#f9f9f9" width="100%" cellpadding="0" cellspacing="0"
 
       style="border-bottom:1px solid #ddd">
 
    <tr>
 
        <td height="20px" style="height:20px" colspan="3"></td>
 
    </tr>
 
    <tr>
 
        <td width="30px" style="width:30px"></td>
0 comments (0 inline, 0 general)