From 58dfe1b55ef3ead11117e19b4abb84c6b83814c1 Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Tue, 5 Apr 2011 17:36:08 +0200 Subject: Paging bei Person, Group und Role --- application/modules/user/controllers/RoleController.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'application/modules/user/controllers/RoleController.php') diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php index 38c12b0..86872f0 100644 --- a/application/modules/user/controllers/RoleController.php +++ b/application/modules/user/controllers/RoleController.php @@ -23,8 +23,16 @@ class User_RoleController extends Zend_Controller_Action public function indexAction() { if(isset($this->userIDsNamespace['groupID'])) { - $roleList = $this->roleMapper->findBy(array('groupID' => $this->userIDsNamespace['groupID']),true); - $this->view->roleList = $roleList; + // Pagination + $pagination = new Pbs_Pagination(); + $pagination->setPerPage(5); + $pagination->setElement($this->roleMapper->findBy(array('groupID' => $this->userIDsNamespace['groupID']),true)); + $pagination->setRequestPage($this->_request->getParam('page')); + $pagination->setPageUrl('/user/role/index'.((isset($this->view->search))?'/search/'.$this->view->search:'')); + + $this->view->roleList = $pagination->getElements(); + $this->view->pagination = $pagination->pagination($pageurl); + $this->view->page = $pagination->getRequestPage(); $this->view->userIDsNamespace = $this->userIDsNamespace; } else { $this->_helper->redirector('selectmembership', 'person'); -- cgit v1.2.3-55-g7522