diff options
| author | Simon | 2011-04-04 17:09:57 +0200 |
|---|---|---|
| committer | Simon | 2011-04-04 17:09:57 +0200 |
| commit | 6511fb075385b9fc25ade2d4bd331e742193960e (patch) | |
| tree | 5659fd268ad03c1064d4ee7a00b62545e878822d /application | |
| parent | Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff) | |
| download | pbs2-6511fb075385b9fc25ade2d4bd331e742193960e.tar.gz pbs2-6511fb075385b9fc25ade2d4bd331e742193960e.tar.xz pbs2-6511fb075385b9fc25ade2d4bd331e742193960e.zip | |
client-suche verändert
Diffstat (limited to 'application')
| -rw-r--r-- | application/modules/user/controllers/ClientController.php | 11 | ||||
| -rw-r--r-- | application/modules/user/views/scripts/client/index.phtml | 23 |
2 files changed, 7 insertions, 27 deletions
diff --git a/application/modules/user/controllers/ClientController.php b/application/modules/user/controllers/ClientController.php index acb6a65..c722a49 100644 --- a/application/modules/user/controllers/ClientController.php +++ b/application/modules/user/controllers/ClientController.php @@ -49,13 +49,14 @@ class User_ClientController extends Zend_Controller_Action $clientMapper = new Application_Model_ClientMapper(); $clientsInGroup = $clientMapper->findBy('groupID',$this->membership->getGroupID()); + // Search $search = $this->_request->getParam('search'); + $mySearch = new Pbs_Search(); + $mySearch->setSearchTerm($search); + $this->view->searchform = $mySearch->searchForm(); if($search != ''){ - $this->view->search = $search; - $mySearch = new Pbs_Search(); - $mySearch->setSearchTerm($search); - $clientsInGroup = $mySearch->search($clientsInGroup); - $this->view->searchterms = $mySearch->getSearchTerms(); + $this->view->search = $search; + $clientsInGroup = $mySearch->search($clientsInGroup); } // Pagination diff --git a/application/modules/user/views/scripts/client/index.phtml b/application/modules/user/views/scripts/client/index.phtml index ca78db1..5a75741 100644 --- a/application/modules/user/views/scripts/client/index.phtml +++ b/application/modules/user/views/scripts/client/index.phtml @@ -1,27 +1,6 @@ <h1>Clients</h1> <?php if($this->notification != ''){echo $this->notification;} ?> -<form action='/user/client/search'> -<input type='text' name='search' <?php echo isset($this->search)?'value="'.$this->search.'"':'';?>> -<input type='submit' value='search'> -<?php -if(isset($this->search)){ - ?> - <a href='/user/client/'><img src='/media/img/delete.png' alt='Delete Client'/></a> - <script type='text/javascript' src='/media/js/jquery.highlight-3.js'></script> - <script> - $(document).ready(function(){ - <?php foreach($this->searchterms as $term){?> - $('table').highlight('<?php echo $term;?>'); - <?php - } - ?> - }); - </script> - - <?php -} -?> -</form> +<?php echo $this->searchform; ?> <?php echo $this->formButton('createbootos', 'Create Client', array( 'onclick' => 'self.location="/user/client/addclient/page/'.$this->page.'"', 'class' => 'addbutton'))?> |
