Mercurial > kallithea
changeset 3121:3274ba9f1489 beta
fixes #691: Notifications for pull requests: move link to pull request to the top
- fixed html escape in the template
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 19 Dec 2012 23:12:33 +0100 |
parents | c69006a70e6b |
children | 4ef6a7ed5e3e |
files | rhodecode/model/notification.py rhodecode/templates/email_templates/pull_request.html |
diffstat | 2 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/model/notification.py Wed Dec 19 00:30:16 2012 +0100 +++ b/rhodecode/model/notification.py Wed Dec 19 23:12:33 2012 +0100 @@ -270,8 +270,9 @@ 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)
--- a/rhodecode/templates/email_templates/pull_request.html Wed Dec 19 00:30:16 2012 +0100 +++ b/rhodecode/templates/email_templates/pull_request.html Wed Dec 19 23:12:33 2012 +0100 @@ -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 @@ %endfor </ul> -${_('View this pull request here')}: ${pr_url} +