Files @ 10ee27bae2ff
Branch filter:

Location: kallithea/kallithea/templates/email_templates/pull_request.html

Thomas De Schampheleire
HTML email templates: Outlook: fix width and height attributes to preserve whitespace

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.

HTML width and height attributes do not have any effect, the size is
interpreted as 0px. A CSS-based width and height do work in Outlook and
result in the expected spacing between and within elements of the email.

For Outlook rendering, the CSS variant is probably sufficient, but as it is
unclear how other mail agents will interpret this, leave the HTML width and
height attributes as well.
<%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>
                        <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>