diff options
| author | Björn Geiger | 2011-04-05 18:13:12 +0200 |
|---|---|---|
| committer | Björn Geiger | 2011-04-05 18:13:12 +0200 |
| commit | ea3400f39cd5ffae715562b2ae6403d3f0384b03 (patch) | |
| tree | 642c4a9b0fd30248936572135f389266de88b8cb /application/modules/user/controllers/GroupController.php | |
| parent | Merge branch 'master' of ssh://git.openslx.org/lsfks/master-teamprojekt/pbs2 (diff) | |
| download | pbs2-ea3400f39cd5ffae715562b2ae6403d3f0384b03.tar.gz pbs2-ea3400f39cd5ffae715562b2ae6403d3f0384b03.tar.xz pbs2-ea3400f39cd5ffae715562b2ae6403d3f0384b03.zip | |
Search in Group, Person und Role
Diffstat (limited to 'application/modules/user/controllers/GroupController.php')
| -rw-r--r-- | application/modules/user/controllers/GroupController.php | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/application/modules/user/controllers/GroupController.php b/application/modules/user/controllers/GroupController.php index 0eb32b6..064ca60 100644 --- a/application/modules/user/controllers/GroupController.php +++ b/application/modules/user/controllers/GroupController.php @@ -292,10 +292,23 @@ class User_GroupController extends Zend_Controller_Action public function showallAction() { + $this->view->groupList = $this->groupList; + + // Search + $search = $this->_request->getParam('search'); + $mySearch = new Pbs_Search(); + $mySearch->setSearchTerm($search); + $mySearch->setModule('group'); + if($search != ''){ + $this->view->search = $mySearch->getSearchTerm(); + $this->view->groupList = $mySearch->search($this->view->groupList); + } + $this->view->searchform = $mySearch->searchForm(); + // Pagination $pagination = new Pbs_Pagination(); $pagination->setPerPage(5); - $pagination->setElement($this->groupList); + $pagination->setElement($this->view->groupList); $pagination->setRequestPage($this->_request->getParam('page')); $pagination->setPageUrl('/user/group/showall'.((isset($this->view->search))?'/search/'.$this->view->search:'')); @@ -305,6 +318,8 @@ class User_GroupController extends Zend_Controller_Action $this->view->userIDsNamespace = $this->userIDsNamespace; } - + public function searchAction(){ + $this->_redirect('/user/group/showall/search/'.($_GET['search'])); + } } |
