From b9ac3ffdb68cfb48469d49e09c6165513402aedb Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 5 Apr 2011 12:06:35 +0200 Subject: suche in Client & Bootos --- .../modules/user/controllers/BootosController.php | 14 ++++++++++++ .../modules/user/controllers/ClientController.php | 7 +++--- .../modules/user/views/scripts/bootos/index.phtml | 25 +++++++++++----------- .../modules/user/views/scripts/client/index.phtml | 4 ++-- 4 files changed, 33 insertions(+), 17 deletions(-) (limited to 'application') diff --git a/application/modules/user/controllers/BootosController.php b/application/modules/user/controllers/BootosController.php index 8f602fe..e1b4f7b 100644 --- a/application/modules/user/controllers/BootosController.php +++ b/application/modules/user/controllers/BootosController.php @@ -66,6 +66,17 @@ class user_BootosController extends Zend_Controller_Action $this->view->bootoslist = $this->bootosMapper->findBy(array("groupID" => $groupID)); $this->view->update = array(); + // Search + $search = $this->_request->getParam('search'); + $mySearch = new Pbs_Search(); + $mySearch->setSearchTerm($search); + $mySearch->setModule('bootos'); + $this->view->searchform = $mySearch->searchForm(); + if($search != ''){ + $this->view->search = $mySearch->getSearchTerm(); + $this->view->bootoslist = $mySearch->search($this->view->bootoslist); + } + // Pagination $pagination = new Pbs_Pagination(); $pagination->setPerPage(5); @@ -92,6 +103,9 @@ class user_BootosController extends Zend_Controller_Action } } + public function searchAction(){ + $this->_redirect('/user/bootos/index/search/'.($_GET['search'])); + } public function createbootosAction() { diff --git a/application/modules/user/controllers/ClientController.php b/application/modules/user/controllers/ClientController.php index 87e764d..9fe4b03 100644 --- a/application/modules/user/controllers/ClientController.php +++ b/application/modules/user/controllers/ClientController.php @@ -53,15 +53,16 @@ class User_ClientController extends Zend_Controller_Action $search = $this->_request->getParam('search'); $mySearch = new Pbs_Search(); $mySearch->setSearchTerm($search); + $mySearch->setModule('client'); $this->view->searchform = $mySearch->searchForm(); if($search != ''){ - $this->view->search = $search; + $this->view->search = $mySearch->getSearchTerm(); $clientsInGroup = $mySearch->search($clientsInGroup); } // Pagination $pagination = new Pbs_Pagination(); - $pagination->setPerPage(10); + $pagination->setPerPage(10); $pagination->setElement($clientsInGroup); $pagination->setRequestPage($this->_request->getParam('page')); $pagination->setPageUrl('/user/client/index'.((isset($this->view->search))?'/search/'.$this->view->search:'')); @@ -73,7 +74,7 @@ class User_ClientController extends Zend_Controller_Action } public function searchAction(){ - $this->_redirect('/user/client/index/search/'.$_GET['search']); + $this->_redirect('/user/client/index/search/'.($_GET['search'])); } public function addclientAction() diff --git a/application/modules/user/views/scripts/bootos/index.phtml b/application/modules/user/views/scripts/bootos/index.phtml index 8982fb2..a678cef 100644 --- a/application/modules/user/views/scripts/bootos/index.phtml +++ b/application/modules/user/views/scripts/bootos/index.phtml @@ -1,5 +1,6 @@

BootOS

notification != ''){echo $this->notification;} ?> +searchform; ?> formButton('checkupdate', 'Check for Updates', array( 'onclick' => 'self.location="/user/bootos/index/page/'.$this->page.'/checkupdate/true"', 'class' => 'updatebutton', @@ -10,18 +11,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + bootoslist)==0) diff --git a/application/modules/user/views/scripts/client/index.phtml b/application/modules/user/views/scripts/client/index.phtml index 051ea90..95bf7a2 100644 --- a/application/modules/user/views/scripts/client/index.phtml +++ b/application/modules/user/views/scripts/client/index.phtml @@ -8,8 +8,8 @@ clients): ?>
IDTitleGroupIDMembershipIDConfigIDInitKernelKclDescriptionChangedExpiresPublicID bootosIDTitle titleGroupID groupIDMembershipID membershipIDConfigID configIDInit initKernel kernelKcl kclDescription descriptionChanged ChangedExpires expiresPublic public Actions
- - + + clients as $client): ?> -- cgit v1.2.3-55-g7522 From 52c631ecd01be520fa424362ae34ae0068ba0dfb Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 5 Apr 2011 12:25:36 +0200 Subject: Suche in Bootmenu & Bootiso --- .../modules/user/controllers/BootisoController.php | 14 ++++++++++++++ .../modules/user/controllers/BootmenuController.php | 15 +++++++++++++++ application/modules/user/forms/Filter.php | 2 +- .../modules/user/views/scripts/bootiso/index.phtml | 19 ++++++++++--------- .../modules/user/views/scripts/bootmenu/index.phtml | 7 ++++--- 5 files changed, 44 insertions(+), 13 deletions(-) (limited to 'application') diff --git a/application/modules/user/controllers/BootisoController.php b/application/modules/user/controllers/BootisoController.php index a6fbe9e..877cb65 100644 --- a/application/modules/user/controllers/BootisoController.php +++ b/application/modules/user/controllers/BootisoController.php @@ -79,6 +79,16 @@ class user_BootisoController extends Zend_Controller_Action $this->view->bootisolist = array_reverse($this->view->bootisolist); + // Search + $search = $this->_request->getParam('search'); + $mySearch = new Pbs_Search(); + $mySearch->setSearchTerm($search); + $mySearch->setModule('bootiso'); + $this->view->searchform = $mySearch->searchForm(); + if($search != ''){ + $this->view->search = $mySearch->getSearchTerm(); + $this->view->bootisolist = $mySearch->search($this->view->bootisolist); + } // Pagination $pagination = new Pbs_Pagination(); @@ -105,6 +115,10 @@ class user_BootisoController extends Zend_Controller_Action } + public function searchAction(){ + $this->_redirect('/user/bootiso/index/search/'.($_GET['search'])); + } + public function downloadbootisoAction() { $this->_helper->layout->disableLayout(); diff --git a/application/modules/user/controllers/BootmenuController.php b/application/modules/user/controllers/BootmenuController.php index 7843b3f..dfe9f20 100644 --- a/application/modules/user/controllers/BootmenuController.php +++ b/application/modules/user/controllers/BootmenuController.php @@ -88,6 +88,17 @@ class user_BootmenuController extends Zend_Controller_Action } } + // Search + $search = $this->_request->getParam('search'); + $mySearch = new Pbs_Search(); + $mySearch->setSearchTerm($search); + $mySearch->setModule('bootmenu'); + $this->view->searchform = $mySearch->searchForm(); + if($search != ''){ + $this->view->search = $mySearch->getSearchTerm(); + $bootmenu = $mySearch->search($bootmenu); + } + // Pagination $pagination = new Pbs_Pagination(); $pagination->setPerPage(2); @@ -103,6 +114,10 @@ class user_BootmenuController extends Zend_Controller_Action $this->view->bootmenuentrylist = $bootmenuentries; } + + public function searchAction(){ + $this->_redirect('/user/bootmenu/index/search/'.($_GET['search'])); + } public function createbootmenuAction() diff --git a/application/modules/user/forms/Filter.php b/application/modules/user/forms/Filter.php index 0676ba8..76cf3f8 100644 --- a/application/modules/user/forms/Filter.php +++ b/application/modules/user/forms/Filter.php @@ -10,7 +10,7 @@ class user_Form_Filter extends Zend_Form $this->setName("Add Filter"); $this->setMethod('post'); - if(Pbs_Acl::checkRight('fefp')){ + if(Pbs_Acl::checkRight('fefp') || Pbs_Acl::checkRight('fa')){ $edit = 'true'; } else{ diff --git a/application/modules/user/views/scripts/bootiso/index.phtml b/application/modules/user/views/scripts/bootiso/index.phtml index f43949d..23f7780 100644 --- a/application/modules/user/views/scripts/bootiso/index.phtml +++ b/application/modules/user/views/scripts/bootiso/index.phtml @@ -1,19 +1,20 @@

BootMedien

notification != ''){echo $this->notification;} ?> +searchform; ?> formButton('createbootiso', 'Create BootISO', array( 'onclick' => 'self.location="/user/bootiso/createbootiso/page/'.$this->page.'"', 'class' => 'addbutton'))?>
MAC [macadress]Hardwarehash [hardwarehash]MAC macadressHardwarehash hardwarehash Actions
- - - - - - - - - + + + + + + + + + bootisolist)==0) diff --git a/application/modules/user/views/scripts/bootmenu/index.phtml b/application/modules/user/views/scripts/bootmenu/index.phtml index a43a058..cd82bb7 100644 --- a/application/modules/user/views/scripts/bootmenu/index.phtml +++ b/application/modules/user/views/scripts/bootmenu/index.phtml @@ -1,14 +1,15 @@

BootMenu

notification != ''){echo $this->notification;} ?> +searchform; ?> formButton('createbootmenu', 'Create BootMenu', array( 'onclick' => 'self.location="/user/bootmenu/createbootmenu/page/'.$this->page.'"', 'class' => 'addbutton'))?>
IDTitleGroupIDMembershipIDPrebootIDSerialnumberCreatedExpiresPublicID bootosIDTitle titleGroupID groupIDMembershipID membershipIDPrebootID prebootIDSerialnumber serialnumberCreated createdExpires expiresPublic public Actions
- - - + + + bootmenulist)==0) -- cgit v1.2.3-55-g7522 From 6cd23be5bc8f936e1a76c6d01bbc79ef827fc6f6 Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Tue, 5 Apr 2011 12:39:09 +0200 Subject: HTTP-Referer entfernt bzw. Übeprüfung auf vorhanden sein von ['HTTP-Referer'] --- .../modules/dev/forms/ConfirmDeleteAccount.php | 4 +--- application/modules/dev/forms/GroupAdd.php | 2 +- application/modules/dev/forms/GroupEdit.php | 2 +- application/modules/dev/forms/GroupLink.php | 2 +- application/modules/dev/forms/LinkRight.php | 2 +- application/modules/dev/forms/PersonEdit.php | 2 +- application/modules/dev/forms/RoleAdd.php | 2 +- application/modules/dev/forms/RoleEdit.php | 2 +- .../modules/user/controllers/GroupController.php | 26 +++++++++------------- .../modules/user/controllers/RoleController.php | 22 +++++++++++++----- .../modules/user/forms/ConfirmDeleteAccount.php | 2 +- application/modules/user/forms/GroupAdd.php | 2 +- application/modules/user/forms/GroupEdit.php | 2 +- application/modules/user/forms/GroupLink.php | 2 +- application/modules/user/forms/GroupRequest.php | 2 +- application/modules/user/forms/LinkRight.php | 2 +- application/modules/user/forms/PersonEdit.php | 2 +- application/modules/user/forms/RoleAdd.php | 2 +- application/modules/user/forms/RoleEdit.php | 2 +- 19 files changed, 45 insertions(+), 39 deletions(-) (limited to 'application') diff --git a/application/modules/dev/forms/ConfirmDeleteAccount.php b/application/modules/dev/forms/ConfirmDeleteAccount.php index c093996..b82bf0b 100644 --- a/application/modules/dev/forms/ConfirmDeleteAccount.php +++ b/application/modules/dev/forms/ConfirmDeleteAccount.php @@ -18,10 +18,8 @@ class dev_Form_ConfirmDeleteAccount extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } - - } diff --git a/application/modules/dev/forms/GroupAdd.php b/application/modules/dev/forms/GroupAdd.php index 8132f3a..6c5cea9 100644 --- a/application/modules/dev/forms/GroupAdd.php +++ b/application/modules/dev/forms/GroupAdd.php @@ -56,7 +56,7 @@ class dev_Form_GroupAdd extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/GroupEdit.php b/application/modules/dev/forms/GroupEdit.php index 96784de..f375181 100644 --- a/application/modules/dev/forms/GroupEdit.php +++ b/application/modules/dev/forms/GroupEdit.php @@ -39,7 +39,7 @@ class dev_Form_GroupEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/GroupLink.php b/application/modules/dev/forms/GroupLink.php index 8a65e77..40cbc5b 100644 --- a/application/modules/dev/forms/GroupLink.php +++ b/application/modules/dev/forms/GroupLink.php @@ -46,7 +46,7 @@ class dev_Form_GroupLink extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/LinkRight.php b/application/modules/dev/forms/LinkRight.php index 0745791..e371b3a 100644 --- a/application/modules/dev/forms/LinkRight.php +++ b/application/modules/dev/forms/LinkRight.php @@ -39,7 +39,7 @@ class dev_Form_LinkRight extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/PersonEdit.php b/application/modules/dev/forms/PersonEdit.php index c04f418..0dfa5e6 100644 --- a/application/modules/dev/forms/PersonEdit.php +++ b/application/modules/dev/forms/PersonEdit.php @@ -108,7 +108,7 @@ class dev_Form_PersonEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/RoleAdd.php b/application/modules/dev/forms/RoleAdd.php index 6d43904..3e12355 100644 --- a/application/modules/dev/forms/RoleAdd.php +++ b/application/modules/dev/forms/RoleAdd.php @@ -45,7 +45,7 @@ class dev_Form_RoleAdd extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/RoleEdit.php b/application/modules/dev/forms/RoleEdit.php index 1a9afc5..7eb0a0e 100644 --- a/application/modules/dev/forms/RoleEdit.php +++ b/application/modules/dev/forms/RoleEdit.php @@ -53,7 +53,7 @@ class dev_Form_RoleEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/controllers/GroupController.php b/application/modules/user/controllers/GroupController.php index 76639bd..83358c4 100644 --- a/application/modules/user/controllers/GroupController.php +++ b/application/modules/user/controllers/GroupController.php @@ -2,21 +2,13 @@ class User_GroupController extends Zend_Controller_Action { - protected $groupMapper = null; - protected $groupGroupsMapper = null; - protected $membershipMapper = null; - protected $groupRequestMapper = null; - protected $personmapper = null; - protected $rolemapper = null; - protected $groupList = null; - protected $userIDsNamespace = null; public function init() @@ -112,7 +104,15 @@ class User_GroupController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "
"; return; } - $this->_redirect($_SERVER['HTTP_REFERER']); + if($_SERVER['HTTP_REFERER']) { + $this->_redirect($_SERVER['HTTP_REFERER']); + } else { + if(isset($groupID)) { + $this->_redirect('/user/group/show/groupID/' . $groupID); + } else { + $this->_helper->redirector('', 'group'); + } + } return; } } @@ -217,12 +217,8 @@ class User_GroupController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "
"; return; } - if(strpos($_SERVER['HTTP_REFERER'], '/user/group/show')) { - if(strpos($_SERVER['HTTP_REFERER'], '/groupID/')) { - $this->_redirect('/user/group/showall'); - } else { - $this->_helper->redirector('changemembership', 'person'); - } + if(strpos($_SERVER['HTTP_REFERER'], '/user/group/show') !== false && strpos($_SERVER['HTTP_REFERER'], '/groupID/') === false) { + $this->_helper->redirector('changemembership', 'person'); } else { $this->_helper->redirector('showall', 'group'); } diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php index 059d9c4..38c12b0 100644 --- a/application/modules/user/controllers/RoleController.php +++ b/application/modules/user/controllers/RoleController.php @@ -2,7 +2,7 @@ class User_RoleController extends Zend_Controller_Action { - protected $userIDsNamespace; + protected $userIDsNamespace = null; public function init() { @@ -76,8 +76,8 @@ class User_RoleController extends Zend_Controller_Action } } } - //$this->_helper->redirector('', 'role'); - //return; + $this->_helper->redirector('', 'role'); + return; } } @@ -127,7 +127,15 @@ class User_RoleController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "
"; return; } - $this->_redirect($_SERVER['HTTP_REFERER']); + if($_SERVER['HTTP_REFERER']) { + $this->_redirect($_SERVER['HTTP_REFERER']); + } else { + if(isset($roleID)) { + $this->_redirect('/user/role/show/roleID/' . $roleID); + } else { + $this->_helper->redirector('', 'role'); + } + } return; } } @@ -215,7 +223,11 @@ class User_RoleController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "
"; return; } - $this->_helper->redirector('', 'role'); + if(strpos($_SERVER['HTTP_REFERER'], '/user/role/show') !== false && strpos($_SERVER['HTTP_REFERER'], '/roleID/') === false) { + $this->_helper->redirector('changemembership', 'person'); + } else { + $this->_helper->redirector('', 'role'); + } return; } else { $pbsNotifier = new Pbs_Notifier(); diff --git a/application/modules/user/forms/ConfirmDeleteAccount.php b/application/modules/user/forms/ConfirmDeleteAccount.php index 7bf5a32..6237844 100644 --- a/application/modules/user/forms/ConfirmDeleteAccount.php +++ b/application/modules/user/forms/ConfirmDeleteAccount.php @@ -18,7 +18,7 @@ class user_Form_ConfirmDeleteAccount extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/GroupAdd.php b/application/modules/user/forms/GroupAdd.php index ff2b97a..b1ae0ee 100644 --- a/application/modules/user/forms/GroupAdd.php +++ b/application/modules/user/forms/GroupAdd.php @@ -56,7 +56,7 @@ class user_Form_GroupAdd extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/GroupEdit.php b/application/modules/user/forms/GroupEdit.php index 4f0d7fc..43e568b 100644 --- a/application/modules/user/forms/GroupEdit.php +++ b/application/modules/user/forms/GroupEdit.php @@ -44,7 +44,7 @@ class user_Form_GroupEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } } \ No newline at end of file diff --git a/application/modules/user/forms/GroupLink.php b/application/modules/user/forms/GroupLink.php index 9db7ce4..9bddb19 100644 --- a/application/modules/user/forms/GroupLink.php +++ b/application/modules/user/forms/GroupLink.php @@ -46,7 +46,7 @@ class user_Form_GroupLink extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/GroupRequest.php b/application/modules/user/forms/GroupRequest.php index c9ba273..a381207 100644 --- a/application/modules/user/forms/GroupRequest.php +++ b/application/modules/user/forms/GroupRequest.php @@ -40,7 +40,7 @@ class user_Form_GroupRequest extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/LinkRight.php b/application/modules/user/forms/LinkRight.php index 8fe2f46..54aacd6 100644 --- a/application/modules/user/forms/LinkRight.php +++ b/application/modules/user/forms/LinkRight.php @@ -32,7 +32,7 @@ class user_Form_LinkRight extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/PersonEdit.php b/application/modules/user/forms/PersonEdit.php index a6bd123..7175691 100644 --- a/application/modules/user/forms/PersonEdit.php +++ b/application/modules/user/forms/PersonEdit.php @@ -108,7 +108,7 @@ class user_Form_PersonEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/RoleAdd.php b/application/modules/user/forms/RoleAdd.php index 9a9570c..5968b47 100644 --- a/application/modules/user/forms/RoleAdd.php +++ b/application/modules/user/forms/RoleAdd.php @@ -62,7 +62,7 @@ class user_Form_RoleAdd extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/RoleEdit.php b/application/modules/user/forms/RoleEdit.php index 0bdc977..938ebce 100644 --- a/application/modules/user/forms/RoleEdit.php +++ b/application/modules/user/forms/RoleEdit.php @@ -58,7 +58,7 @@ class user_Form_RoleEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } -- cgit v1.2.3-55-g7522 From cbd4bc81de03189d3c774e71223478cf5d0ce401 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 5 Apr 2011 12:50:50 +0200 Subject: suche in Config, Filter, Pool und Preboot --- .../modules/user/controllers/ConfigController.php | 15 +++++++++++ .../modules/user/controllers/FilterController.php | 15 +++++++++++ .../modules/user/controllers/PoolController.php | 15 +++++++++++ .../modules/user/controllers/PrebootController.php | 15 +++++++++++ .../user/views/scripts/bootmenu/index.phtml | 2 +- .../modules/user/views/scripts/config/index.phtml | 11 ++++---- .../modules/user/views/scripts/filter/index.phtml | 11 ++++---- .../modules/user/views/scripts/pool/index.phtml | 9 ++++--- .../modules/user/views/scripts/preboot/index.phtml | 11 ++++---- library/Pbs/Search.php | 30 +++++++++++----------- 10 files changed, 99 insertions(+), 35 deletions(-) (limited to 'application') diff --git a/application/modules/user/controllers/ConfigController.php b/application/modules/user/controllers/ConfigController.php index 83ff804..4bc2526 100644 --- a/application/modules/user/controllers/ConfigController.php +++ b/application/modules/user/controllers/ConfigController.php @@ -66,6 +66,17 @@ class user_ConfigController extends Zend_Controller_Action $config->setGroupID("[".$config->getGroupID()."] ".$groupMapper->find($config->getGroupID())->getTitle()); } + // Search + $search = $this->_request->getParam('search'); + $mySearch = new Pbs_Search(); + $mySearch->setSearchTerm($search); + $mySearch->setModule('config'); + $this->view->searchform = $mySearch->searchForm(); + if($search != ''){ + $this->view->search = $mySearch->getSearchTerm(); + $this->view->configlist = $mySearch->search($this->view->configlist); + } + // Pagination $pagination = new Pbs_Pagination(); $pagination->setPerPage(2); @@ -79,6 +90,10 @@ class user_ConfigController extends Zend_Controller_Action $this->view->configlist = $this->view->configlist; } + + public function searchAction(){ + $this->_redirect('/user/config/index/search/'.($_GET['search'])); + } public function createconfigAction() { diff --git a/application/modules/user/controllers/FilterController.php b/application/modules/user/controllers/FilterController.php index 4ab3ad6..f84f501 100644 --- a/application/modules/user/controllers/FilterController.php +++ b/application/modules/user/controllers/FilterController.php @@ -55,6 +55,17 @@ class User_FilterController extends Zend_Controller_Action $ff->setID($filter['filterID']); $allFilter[] = $ff; } + + // Search + $search = $this->_request->getParam('search'); + $mySearch = new Pbs_Search(); + $mySearch->setSearchTerm($search); + $mySearch->setModule('filter'); + $this->view->searchform = $mySearch->searchForm(); + if($search != ''){ + $this->view->search = $mySearch->getSearchTerm(); + $allFilter = $mySearch->search($allFilter); + } // Pagination $pagination = new Pbs_Pagination(); @@ -69,6 +80,10 @@ class User_FilterController extends Zend_Controller_Action $this->view->filters = $allFilter; } + + public function searchAction(){ + $this->_redirect('/user/filter/index/search/'.($_GET['search'])); + } public function addfilterAction() { diff --git a/application/modules/user/controllers/PoolController.php b/application/modules/user/controllers/PoolController.php index e5fea8c..7800c7a 100644 --- a/application/modules/user/controllers/PoolController.php +++ b/application/modules/user/controllers/PoolController.php @@ -64,6 +64,17 @@ class User_PoolController extends Zend_Controller_Action $ff->setID($pool['poolID']); $yourpools[] = $ff; } + + // Search + $search = $this->_request->getParam('search'); + $mySearch = new Pbs_Search(); + $mySearch->setSearchTerm($search); + $mySearch->setModule('pool'); + $this->view->searchform = $mySearch->searchForm(); + if($search != ''){ + $this->view->search = $mySearch->getSearchTerm(); + $yourpools = $mySearch->search($yourpools); + } // Pagination $pagination = new Pbs_Pagination(); @@ -95,6 +106,10 @@ class User_PoolController extends Zend_Controller_Action if(Pbs_Acl::checkRight('posuc')) $this->view->freeclients = $freeclients; } + + public function searchAction(){ + $this->_redirect('/user/pool/index/search/'.($_GET['search'])); + } public function createpoolAction() { diff --git a/application/modules/user/controllers/PrebootController.php b/application/modules/user/controllers/PrebootController.php index 6944e27..43cbf8a 100644 --- a/application/modules/user/controllers/PrebootController.php +++ b/application/modules/user/controllers/PrebootController.php @@ -64,6 +64,17 @@ class User_PrebootController extends Zend_Controller_Action $this->view->prebootlist = $this->prebootMapper->findBy(array("groupID" => $groupID)); + // Search + $search = $this->_request->getParam('search'); + $mySearch = new Pbs_Search(); + $mySearch->setSearchTerm($search); + $mySearch->setModule('preboot'); + $this->view->searchform = $mySearch->searchForm(); + if($search != ''){ + $this->view->search = $mySearch->getSearchTerm(); + $this->view->prebootlist = $mySearch->search($this->view->prebootlist); + } + // Pagination $pagination = new Pbs_Pagination(); $pagination->setPerPage(2); @@ -89,6 +100,10 @@ class User_PrebootController extends Zend_Controller_Action } } + public function searchAction(){ + $this->_redirect('/user/preboot/index/search/'.($_GET['search'])); + } + public function createprebootAction() { diff --git a/application/modules/user/views/scripts/bootmenu/index.phtml b/application/modules/user/views/scripts/bootmenu/index.phtml index cd82bb7..b580237 100644 --- a/application/modules/user/views/scripts/bootmenu/index.phtml +++ b/application/modules/user/views/scripts/bootmenu/index.phtml @@ -9,7 +9,7 @@ - + bootmenulist)==0) diff --git a/application/modules/user/views/scripts/config/index.phtml b/application/modules/user/views/scripts/config/index.phtml index 478a12d..91177f4 100644 --- a/application/modules/user/views/scripts/config/index.phtml +++ b/application/modules/user/views/scripts/config/index.phtml @@ -1,16 +1,17 @@

Config

notification != ''){echo $this->notification;} ?> +searchform; ?> formButton('createconfig', 'Create Config', array( 'onclick' => 'self.location="/user/config/createconfig/page/'.$this->page.'"', 'class' => 'addbutton'))?>
IDTitleChangedID bootmenuIDTitle titleChanged changed Actions
ID bootmenuID Title titleChanged changedChanged created Actions
- - - - - + + + + + configlist)==0) diff --git a/application/modules/user/views/scripts/filter/index.phtml b/application/modules/user/views/scripts/filter/index.phtml index 9800d42..7f8bad8 100644 --- a/application/modules/user/views/scripts/filter/index.phtml +++ b/application/modules/user/views/scripts/filter/index.phtml @@ -1,5 +1,6 @@

Filters

notification != ''){echo $this->notification;} ?> +searchform; ?> formButton('createconfig', 'Create Filter', array( 'onclick' => 'self.location="/user/filter/addfilter/page/'.$this->page.'"', 'class' => 'addbutton'))?> @@ -7,11 +8,11 @@ filters): ?>
IDTitleGroupIDShellscriptChangedID configIDTitle titleGroupID groupIDShellscript shellscriptChanged created Actions
- - - - - + + + + + filters as $filter): ?> diff --git a/application/modules/user/views/scripts/pool/index.phtml b/application/modules/user/views/scripts/pool/index.phtml index 80053f2..f7d04e2 100644 --- a/application/modules/user/views/scripts/pool/index.phtml +++ b/application/modules/user/views/scripts/pool/index.phtml @@ -1,5 +1,6 @@

Pools

notification != ''){echo $this->notification;} ?> +searchform; ?> formButton('createconfig', 'Create Pool', array( 'onclick' => 'self.location="/user/pool/createpool/page/'.$this->page.'"', 'class' => 'addbutton'))?> @@ -7,10 +8,10 @@ pools): ?>
IDTitleDescriptionPriorityTargetBootMenuID filterIDTitle titleDescription descriptionPriority priorityTargetBootMenu bootmenuID Actions
- - - - + + + + pools as $pool): ?> diff --git a/application/modules/user/views/scripts/preboot/index.phtml b/application/modules/user/views/scripts/preboot/index.phtml index 9e73de1..295f1ca 100644 --- a/application/modules/user/views/scripts/preboot/index.phtml +++ b/application/modules/user/views/scripts/preboot/index.phtml @@ -1,5 +1,6 @@

Preboot

notification != ''){echo $this->notification;} ?> +searchform; ?> formButton('checkupdate', 'Check for Updates', array( 'onclick' => 'self.location="/user/preboot/index/checkupdate/true"', 'class' => 'updatebutton', @@ -9,11 +10,11 @@ 'class' => 'addbutton'))?>
TitleDescriptionLocationTitle titleDescription descriptionLocation location Actions
- - - - - + + + + + prebootlist)==0) diff --git a/library/Pbs/Search.php b/library/Pbs/Search.php index 709651a..b041c3b 100644 --- a/library/Pbs/Search.php +++ b/library/Pbs/Search.php @@ -13,7 +13,7 @@ class Pbs_Search{ "; $highlight = array(); if($this->searchTerm != ''){ - $str .= "Delete Client + $str .= "Delete Client"; foreach($this->getSearchTerms() as $term){ $highlight[] = "$('table').highlight('".$term."');"; @@ -24,14 +24,14 @@ class Pbs_Search{ $(document).ready(function(){"; $str .= implode("\n",$highlight); $str .= "$('#search') - .focus(function() { - $('table th .code').show(); - }).focusout(function() { - $('table th .code').hide(); - }); - $('table th').click(function(){ - $('#search').val($('#search').val()+' '+$(this).find('.code').text()+':'); - });"; + .focus(function() { + $('table th .code').show(); + }).focusout(function() { + $('table th .code').hide(); + }); + $('table th').click(function(){ + $('#search').val($('#search').val()+' '+$(this).find('.code').text()+':'); + });"; $str .= "}); "; $str .= ""; @@ -44,10 +44,10 @@ class Pbs_Search{ $this->searchTerm = trim($search); $parts = explode(" ",$this->searchTerm); - foreach($parts as $this->searchTerm){ - if(stristr($this->searchTerm,":") && ctype_alpha(substr($this->searchTerm,0,strpos($this->searchTerm,":")))){ - $key = substr($this->searchTerm,0,strpos($this->searchTerm,":")); - $value = substr($this->searchTerm,strpos($this->searchTerm,":")+1); + foreach($parts as $search){ + if(stristr($search,":") && ctype_alpha(substr($search,0,strpos($search,":")))){ + $key = substr($search,0,strpos($search,":")); + $value = substr($search,strpos($search,":")+1); $searcha[$key] = $value; } else{ @@ -64,7 +64,7 @@ class Pbs_Search{ $beta = $this->searcha; foreach($this->searchb as $b) $beta[] = $b; - return $beta; + return $beta; } public function search($array){ @@ -102,7 +102,7 @@ class Pbs_Search{ } if (count($this->searcha) > 0 && count($this->searchb) > 0){ $data = array_intersect($com1,$com2); - } + } $data = array_unique($data); foreach( $data as $c) $ges[] = $array[$c]; -- cgit v1.2.3-55-g7522 From c1b11591a3009d74cec4a56610070e97883d9251 Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Tue, 5 Apr 2011 13:44:19 +0200 Subject: Rights im Personen Controller eingeführt, verwalten von anderen Accounts nun auch möglich --- .zfproject.xml | 14 +- .../modules/user/controllers/AuthController.php | 18 ++- .../modules/user/controllers/PersonController.php | 150 ++++++++++++++++----- .../modules/user/views/scripts/group/show.phtml | 3 - .../modules/user/views/scripts/group/showall.phtml | 4 +- .../modules/user/views/scripts/person/index.phtml | 23 ++-- .../modules/user/views/scripts/person/show.phtml | 48 +++++++ .../user/views/scripts/person/showall.phtml | 117 ++++++++++++++++ .../modules/user/views/scripts/role/index.phtml | 4 +- .../modules/user/views/scripts/role/show.phtml | 5 +- 10 files changed, 331 insertions(+), 55 deletions(-) create mode 100644 application/modules/user/views/scripts/person/show.phtml create mode 100644 application/modules/user/views/scripts/person/showall.phtml (limited to 'application') diff --git a/.zfproject.xml b/.zfproject.xml index c7a4807..21e4994 100644 --- a/.zfproject.xml +++ b/.zfproject.xml @@ -123,6 +123,8 @@ + + @@ -316,7 +318,7 @@ - + @@ -332,8 +334,14 @@ - - + + + + + + + + diff --git a/application/modules/user/controllers/AuthController.php b/application/modules/user/controllers/AuthController.php index 7eccc98..8160104 100644 --- a/application/modules/user/controllers/AuthController.php +++ b/application/modules/user/controllers/AuthController.php @@ -2,9 +2,7 @@ class User_AuthController extends Zend_Controller_Action { - protected $personmapper = null; - private $db = null; public function init() @@ -120,11 +118,19 @@ class User_AuthController extends Zend_Controller_Action public function deleteAction() { + if($this->_request->getParam('personID')) { + if(!Pbs_Acl::checkRight('peoa')) { + $this->_redirect('/user'); + } + $personID = $this->_request->getParam('personID'); + } else { + if(!Pbs_Acl::checkRight('pdo')) { + $this->_redirect('/user'); + } + $userIDsNamespace = Zend_Session::namespaceGet('userIDs'); + $personID = $userIDsNamespace['personID']; + } if($_POST['confirmdelete']) { - $auth = Zend_Auth::getInstance(); - $result = $this->personmapper->findBy(array('email' => $auth->getIdentity()),true); - $person = $result[0]; - $personID = $person["personID"]; if (isset($personID)){ $this->personmapper = new Application_Model_PersonMapper(); $person = $this->personmapper->find($personID); diff --git a/application/modules/user/controllers/PersonController.php b/application/modules/user/controllers/PersonController.php index e614b98..08add21 100644 --- a/application/modules/user/controllers/PersonController.php +++ b/application/modules/user/controllers/PersonController.php @@ -2,7 +2,6 @@ class user_PersonController extends Zend_Controller_Action { - protected $person = null; protected $personmapper = null; protected $membershipMapper = null; @@ -10,14 +9,20 @@ class user_PersonController extends Zend_Controller_Action protected $groupMapper = null; protected $groups = null; protected $groupRequestMapper = null; + protected $userIDsNamespace = null; public function init() { if (Zend_Auth::getInstance()->hasIdentity()) { $this->personmapper = new Application_Model_PersonMapper(); - $result = $this->personmapper->findBy(array('email' => Zend_Auth::getInstance()->getIdentity()),true); - $this->person = new Application_Model_Person($result[0]); - $this->person->setID($result[0]['personID']); + $this->userIDsNamespace = Zend_Session::namespaceGet('userIDs'); + if($this->userIDsNamespace['personID']) { + $this->person = $this->personmapper->find($this->userIDsNamespace['personID']); + } else { + $result = $this->personmapper->findBy(array('email' => Zend_Auth::getInstance()->getIdentity()),true); + $this->person = new Application_Model_Person($result[0]); + $this->person->setID($result[0]['personID']); + } $this->groupMapper = new Application_Model_GroupMapper(); $this->groupRequestMapper = new Application_Model_GroupRequestMapper(); $this->membershipMapper = new Application_Model_MembershipMapper(); @@ -26,10 +31,10 @@ class user_PersonController extends Zend_Controller_Action foreach($this->memberships as $membership) { $group = $this->groupMapper->find($membership['groupID']); $this->groups[] = array ( - 'groupID' => $group->getID(), - 'title' => $group->getTitle(), - 'description' => $group->getDescription(), - 'membershipID' => $membership['membershipID'] + 'groupID' => $group->getID(), + 'title' => $group->getTitle(), + 'description' => $group->getDescription(), + 'membershipID' => $membership['membershipID'] ); } } @@ -41,12 +46,15 @@ class user_PersonController extends Zend_Controller_Action public function indexAction() { - if(!Pbs_Acl::checkRight('psod')) { $this->_redirect('/user'); } $this->view->person = $this->person; $this->view->groups = $this->groups; + $this->view->groupRequestRight = Pbs_Acl::checkRight('grm'); + $this->view->editRight = Pbs_Acl::checkRight('peoa'); + $this->view->leaveRight = Pbs_Acl::checkRight('gl'); + $this->view->overviewRight = Pbs_Acl::checkRight('pso'); $this->view->userIDsNamespace = Zend_Session::namespaceGet('userIDs'); } @@ -55,27 +63,54 @@ class user_PersonController extends Zend_Controller_Action if(!Pbs_Acl::checkRight('peod')) { $this->_redirect('/user'); } - $this->view->person = $this->person; + if($personID = $this->_request->getParam('personID')) { + if(!Pbs_Acl::checkRight('peoa')) { + $this->_redirect('/user'); + } + $person = $this->personmapper->find($personID); + $this->view->person = $person; + } else { + $this->view->person = $this->person; + } if (!isset($_POST["save"])){ $editForm = new user_Form_PersonEdit(); } else { $editForm = new user_Form_PersonEdit($_POST); if ($editForm->isValid($_POST)) { - if(isset($_POST['newpassword'])) { - $date = new DateTime(); - $this->person->setPassword($_POST['newpassword']); - $this->person->setPasswordSalt(MD5($date->getTimestamp())); - $this->person->setPassword(MD5($this->person->getPassword() . $this->person->getPasswordSalt())); - } - $this->person->setOptions($_POST); - try { - $this->personmapper->save($this->person); - } catch(Zend_Exception $e) - { - echo "Caught exception: " . get_class($e) . "
"; - echo "Message: " . $e->getMessage() . "
"; - echo "Email Address already existing."; - return; + if($personID = $this->_request->getParam('personID')) { + if(isset($_POST['newpassword'])) { + $date = new DateTime(); + $person->setPassword($_POST['newpassword']); + $person->setPasswordSalt(MD5($date->getTimestamp())); + $person->setPassword(MD5($person->getPassword() . $this->person->getPasswordSalt())); + } + $person->setOptions($_POST); + try { + $this->personmapper->save($person); + } catch(Zend_Exception $e) + { + echo "Caught exception: " . get_class($e) . "
"; + echo "Message: " . $e->getMessage() . "
"; + echo "Email Address already existing."; + return; + } + } else { + if(isset($_POST['newpassword'])) { + $date = new DateTime(); + $this->person->setPassword($_POST['newpassword']); + $this->person->setPasswordSalt(MD5($date->getTimestamp())); + $this->person->setPassword(MD5($this->person->getPassword() . $this->person->getPasswordSalt())); + } + $this->person->setOptions($_POST); + try { + $this->personmapper->save($this->person); + } catch(Zend_Exception $e) + { + echo "Caught exception: " . get_class($e) . "
"; + echo "Message: " . $e->getMessage() . "
"; + echo "Email Address already existing."; + return; + } } $this->_helper->redirector('', 'person'); return; @@ -151,10 +186,9 @@ class user_PersonController extends Zend_Controller_Action public function leaveAction() { - // Nicht klar welches Recht geprüft werden soll - /*if(!Pbs_Acl::checkRight('peod')) { - $this->_redirect('/user'); - }*/ + if(!Pbs_Acl::checkRight('gl')) { + $this->_redirect('/user'); + } $this->_helper-> viewRenderer-> setNoRender(); $this->view->person = $this->person; $membershipID = $this->_request->getParam('membershipID'); @@ -197,9 +231,9 @@ class user_PersonController extends Zend_Controller_Action $group = $groupMapper->find($membership['groupID']); $role = $roleMapper->find($membership['roleID']); $membershipList[] = array( - 'membershipID' => $membership['membershipID'], - 'group' => $group->getTitle(), - 'role' => $role->getTitle() + 'membershipID' => $membership['membershipID'], + 'group' => $group->getTitle(), + 'role' => $role->getTitle() ); } } @@ -220,6 +254,54 @@ class user_PersonController extends Zend_Controller_Action return; } + public function showallAction() + { + if(!Pbs_Acl::checkRight('pso')) { + $this->_redirect('/user'); + } + $this->view->showRight = Pbs_Acl::checkRight('psod'); + $this->view->editRight = Pbs_Acl::checkRight('peoa'); + $this->view->deleteRight = Pbs_Acl::checkRight('pd'); + $this->view->showOtherRight = Pbs_Acl::checkRight('psood'); + $this->view->editOtherRight = Pbs_Acl::checkRight('peoa'); + $this->view->deleteOtherRight = Pbs_Acl::checkRight('pdo'); + $this->view->userIDsNamespace = $this->userIDsNamespace; + $this->view->personList = $this->personmapper->fetchAll(); + } + + public function showAction() + { + if(!Pbs_Acl::checkRight('psood')) { + $this->_redirect('/user'); + } + $personID = $this->_request->getParam('personID'); + if($personID) { + $person = $this->personmapper->find($personID); + $memberships = $this->membershipMapper->findBy(array("personID" => $person->getID()),true); + if(isset($memberships)) { + foreach($memberships as $membership) { + $group = $this->groupMapper->find($membership['groupID']); + $groups[] = array ( + 'groupID' => $group->getID(), + 'title' => $group->getTitle(), + 'description' => $group->getDescription(), + 'membershipID' => $membership['membershipID'] + ); + } + } + $this->view->person = $person; + $this->view->groups = $groups; + $this->view->personID = $personID; + $this->view->editRight = Pbs_Acl::checkRight('peoa'); + $this->view->deleteRight = Pbs_Acl::checkRight('pd'); + $this->view->overviewRight = Pbs_Acl::checkRight('pso'); + $this->view->userIDsNamespace = Zend_Session::namespaceGet('userIDs'); + } else { + $this->_helper->redirector('', 'person'); + return; + } + } + } @@ -237,3 +319,7 @@ class user_PersonController extends Zend_Controller_Action + + + + diff --git a/application/modules/user/views/scripts/group/show.phtml b/application/modules/user/views/scripts/group/show.phtml index d343204..9777b21 100644 --- a/application/modules/user/views/scripts/group/show.phtml +++ b/application/modules/user/views/scripts/group/show.phtml @@ -139,6 +139,3 @@ function printRoleSelect($roleList) { ?>

-
-
-
diff --git a/application/modules/user/views/scripts/group/showall.phtml b/application/modules/user/views/scripts/group/showall.phtml index e26e91e..e58e762 100644 --- a/application/modules/user/views/scripts/group/showall.phtml +++ b/application/modules/user/views/scripts/group/showall.phtml @@ -1,4 +1,4 @@ -

Groups

+

Groups Overview

formButton('addgroup', 'Add Group', array( 'onclick' => 'self.location="/user/group/add"', 'class' => 'addbutton')) @@ -77,3 +77,5 @@ 'onclick' => 'self.location="/user/group/link"', 'class' => 'addbutton')) ?> +
+
diff --git a/application/modules/user/views/scripts/person/index.phtml b/application/modules/user/views/scripts/person/index.phtml index cdf5c6b..715bd95 100644 --- a/application/modules/user/views/scripts/person/index.phtml +++ b/application/modules/user/views/scripts/person/index.phtml @@ -1,5 +1,5 @@

Person

-formButton('editperson', 'Edit', array( +editRight === true) echo $this->formButton('editperson', 'Edit', array( 'onclick' => 'self.location="/user/person/edit/"', 'class' => 'rightbutton'))?>
@@ -15,18 +15,23 @@
Last Login Date: person->getLogindate()) echo date ('d. F Y - H:i', $this->person->getLogindate()) . " Uhr"; ?>
Register Date: person->getRegisterdate()) . ' Uhr'; ?>
overviewRight === true) echo $this->formButton('showallperson', 'Show Personlist', array( + 'onclick' => 'self.location="/user/person/showall/"', + 'class' => 'rightbutton')); if(isset($this->groups)) { ?>

Member in the following Groups:

- formButton('changeGroup', 'Select other Membership', array( - 'onclick' => 'self.location="/user/person/changemembership"', - 'class' => 'rightbutton'))?>
IDTitleGroupIDMembershipIDPreboot PathID prebootIDTitle titleGroupID groupIDMembershipID membershipIDPreboot Path path_preboot Actions
+ leaveRight === true) { + ?> + groups as $group) { @@ -35,6 +40,8 @@ if(isset($this->groups)) { userIDsNamespace['membershipID']) echo 'class="selectedEntry"'; else echo 'class="entry"'; ?>> + leaveRight === true) { + ?> +
Title DescriptionLeave
Delete Group
- formButton('addtogroup', 'Add to additional + groupRequestRight === true) echo $this->formButton('addtogroup', 'Add to additional Groups', array( 'onclick' => 'self.location="/user/person/request/"', 'class' => 'addbutton')); @@ -59,6 +69,3 @@ Groups', array( ?>

-
-
-
diff --git a/application/modules/user/views/scripts/person/show.phtml b/application/modules/user/views/scripts/person/show.phtml new file mode 100644 index 0000000..a380b3c --- /dev/null +++ b/application/modules/user/views/scripts/person/show.phtml @@ -0,0 +1,48 @@ +

Person

+editRight === true) echo $this->formButton('editperson', 'Edit', array( + 'onclick' => 'self.location="/user/person/edit/personID/' . $this->personID . '"', + 'class' => 'rightbutton')) ?> +deleteRight === true) echo $this->formButton('deleteperson', 'Delete', array( + 'onclick' => 'self.location="/user/auth/delete/personID/' . $this->personID . '"', + 'class' => 'rightbutton')) ?> +
+
+
Title: person->getTitle(); ?>
+
Name: person->getName(); ?>
+
Firstname: person->getFirstname(); ?>
+
Street: person->getStreet(); ?>
+
Housenumber: person->getHousenumber(); ?>
+
City: person->getCity(); ?>
+
Postalcode: person->getPostalcode(); ?>
+
Email: person->getEmail(); ?>
+
Last Login Date: person->getLogindate()) echo date ('d. F Y - H:i', $this->person->getLogindate()) . " Uhr"; ?>
+
Register Date: person->getRegisterdate()) . ' Uhr'; ?>
+overviewRight === true) echo $this->formButton('showallperson', 'Show Personlist', array( + 'onclick' => 'self.location="/user/person/showall/"', + 'class' => 'rightbutton')); +if(isset($this->groups)) { + ?> +
+

Member in the following Groups:

+ + + + + + groups as $group) { + ?> + + + + + +
TitleDescription
+ +
+
diff --git a/application/modules/user/views/scripts/person/showall.phtml b/application/modules/user/views/scripts/person/showall.phtml new file mode 100644 index 0000000..68e9e7c --- /dev/null +++ b/application/modules/user/views/scripts/person/showall.phtml @@ -0,0 +1,117 @@ +

Persons Overview

+
+
+ + + + + + + showRight === true || $this->editRight === true || $this->deleteRight === true) { + ?> + + + + personList) > 0) { + foreach($this->personList as $person) { + ?> + getID() == $this->userIDsNamespace['personID']) echo 'class="selectedEntry"'; else echo 'class="entry"'; ?>> + + + + + getID() == $this->userIDsNamespace['personID']) { + if($this->showRight === true) { + ?> + + editRight === true) { ?> + + deleteRight === true) { ?> + + showOtherRight === true) { + ?> + + editOtherRight === true) { + ?> + + deleteOtherRight === true) { + ?> + + + + +
TitleNameFirstnameEmailActions
getTitle(); ?>getName(); ?>getFirstname(); ?>getEmail(); ?> Show Person Edit Person Delete Account Show Person Edit Person Delete Account
diff --git a/application/modules/user/views/scripts/role/index.phtml b/application/modules/user/views/scripts/role/index.phtml index db20aa2..a0b4284 100644 --- a/application/modules/user/views/scripts/role/index.phtml +++ b/application/modules/user/views/scripts/role/index.phtml @@ -56,4 +56,6 @@ if($this->userIDsNamespace['groupID']) { \ No newline at end of file +?> +
+
diff --git a/application/modules/user/views/scripts/role/show.phtml b/application/modules/user/views/scripts/role/show.phtml index 6c6f8f5..6769336 100644 --- a/application/modules/user/views/scripts/role/show.phtml +++ b/application/modules/user/views/scripts/role/show.phtml @@ -88,4 +88,7 @@ if($this->roleID) { +
+
-- cgit v1.2.3-55-g7522