def mark_all_read(self): if request.environ.get('HTTP_X_PARTIAL_XHR'): nm = NotificationModel() # mark all read nm.mark_all_read_for_user(self.rhodecode_user.user_id) Session.commit() c.user = self.rhodecode_user notif = nm.get_for_user(self.rhodecode_user.user_id) c.notifications = Page(notif, page=1, items_per_page=10) return render('admin/notifications/notifications_data.html')
def mark_all_read(self): if request.environ.get("HTTP_X_PARTIAL_XHR"): nm = NotificationModel() # mark all read nm.mark_all_read_for_user(self.rhodecode_user.user_id) Session.commit() c.user = self.rhodecode_user notif = nm.get_for_user(self.rhodecode_user.user_id) c.notifications = Page(notif, page=1, items_per_page=10) return render("admin/notifications/notifications_data.html")
def mark_all_read(self): if request.environ.get('HTTP_X_PARTIAL_XHR'): nm = NotificationModel() # mark all read nm.mark_all_read_for_user(self.rhodecode_user.user_id, 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.getall('type')) c.notifications = Page(notif, page=1, items_per_page=10) return render('admin/notifications/notifications_data.html')
def mark_all_read(self): if request.is_xhr: nm = NotificationModel() # mark all read nm.mark_all_read_for_user(c.rhodecode_user.user_id, filter_=request.GET.getall('type')) Session().commit() c.user = c.rhodecode_user notif = nm.get_for_user(c.rhodecode_user.user_id, filter_=request.GET.getall('type')) notifications_url = webhelpers.paginate.PageURL( url('notifications'), request.GET) c.notifications = Page(notif, page=1, items_per_page=10, url=notifications_url) return render('admin/notifications/notifications_data.html')