Files @ 2b2e37660e95
Branch filter:

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

Thomas De Schampheleire
HTML email templates: introduce link_style variable

Avoid repetition inside the templates and simplify future refactoring by
using 'style' variables provided by the model.
<%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="${link_style}"
                   href="${pr_source_repo}">${pr_source_repo}</a>
                ${_('at')}
                <span style="color:${color_link}">${pr_source_branch}</span>
                ${_('to')}
                <a style="${link_style}"
                   href="${pr_target_repo}">${pr_target_repo}</a>
                ${_('at')}
                <span style="color:${color_link}">${pr_target_branch}</span>:
            </div>
            <div>
                <a style="${link_style}"
                   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 style="mso-special-format:bullet">
                        <a style="${link_style}"
                           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>