# HG changeset patch # User Thomas De Schampheleire # Date 2018-02-13 11:09:14 # Node ID 2b2e37660e95aa2b7ba7cd9ff7c0f23c1b3f88b0 # Parent 9cef5615da7b694da27435760fbd33df2538c42b HTML email templates: introduce link_style variable Avoid repetition inside the templates and simplify future refactoring by using 'style' variables provided by the model. diff --git a/kallithea/model/notification.py b/kallithea/model/notification.py --- a/kallithea/model/notification.py +++ b/kallithea/model/notification.py @@ -339,6 +339,7 @@ class EmailNotificationModel(object): "default_style": "%(sans_style)s;font-weight:200;font-size:14px;line-height:17px;color:%(color_text)s" % _kwargs, "comment_style": "%(monospace_style)s;white-space:pre-wrap" % _kwargs, "emph_style": "font-weight:600;color:%(color_emph)s" % _kwargs, + "link_style": "color:%(color_link)s;text-decoration:none" % _kwargs, }) log.debug('rendering tmpl %s with kwargs %s', base, _kwargs) diff --git a/kallithea/templates/email_templates/changeset_comment.html b/kallithea/templates/email_templates/changeset_comment.html --- a/kallithea/templates/email_templates/changeset_comment.html +++ b/kallithea/templates/email_templates/changeset_comment.html @@ -18,13 +18,13 @@
${_('Changeset on')} - ${cs_target_repo} ${_('branch')} ${branch}:
- "${h.shorter(message, 60, firstline=True)}" ${_('by')} ${cs_author.full_name_and_username}. diff --git a/kallithea/templates/email_templates/password_reset.html b/kallithea/templates/email_templates/password_reset.html --- a/kallithea/templates/email_templates/password_reset.html +++ b/kallithea/templates/email_templates/password_reset.html @@ -27,7 +27,7 @@
${_('To set a new password, click the following link')}:
- ${reset_url}
${_("Should you not be able to use the link above, please type the following code into the password reset form")}: diff --git a/kallithea/templates/email_templates/pull_request.html b/kallithea/templates/email_templates/pull_request.html --- a/kallithea/templates/email_templates/pull_request.html +++ b/kallithea/templates/email_templates/pull_request.html @@ -10,18 +10,18 @@
${_('Pull request from')} - ${pr_source_repo} ${_('at')} ${pr_source_branch} ${_('to')} - ${pr_target_repo} ${_('at')} ${pr_target_branch}:
- ${pr_nice_id} "${pr_title}" ${_('by')} @@ -56,7 +56,7 @@
    %for revision, desc in pr_revisions:
  • - ${h.shorter(desc, 80, firstline=True)} diff --git a/kallithea/templates/email_templates/pull_request_comment.html b/kallithea/templates/email_templates/pull_request_comment.html --- a/kallithea/templates/email_templates/pull_request_comment.html +++ b/kallithea/templates/email_templates/pull_request_comment.html @@ -18,18 +18,18 @@
    ${_('Pull request from')} - ${pr_source_repo} ${_('branch')} ${pr_source_branch} ${_('to')} - ${pr_target_repo} ${_('branch')} ${pr_target_branch}:
    - ${pr_nice_id} "${pr_title}" ${_('by')}