# HG changeset patch # User Marcin Kuzminski # Date 2012-12-19 22:12:33 # Node ID 3274ba9f1489ed6242b46ac9aa37644a69fcbb1c # Parent c69006a70e6b40d50e007042cdaafb29d5750bb8 fixes #691: Notifications for pull requests: move link to pull request to the top - fixed html escape in the template diff --git a/rhodecode/model/notification.py b/rhodecode/model/notification.py --- a/rhodecode/model/notification.py +++ b/rhodecode/model/notification.py @@ -270,8 +270,9 @@ class EmailNotificationModel(BaseModel): base = self.email_types.get(type_, self.email_types[self.TYPE_DEFAULT]) email_template = self._tmpl_lookup.get_template(base) - # translator inject - _kwargs = {'_': _} + # translator and helpers inject + _kwargs = {'_': _, + 'h': h} _kwargs.update(kwargs) log.debug('rendering tmpl %s with kwargs %s' % (base, _kwargs)) return email_template.render(**_kwargs) diff --git a/rhodecode/templates/email_templates/pull_request.html b/rhodecode/templates/email_templates/pull_request.html --- a/rhodecode/templates/email_templates/pull_request.html +++ b/rhodecode/templates/email_templates/pull_request.html @@ -1,9 +1,10 @@ ## -*- coding: utf-8 -*- <%inherit file="main.html"/> -${_('User %s opened pull request for repository %s and wants you to review changes.') % ('%s' % pr_user_created,pr_repo_url)} +${_('User %s opened pull request for repository %s and wants you to review changes.') % (('%s' % pr_user_created),pr_repo_url) |n}
${_('title')}: ${pr_title}
${_('description')}:
+
${_('View this pull request here')}: ${pr_url}

${body}

@@ -15,4 +16,4 @@ %endfor -${_('View this pull request here')}: ${pr_url} +