Mercurial > kallithea
diff rhodecode/controllers/admin/notifications.py @ 2503:d04243e932cc beta
Added filtering on inbox by comments
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 25 Jun 2012 22:40:04 +0200 |
parents | 74f2910f7ad9 |
children | f8742e1acf08 |
line wrap: on
line diff
--- a/rhodecode/controllers/admin/notifications.py Sat Jun 23 11:43:07 2012 +0200 +++ b/rhodecode/controllers/admin/notifications.py Mon Jun 25 22:40:04 2012 +0200 @@ -61,10 +61,12 @@ # url('notifications') c.user = self.rhodecode_user notif = NotificationModel().get_for_user(self.rhodecode_user.user_id, - filter_=request.GET) + filter_=request.GET.getall('type')) p = int(request.params.get('page', 1)) c.notifications = Page(notif, page=p, items_per_page=10) c.pull_request_type = Notification.TYPE_PULL_REQUEST + c.comment_type = [Notification.TYPE_CHANGESET_COMMENT, + Notification.TYPE_PULL_REQUEST_COMMENT] return render('admin/notifications/notifications.html') def mark_all_read(self): @@ -72,11 +74,11 @@ nm = NotificationModel() # mark all read nm.mark_all_read_for_user(self.rhodecode_user.user_id, - filter_=request.GET) + filter_=request.GET.getall('type')) Session.commit() c.user = self.rhodecode_user notif = nm.get_for_user(self.rhodecode_user.user_id, - filter_=request.GET) + filter_=request.GET.getall('type')) c.notifications = Page(notif, page=1, items_per_page=10) return render('admin/notifications/notifications_data.html')