Mercurial > kallithea
comparison rhodecode/model/notification.py @ 2443:fd0a822481ec codereview
- added commenting to pull requests
- it's now possible to change pull request status via changeset status option
- status flags with associated pull requests are links to pull request they been
changed in
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 11 Jun 2012 00:58:24 +0200 |
parents | f29469677319 |
children | 4753a3445ff7 |
comparison
equal
deleted
inserted
replaced
2442:3bf057a7f7e8 | 2443:fd0a822481ec |
---|---|
196 def make_description(self, notification, show_age=True): | 196 def make_description(self, notification, show_age=True): |
197 """ | 197 """ |
198 Creates a human readable description based on properties | 198 Creates a human readable description based on properties |
199 of notification object | 199 of notification object |
200 """ | 200 """ |
201 | 201 #alias |
202 _n = notification | |
202 _map = { | 203 _map = { |
203 notification.TYPE_CHANGESET_COMMENT: _('commented on commit'), | 204 _n.TYPE_CHANGESET_COMMENT: _('commented on commit'), |
204 notification.TYPE_MESSAGE: _('sent message'), | 205 _n.TYPE_MESSAGE: _('sent message'), |
205 notification.TYPE_MENTION: _('mentioned you'), | 206 _n.TYPE_MENTION: _('mentioned you'), |
206 notification.TYPE_REGISTRATION: _('registered in RhodeCode'), | 207 _n.TYPE_REGISTRATION: _('registered in RhodeCode'), |
207 notification.TYPE_PULL_REQUEST: _('opened new pull request') | 208 _n.TYPE_PULL_REQUEST: _('opened new pull request'), |
209 _n.TYPE_PULL_REQUEST_COMMENT: _('commented on pull request') | |
208 } | 210 } |
209 | 211 |
210 tmpl = "%(user)s %(action)s %(when)s" | 212 tmpl = "%(user)s %(action)s %(when)s" |
211 if show_age: | 213 if show_age: |
212 when = h.age(notification.created_on) | 214 when = h.age(notification.created_on) |