summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/PoolController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/controllers/PoolController.php')
-rw-r--r--application/modules/user/controllers/PoolController.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/application/modules/user/controllers/PoolController.php b/application/modules/user/controllers/PoolController.php
index 15a3f1e..ab6a078 100644
--- a/application/modules/user/controllers/PoolController.php
+++ b/application/modules/user/controllers/PoolController.php
@@ -62,7 +62,19 @@ class User_PoolController extends Zend_Controller_Action
$ff->setID($pool['poolID']);
$yourpools[] = $ff;
}
- $this->view->pools = $yourpools;
+ $perpage = 5;
+ $req_page = $this->_request->getParam('page');
+ $all = count($yourpools);
+ $numpages = ceil($all/$perpage);
+ if($req_page < 0 || !is_numeric($req_page) )
+ $req_page = 0;
+ if($req_page >= $numpages)
+ $req_page = $numpages-1;
+ $startitem = $req_page * $perpage;
+
+ $pagination = new Pbs_Pagination();
+ $this->view->pagination = $pagination->pagination('/user/pool/index',$req_page,$numpages);
+ $this->view->pools = array_slice($yourpools,$startitem,$perpage);
// Get all Clients from this group
$clientmapper = new Application_Model_ClientMapper();