diff --git a/src/views/notifications.html b/src/views/notifications.html index 74f8aba23..7bdd85fad 100644 --- a/src/views/notifications.html +++ b/src/views/notifications.html @@ -1,7 +1,12 @@
-

{{ 'notifications.title' | tr }}

+

{{ 'notifications.title' | tr }} + + + + +

diff --git a/src/views/notifications.js b/src/views/notifications.js index ee066fc2d..aa31ceba5 100644 --- a/src/views/notifications.js +++ b/src/views/notifications.js @@ -9,9 +9,11 @@ angular.module('Application').controller('NotificationsController', ['$scope', ' $scope.notifications = []; $scope.activeNotification = null; $scope.busy = true; + $scope.currentPage = 1; + $scope.perPage = 20; $scope.refresh = function () { - Client.getNotifications({}, 1, 100, function (error, result) { + Client.getNotifications({}, $scope.currentPage, $scope.perPage, function (error, result) { if (error) return console.error(error); // collapse by default @@ -30,6 +32,18 @@ angular.module('Application').controller('NotificationsController', ['$scope', ' }); }; + $scope.showNextPage = function () { + $scope.currentPage++; + $scope.refresh(); + }; + + $scope.showPrevPage = function () { + if ($scope.currentPage > 1) $scope.currentPage--; + else $scope.currentPage = 1; + + $scope.refresh(); + }; + $scope.ack = function (notification, acked, event) { if (event) event.stopPropagation();