Files @ 2d6ec8b9b633
Branch filter:

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

Thomas De Schampheleire
email templates: reorder references to pullrequests

The current references to PRs in email templates are:

Pull request from <repo> branch <branch> to <repo> branch <branch>:
<niceid> <title> by <user>

as the first line can become very long and therefore hard to read, a first
step is to introduce a newline before the destination branch:

Pull request from <repo> branch <branch>
to <repo> branch <branch>:
<niceid> <title> by <user>

But it would be nicer if the from/to part aligns more.
Moreover, the most useful part is (hopefully) the PR title, the from/to is
secondary and can sometimes even be inferred from the title and context the
recipient is already aware of.

Thus, this commit proposes the following format:

Pull request <niceid> <title> by <user>
from <repo> branch <branch>
to <repo> branch <branch>


This adds some divergence with the changeset references, which could be
aligned later if desired.
<%inherit file="main.html"/>\
\
<%block name="header">\
<% title = _('Mention in Comment on Pull Request %s "%s"') % (pr_nice_id, pr_title) if is_mention else _('Pull Request %s "%s" Closed') % (pr_nice_id, pr_title) if closing_pr else _('Comment on Pull Request %s "%s"') % (pr_nice_id, pr_title) %>\
<%include file="header.html" args="title=title,link=pr_comment_url"/>\
</%block>\
\
<table cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr>
        <td>
<%include file="comment.html" args="text=body,author=pr_comment_user,status=status_change,close=closing_pr"/>\
        </td>
    </tr>
    <tr>
        <td height="30px" style="height:30px"></td>
    </tr>
    <tr>
        <td>
            <div>
                ${_('Pull request')}
                <a style="${link_style}"
                   href="${pr_url}">${pr_nice_id} "${pr_title}"</a>
                ${_('by')}
                <span style="${data_style}">${pr_owner.full_name_and_username}</span>.
            </div>
            <div>
                ${_('from')}
                <a style="${link_text_style}"
                   href="${pr_source_repo}">${pr_source_repo}</a>
                ${_('branch')}
                <span style="${data_style}">${pr_source_branch}</span>
                <br/>
                ${_('to')}
                <a style="${link_text_style}"
                   href="${pr_target_repo}">${pr_target_repo}</a>
                ${_('branch')}
                <span style="${data_style}">${pr_target_branch}</span>:
            </div>
        </td>
    </tr>
    <tr>
        <td>
<%include file="button.html" args="url=pr_comment_url,title=_('View Comment'),padding_bottom=False"/>\
        </td>
    </tr>
</table>