diff options
| author | michael pereira | 2011-03-30 13:17:55 +0200 |
|---|---|---|
| committer | michael pereira | 2011-03-30 13:17:55 +0200 |
| commit | 0345ce59cf877538eaa30cc76ad597287e18be59 (patch) | |
| tree | 51ba16d887488ae5b10a985f315d6efa085f284c /application/modules/user/controllers/ClientController.php | |
| parent | findBy Methode angepasst (diff) | |
| parent | Pagination & sortierung in Filter (diff) | |
| download | pbs2-0345ce59cf877538eaa30cc76ad597287e18be59.tar.gz pbs2-0345ce59cf877538eaa30cc76ad597287e18be59.tar.xz pbs2-0345ce59cf877538eaa30cc76ad597287e18be59.zip | |
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/modules/user/controllers/ClientController.php')
| -rw-r--r-- | application/modules/user/controllers/ClientController.php | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/application/modules/user/controllers/ClientController.php b/application/modules/user/controllers/ClientController.php index 023de4a..b9399b2 100644 --- a/application/modules/user/controllers/ClientController.php +++ b/application/modules/user/controllers/ClientController.php @@ -47,8 +47,8 @@ class User_ClientController extends Zend_Controller_Action $clientMapper = new Application_Model_ClientMapper(); $clientsInGroup = $clientMapper->findBy('groupID',$this->membership->getGroupID()); - #print_a($clientsInGroup); - $perpage = 5; + + $perpage = 10; $req_page = $this->_request->getParam('page'); $all = count($clientsInGroup); $numpages = ceil($all/$perpage); @@ -56,12 +56,10 @@ class User_ClientController extends Zend_Controller_Action $req_page = 0; if($req_page >= $numpages) $req_page = $numpages-1; - $startitem = $req_page * $perpage; - $this->pagination = array('max' => $numpages, 'selected' => $req_page); + $startitem = $req_page * $perpage; - print_a($all,$numpages,$startitem,$req_page); - $pagination = new Pbs_Pagination(); - $this->pagination = $pagination->pagination('/user/client/index',$req_page,$numpages); + $pagination = new Pbs_Pagination(); + $this->view->pagination = $pagination->pagination('/user/client/index',$req_page,$numpages); $this->view->clients = array_slice($clientsInGroup,$startitem,$perpage); } @@ -80,8 +78,7 @@ class User_ClientController extends Zend_Controller_Action $this->view->addclient = $addclient; } else{ - $addclient = new user_Form_Client(array('buttontext' => 'Create Client'),$_POST); - print_a($_POST); + $addclient = new user_Form_Client(array('buttontext' => 'Create Client'),$_POST); if ($addclient->isValid($_POST) || ($mac != '' && $hh != '') ) { $client = new Application_Model_Client($_POST); $mac = ($mac!='')?$mac:$_POST['macadress']; |
