diff --git a/CHANGELOG b/CHANGELOG index 706d39f8b..19f2cf20b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -40,6 +40,9 @@ Motions: - Added multiselect filter for motion comments [#3372]. - Added support for pinning personal notes to the window [#3360]. +Elections: +- Added pagination for list view [#3393]. + Users: - User without permission to see users can now see agenda item speakers, motion submitters and supporters, assignment candidates, mediafile diff --git a/openslides/assignments/static/js/assignments/site.js b/openslides/assignments/static/js/assignments/site.js index 25ab1cc86..14d9f9b74 100644 --- a/openslides/assignments/static/js/assignments/site.js +++ b/openslides/assignments/static/js/assignments/site.js @@ -317,6 +317,7 @@ angular.module('OpenSlidesApp.assignments.site', [ tag: function (assignment) {return assignment.tags_id;}, phase: function (assignment) {return assignment.phase;}, }; + // Sorting $scope.sort = osTableSort.createInstance(); $scope.sort.column = 'title'; @@ -343,6 +344,15 @@ angular.module('OpenSlidesApp.assignments.site', [ } Assignment.save(assignment); }; + + // Pagination + $scope.currentPage = 1; + $scope.itemsPerPage = 25; + $scope.limitBegin = 0; + $scope.pageChanged = function() { + $scope.limitBegin = ($scope.currentPage - 1) * $scope.itemsPerPage; + }; + // update phase $scope.updatePhase = function (assignment, phase_id) { assignment.phase = phase_id; diff --git a/openslides/assignments/static/templates/assignments/assignment-list.html b/openslides/assignments/static/templates/assignments/assignment-list.html index 46f1a8405..a2ed96a6a 100644 --- a/openslides/assignments/static/templates/assignments/assignment-list.html +++ b/openslides/assignments/static/templates/assignments/assignment-list.html @@ -208,7 +208,8 @@ | osFilter: filter.filterString : filter.getObjectQueryString | MultiselectFilter: filter.multiselectFilters.tag : getItemId.tag | MultiselectFilter: filter.multiselectFilters.phase : getItemId.phase - | orderBy: sort.column : sort.reverse)"> + | orderBy: sort.column : sort.reverse) + | limitTo : itemsPerPage : limitBegin">