diff --git a/rhodecode/controllers/admin/notifications.py b/rhodecode/controllers/admin/notifications.py --- a/rhodecode/controllers/admin/notifications.py +++ b/rhodecode/controllers/admin/notifications.py @@ -30,6 +30,8 @@ from pylons import request from pylons import tmpl_context as c, url from pylons.controllers.util import redirect +from webhelpers.paginate import Page + from rhodecode.lib.base import BaseController, render from rhodecode.model.db import Notification @@ -58,8 +60,9 @@ class NotificationsController(BaseContro """GET /_admin/notifications: All items in the collection""" # url('notifications') c.user = self.rhodecode_user - c.notifications = NotificationModel()\ - .get_for_user(self.rhodecode_user.user_id) + notif = NotificationModel().get_for_user(self.rhodecode_user.user_id) + p = int(request.params.get('page', 1)) + c.notifications = Page(notif, page=p, items_per_page=10) return render('admin/notifications/notifications.html') def mark_all_read(self): @@ -69,7 +72,8 @@ class NotificationsController(BaseContro nm.mark_all_read_for_user(self.rhodecode_user.user_id) Session.commit() c.user = self.rhodecode_user - c.notifications = nm.get_for_user(self.rhodecode_user.user_id) + 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 create(self): diff --git a/rhodecode/public/css/style.css b/rhodecode/public/css/style.css --- a/rhodecode/public/css/style.css +++ b/rhodecode/public/css/style.css @@ -4103,6 +4103,13 @@ form.comment-inline-form { .inline-comments-button .add-comment{ margin:2px 0px 8px 5px !important } + + +.notification-paginator{ + padding: 0px 0px 4px 16px; + float: left; +} + .notifications{ border-radius: 4px 4px 4px 4px; -webkit-border-radius: 4px; @@ -4136,16 +4143,24 @@ form.comment-inline-form { float: left } .notification-list .container.unread{ - + background: none repeat scroll 0 0 rgba(255, 255, 180, 0.6); } .notification-header .gravatar{ - + background: none repeat scroll 0 0 transparent; + padding: 0px 0px 0px 8px; } .notification-header .desc.unread{ font-weight: bold; font-size: 17px; } - +.notification-table{ + border: 1px solid #ccc; + -webkit-border-radius: 6px 6px 6px 6px; + -moz-border-radius: 6px 6px 6px 6px; + border-radius: 6px 6px 6px 6px; + clear: both; + margin: 0px 20px 0px 20px; +} .notification-header .delete-notifications{ float: right; padding-top: 8px; @@ -4157,6 +4172,11 @@ form.comment-inline-form { padding:5px 0px 5px 38px; } +.notification-body{ + clear:both; + margin: 34px 2px 2px 8px +} + /**** PERMS *****/ diff --git a/rhodecode/templates/admin/notifications/notifications.html b/rhodecode/templates/admin/notifications/notifications.html --- a/rhodecode/templates/admin/notifications/notifications.html +++ b/rhodecode/templates/admin/notifications/notifications.html @@ -25,7 +25,7 @@ ## %if c.notifications: -