summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/RoleController.php
diff options
context:
space:
mode:
authormichael pereira2011-04-05 19:33:21 +0200
committermichael pereira2011-04-05 19:33:21 +0200
commit882df77e0f3c96795a8acc966b228d6fc1a934da (patch)
tree7fdd5fcf04d49ef424230ac44ac20bcfa1061a14 /application/modules/user/controllers/RoleController.php
parentForms Rechte angepasst, Views angepasst (diff)
parentMerge branch 'master' of ssh://git.openslx.org/lsfks/master-teamprojekt/pbs2 (diff)
downloadpbs2-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/RoleController.php')
-rw-r--r--application/modules/user/controllers/RoleController.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php
index 86872f0..4e0aa52 100644
--- a/application/modules/user/controllers/RoleController.php
+++ b/application/modules/user/controllers/RoleController.php
@@ -23,10 +23,23 @@ class User_RoleController extends Zend_Controller_Action
public function indexAction()
{
if(isset($this->userIDsNamespace['groupID'])) {
+ $this->view->roleList = $this->roleMapper->findBy(array('groupID' => $this->userIDsNamespace['groupID']),true);
+
+ // Search
+ $search = $this->_request->getParam('search');
+ $mySearch = new Pbs_Search();
+ $mySearch->setSearchTerm($search);
+ $mySearch->setModule('role');
+ if($search != ''){
+ $this->view->search = $mySearch->getSearchTerm();
+ $this->view->roleList = $mySearch->search($this->view->roleList);
+ }
+ $this->view->searchform = $mySearch->searchForm();
+
// Pagination
$pagination = new Pbs_Pagination();
$pagination->setPerPage(5);
- $pagination->setElement($this->roleMapper->findBy(array('groupID' => $this->userIDsNamespace['groupID']),true));
+ $pagination->setElement($this->view->roleList);
$pagination->setRequestPage($this->_request->getParam('page'));
$pagination->setPageUrl('/user/role/index'.((isset($this->view->search))?'/search/'.$this->view->search:''));
@@ -40,6 +53,10 @@ class User_RoleController extends Zend_Controller_Action
}
}
+ public function searchAction(){
+ $this->_redirect('/user/role/index/search/'.($_GET['search']));
+ }
+
public function addAction()
{
if(isset($this->userIDsNamespace['groupID'])) {