diff options
| author | michael pereira | 2011-04-05 19:33:21 +0200 |
|---|---|---|
| committer | michael pereira | 2011-04-05 19:33:21 +0200 |
| commit | 882df77e0f3c96795a8acc966b228d6fc1a934da (patch) | |
| tree | 7fdd5fcf04d49ef424230ac44ac20bcfa1061a14 /application/modules/user/controllers/PersonController.php | |
| parent | Forms Rechte angepasst, Views angepasst (diff) | |
| parent | Merge branch 'master' of ssh://git.openslx.org/lsfks/master-teamprojekt/pbs2 (diff) | |
| download | pbs2-882df77e0f3c96795a8acc966b228d6fc1a934da.tar.gz pbs2-882df77e0f3c96795a8acc966b228d6fc1a934da.tar.xz pbs2-882df77e0f3c96795a8acc966b228d6fc1a934da.zip | |
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/modules/user/controllers/PersonController.php')
| -rw-r--r-- | application/modules/user/controllers/PersonController.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/application/modules/user/controllers/PersonController.php b/application/modules/user/controllers/PersonController.php index 201b452..71a8c7d 100644 --- a/application/modules/user/controllers/PersonController.php +++ b/application/modules/user/controllers/PersonController.php @@ -276,10 +276,23 @@ class user_PersonController extends Zend_Controller_Action $this->view->deleteOtherRight = Pbs_Acl::checkRight('pdo'); $this->view->userIDsNamespace = $this->userIDsNamespace; + $this->view->personList = $this->personmapper->fetchAll(); + + // Search + $search = $this->_request->getParam('search'); + $mySearch = new Pbs_Search(); + $mySearch->setSearchTerm($search); + $mySearch->setModule('person'); + if($search != ''){ + $this->view->search = $mySearch->getSearchTerm(); + $this->view->personList = $mySearch->search($this->view->personList); + } + $this->view->searchform = $mySearch->searchForm(); + // Pagination $pagination = new Pbs_Pagination(); $pagination->setPerPage(5); - $pagination->setElement($this->personmapper->fetchAll()); + $pagination->setElement($this->view->personList); $pagination->setRequestPage($this->_request->getParam('page')); $pagination->setPageUrl('/user/person/showall'.((isset($this->view->search))?'/search/'.$this->view->search:'')); @@ -288,6 +301,10 @@ class user_PersonController extends Zend_Controller_Action $this->view->page = $pagination->getRequestPage(); } + public function searchAction(){ + $this->_redirect('/user/person/showall/search/'.($_GET['search'])); + } + public function showAction() { if(!Pbs_Acl::checkRight('psood')) { |
