Changeset - 3274ba9f1489
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 13 years ago 2012-12-19 23:12:33
marcin@python-works.com
fixes #691: Notifications for pull requests: move link to pull request to the top
- fixed html escape in the template
2 files changed with 6 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/notification.py
Show inline comments
 
@@ -267,11 +267,12 @@ class EmailNotificationModel(BaseModel):
 

	
 
        :param type_:
 
        """
 

	
 
        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)
rhodecode/templates/email_templates/pull_request.html
Show inline comments
 
## -*- 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>
 

	
 
<div>${_('revisions for reviewing')}</div>
 
<ul>
 
%for r in pr_revisions:
 
    <li>${r}</li>
 
%endfor
 
</ul>
 

	
 
${_('View this pull request here')}: ${pr_url}
 

	
0 comments (0 inline, 0 general)