summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/RoleController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/controllers/RoleController.php')
-rw-r--r--application/modules/user/controllers/RoleController.php12
1 files changed, 10 insertions, 2 deletions
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');