diff options
| author | Simon | 2011-04-05 12:06:35 +0200 |
|---|---|---|
| committer | Simon | 2011-04-05 12:06:35 +0200 |
| commit | b9ac3ffdb68cfb48469d49e09c6165513402aedb (patch) | |
| tree | d13185983e20858cece940ddf5a45bf83b74fa96 /application | |
| parent | such-aussehen geƤndert (diff) | |
| download | pbs2-b9ac3ffdb68cfb48469d49e09c6165513402aedb.tar.gz pbs2-b9ac3ffdb68cfb48469d49e09c6165513402aedb.tar.xz pbs2-b9ac3ffdb68cfb48469d49e09c6165513402aedb.zip | |
suche in Client & Bootos
Diffstat (limited to 'application')
4 files changed, 33 insertions, 17 deletions
diff --git a/application/modules/user/controllers/BootosController.php b/application/modules/user/controllers/BootosController.php index 8f602fe..e1b4f7b 100644 --- a/application/modules/user/controllers/BootosController.php +++ b/application/modules/user/controllers/BootosController.php @@ -66,6 +66,17 @@ class user_BootosController extends Zend_Controller_Action $this->view->bootoslist = $this->bootosMapper->findBy(array("groupID" => $groupID)); $this->view->update = array(); + // Search + $search = $this->_request->getParam('search'); + $mySearch = new Pbs_Search(); + $mySearch->setSearchTerm($search); + $mySearch->setModule('bootos'); + $this->view->searchform = $mySearch->searchForm(); + if($search != ''){ + $this->view->search = $mySearch->getSearchTerm(); + $this->view->bootoslist = $mySearch->search($this->view->bootoslist); + } + // Pagination $pagination = new Pbs_Pagination(); $pagination->setPerPage(5); @@ -92,6 +103,9 @@ class user_BootosController extends Zend_Controller_Action } } + public function searchAction(){ + $this->_redirect('/user/bootos/index/search/'.($_GET['search'])); + } public function createbootosAction() { diff --git a/application/modules/user/controllers/ClientController.php b/application/modules/user/controllers/ClientController.php index 87e764d..9fe4b03 100644 --- a/application/modules/user/controllers/ClientController.php +++ b/application/modules/user/controllers/ClientController.php @@ -53,15 +53,16 @@ class User_ClientController extends Zend_Controller_Action $search = $this->_request->getParam('search'); $mySearch = new Pbs_Search(); $mySearch->setSearchTerm($search); + $mySearch->setModule('client'); $this->view->searchform = $mySearch->searchForm(); if($search != ''){ - $this->view->search = $search; + $this->view->search = $mySearch->getSearchTerm(); $clientsInGroup = $mySearch->search($clientsInGroup); } // Pagination $pagination = new Pbs_Pagination(); - $pagination->setPerPage(10); + $pagination->setPerPage(10); $pagination->setElement($clientsInGroup); $pagination->setRequestPage($this->_request->getParam('page')); $pagination->setPageUrl('/user/client/index'.((isset($this->view->search))?'/search/'.$this->view->search:'')); @@ -73,7 +74,7 @@ class User_ClientController extends Zend_Controller_Action } public function searchAction(){ - $this->_redirect('/user/client/index/search/'.$_GET['search']); + $this->_redirect('/user/client/index/search/'.($_GET['search'])); } public function addclientAction() diff --git a/application/modules/user/views/scripts/bootos/index.phtml b/application/modules/user/views/scripts/bootos/index.phtml index 8982fb2..a678cef 100644 --- a/application/modules/user/views/scripts/bootos/index.phtml +++ b/application/modules/user/views/scripts/bootos/index.phtml @@ -1,5 +1,6 @@ <h1>BootOS</h1> <?php if($this->notification != ''){echo $this->notification;} ?> +<?php echo $this->searchform; ?> <?php echo $this->formButton('checkupdate', 'Check for Updates', array( 'onclick' => 'self.location="/user/bootos/index/page/'.$this->page.'/checkupdate/true"', 'class' => 'updatebutton', @@ -10,18 +11,18 @@ <table> <tr> - <th>ID</th> - <th>Title</th> - <th>GroupID</th> - <th>MembershipID</th> - <th>ConfigID</th> - <th>Init</th> - <th>Kernel</th> - <th>Kcl</th> - <th>Description</th> - <th>Changed</th> - <th>Expires</th> - <th>Public</th> + <th>ID <span class='code'>bootosID</span></th> + <th>Title <span class='code'>title</span></th> + <th>GroupID <span class='code'>groupID</span></th> + <th>MembershipID <span class='code'>membershipID</span></th> + <th>ConfigID <span class='code'>configID</span></th> + <th>Init <span class='code'>init</span></th> + <th>Kernel <span class='code'>kernel</span></th> + <th>Kcl <span class='code'>kcl</span></th> + <th>Description <span class='code'>description</span></th> + <th>Changed <span class='code'>Changed</span></th> + <th>Expires <span class='code'>expires</span></th> + <th>Public <span class='code'>public</span></th> <th colspan=3>Actions</th> </tr> <?php if(count($this->bootoslist)==0) diff --git a/application/modules/user/views/scripts/client/index.phtml b/application/modules/user/views/scripts/client/index.phtml index 051ea90..95bf7a2 100644 --- a/application/modules/user/views/scripts/client/index.phtml +++ b/application/modules/user/views/scripts/client/index.phtml @@ -8,8 +8,8 @@ <?php if ($this->clients): ?> <table> <tr> - <th>MAC<span class='code'> [macadress]</span></th> - <th>Hardwarehash<span class='code'> [hardwarehash]</span></th> + <th>MAC <span class='code'>macadress</span></th> + <th>Hardwarehash <span class='code'>hardwarehash</span></th> <th colspan=2>Actions</th> </tr> <?php foreach ($this->clients as $client): ?> |
