summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/modules/user/controllers/FilterController.php3
-rw-r--r--application/modules/user/controllers/GroupController.php19
-rw-r--r--application/modules/user/controllers/PersonController.php19
-rw-r--r--application/modules/user/controllers/RoleController.php19
-rw-r--r--application/modules/user/controllers/SessionController.php2
-rw-r--r--application/modules/user/views/scripts/filter/index.phtml2
-rw-r--r--application/modules/user/views/scripts/group/showall.phtml3
-rw-r--r--application/modules/user/views/scripts/person/showall.phtml1
-rw-r--r--application/modules/user/views/scripts/role/index.phtml1
9 files changed, 61 insertions, 8 deletions
diff --git a/application/modules/user/controllers/FilterController.php b/application/modules/user/controllers/FilterController.php
index da42b76..ead81ab 100644
--- a/application/modules/user/controllers/FilterController.php
+++ b/application/modules/user/controllers/FilterController.php
@@ -48,7 +48,7 @@ class User_FilterController extends Zend_Controller_Action
$this->view->notification = $pbsNotifier->notify('modify',$result);
}
- $filters = $this->filterMapper->findBy(array('groupID' => $this->membership->getGroupID()),true,array('priority'=>'DESC'));
+ $filters = $this->filterMapper->findBy(array('groupID' => $this->membership->getGroupID(),'membershipID'=>null),true,array('priority'=>'DESC'));
$bootmenuMapper = new Application_Model_BootMenuMapper();
foreach($filters as $filter){
$ff = new Application_Model_Filter();
@@ -133,6 +133,7 @@ class User_FilterController extends Zend_Controller_Action
$filterentry = new Application_Model_FilterEntries();
$filterentry->setFilterID($id);
$filterentry->setFiltertypeID(6);
+ $filterentry->setCreated(time());
$filterentry->setFiltervalue($this->membership->getGroupID());
$filterentriesMapper->save($filterentry);
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']));
+ }
}
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')) {
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'])) {
diff --git a/application/modules/user/controllers/SessionController.php b/application/modules/user/controllers/SessionController.php
index 018e738..3768af9 100644
--- a/application/modules/user/controllers/SessionController.php
+++ b/application/modules/user/controllers/SessionController.php
@@ -62,7 +62,7 @@ class User_SessionController extends Zend_Controller_Action
// Sort after date/id
usort($mySessions, function($func_a, $func_b) {
if($func_a->getID() == $func_b->getID()) return 0;
- return ($func_a->getID() < $func_b->getID()) ? -1 : 1;
+ return ($func_a->getID() < $func_b->getID()) ? 1 : -1;
});
// Search
diff --git a/application/modules/user/views/scripts/filter/index.phtml b/application/modules/user/views/scripts/filter/index.phtml
index aa615e4..5d3646d 100644
--- a/application/modules/user/views/scripts/filter/index.phtml
+++ b/application/modules/user/views/scripts/filter/index.phtml
@@ -63,7 +63,7 @@
<?php if (count($erg)>0): ?>
<tr class=detail>
<td class=arrowtop>↳</td>
- <td colspan=7>
+ <td colspan=8>
<?php
?>
diff --git a/application/modules/user/views/scripts/group/showall.phtml b/application/modules/user/views/scripts/group/showall.phtml
index 34f3e11..356ebbc 100644
--- a/application/modules/user/views/scripts/group/showall.phtml
+++ b/application/modules/user/views/scripts/group/showall.phtml
@@ -1,4 +1,5 @@
<h1>Groups Overview</h1>
+<?php echo $this->searchform; ?>
<?php echo $this->formButton('addgroup', 'Add Group', array(
'onclick' => 'self.location="/user/group/add"',
'class' => 'addbutton'))
@@ -73,7 +74,7 @@
}
?>
</table>
-<?php echo $this->pagination; ?>
+ <?php echo $this->pagination; ?>
<?php echo $this->formButton('linkgroups', 'Link Groups', array(
'onclick' => 'self.location="/user/group/link"',
'class' => 'addbutton'))
diff --git a/application/modules/user/views/scripts/person/showall.phtml b/application/modules/user/views/scripts/person/showall.phtml
index d605f70..d9f4cf9 100644
--- a/application/modules/user/views/scripts/person/showall.phtml
+++ b/application/modules/user/views/scripts/person/showall.phtml
@@ -1,6 +1,7 @@
<h1>Persons Overview</h1>
<br />
<br />
+<?php echo $this->searchform; ?>
<table>
<tr>
<th>Title</th>
diff --git a/application/modules/user/views/scripts/role/index.phtml b/application/modules/user/views/scripts/role/index.phtml
index 8ca2bd6..2dbe77d 100644
--- a/application/modules/user/views/scripts/role/index.phtml
+++ b/application/modules/user/views/scripts/role/index.phtml
@@ -2,6 +2,7 @@
if($this->userIDsNamespace['groupID']) {
?>
<h1>Roles</h1>
+ <?php echo $this->searchform; ?>
<?php echo $this->formButton('addrole', 'Add Role', array(
'onclick' => 'self.location="/user/role/add"',
'class' => 'addbutton'))?>