diff options
author | Marcin Kuzminski <marcin@python-works.com> | 2012-12-19 23:12:33 +0100 |
---|---|---|
committer | Marcin Kuzminski <marcin@python-works.com> | 2012-12-19 23:12:33 +0100 |
commit | 5b286072b13a800b59d44633212a054b67f5064f (patch) | |
tree | b02ab1589f7cf5112bd2781b87ae3aab137b169a | |
parent | d3cb9ce7bf6db98655a61dd7a91220d4c300c769 (diff) |
fixes #691: Notifications for pull requests: move link to pull request to the top
- fixed html escape in the template
--HG--
branch : beta
extra : amend_source : 94a18f44aec5d33e0517bcd8791d037c0598d980
-rw-r--r-- | rhodecode/model/notification.py | 5 | ||||
-rw-r--r-- | rhodecode/templates/email_templates/pull_request.html | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/rhodecode/model/notification.py b/rhodecode/model/notification.py index 0da8cf06..81e30edf 100644 --- 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 index ca742b7d..91193d4e 100644 --- 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.') % ('<b>%s</b>' % pr_user_created,pr_repo_url)} +${_('User %s opened pull request for repository %s and wants you to review changes.') % (('<b>%s</b>' % pr_user_created),pr_repo_url) |n} <div>${_('title')}: ${pr_title}</div> <div>${_('description')}:</div> +<div>${_('View this pull request here')}: ${pr_url}</div> <p> ${body} </p> @@ -15,4 +16,4 @@ ${body} %endfor </ul> -${_('View this pull request here')}: ${pr_url} + |