From 15cd5c87327aab0759efbcba8e7144dc0a45cbdd Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Wed, 13 Apr 2011 17:08:42 +0200 Subject: Rechteboxen zusammengeklappt auch bei Add Role --- application/modules/user/views/scripts/role/add.phtml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/application/modules/user/views/scripts/role/add.phtml b/application/modules/user/views/scripts/role/add.phtml index 23d4c55..59c0dae 100644 --- a/application/modules/user/views/scripts/role/add.phtml +++ b/application/modules/user/views/scripts/role/add.phtml @@ -1,5 +1,19 @@

Add Role

+
Click to expand the boxes
addForm->setAction($this->url()); echo $this->addForm; -?> \ No newline at end of file +?> + \ No newline at end of file -- cgit v1.2.3-55-g7522 From dba424de73b449bda6677a4655383f67a679b8e2 Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Wed, 13 Apr 2011 17:27:50 +0200 Subject: HTML Fehler, die in Eclipse angezeigt wurden, entfernt --- .../modules/dev/views/scripts/filter/index.phtml | 4 +- .../modules/user/controllers/SessionController.php | 79 +++++++++++----------- .../modules/user/views/scripts/bootos/index.phtml | 2 +- .../modules/user/views/scripts/index/index.phtml | 2 +- send-post.html | 18 ++--- 5 files changed, 53 insertions(+), 52 deletions(-) diff --git a/application/modules/dev/views/scripts/filter/index.phtml b/application/modules/dev/views/scripts/filter/index.phtml index b555318..fd46cd7 100644 --- a/application/modules/dev/views/scripts/filter/index.phtml +++ b/application/modules/dev/views/scripts/filter/index.phtml @@ -91,7 +91,7 @@ 'filterentriesID' => $filterentry['filterentriesID'] ), 'default', - true) ?>">Edit Filterentry + true) ?>">Edit Filterentry Delete Filterentry + true) ?>">Delete Filterentry diff --git a/application/modules/user/controllers/SessionController.php b/application/modules/user/controllers/SessionController.php index e17dbfe..d0b05ec 100644 --- a/application/modules/user/controllers/SessionController.php +++ b/application/modules/user/controllers/SessionController.php @@ -3,9 +3,9 @@ class User_SessionController extends Zend_Controller_Action { private $membership; - public function init() - { - if (Zend_Auth::getInstance()->hasIdentity()) { + public function init() + { + if (Zend_Auth::getInstance()->hasIdentity()) { $userIDsNamespace = Zend_Session::namespaceGet('userIDs'); if($userIDsNamespace['membershipID'] ==''){ $pbsNotifier = new Pbs_Notifier(); @@ -20,42 +20,42 @@ class User_SessionController extends Zend_Controller_Action } $this->page = $this->_request->getParam('page'); - } + } + + public function indexAction() + { + if(!Pbs_Acl::checkRight('so')) + $this->_redirect('/user/index'); - public function indexAction() - { - if(!Pbs_Acl::checkRight('so')) - $this->_redirect('/user/index'); - $sessionMapper = new Application_Model_SessionMapper(); $bootisoMapper = new Application_Model_BootIsoMapper(); $bootosMapper = new Application_Model_BootOsMapper(); $bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper(); $membershipMapper = new Application_Model_MembershipMapper(); $personMapper = new Application_Model_PersonMapper(); - + $bootisos = $bootisoMapper->findBy(array('groupID',$this->membership->getGroupID())); foreach($bootisos as $bootiso){ - $sessions = $sessionMapper->findBy(array('bootisoID',$bootiso->getID())); + $sessions = $sessionMapper->findBy(array('bootisoID',$bootiso->getID())); foreach($sessions as $session){ #echo $session->getBootosID(); if($session->getBootosID() != ''){ $bo = $bootosMapper->find($session->getBootosID()); if($bo != null) - $session->setBootosID("[".$session->getBootosID()."] ".$bo->getTitle()); + $session->setBootosID("[".$session->getBootosID()."] ".$bo->getTitle()); } if($session->getBootmenuentryID() != ''){ $bm = $bootmenuentriesMapper->find($session->getBootmenuentryID()); - if($bm != null) - $session->setBootmenuentryID("[".$session->getBootmenuentryID()."] ".$bm->getTitle()); - + if($bm != null) + $session->setBootmenuentryID("[".$session->getBootmenuentryID()."] ".$bm->getTitle()); + } - + if($session->getBootisoID() != ''){ $bi = $bootisoMapper->find($session->getBootisoID()); if($bi != null) - $session->setBootisoID("[".$session->getBootisoID()."] ".$bi->getTitle()); + $session->setBootisoID("[".$session->getBootisoID()."] ".$bi->getTitle()); } if($session->getMembershipID() != ''){ @@ -63,47 +63,48 @@ class User_SessionController extends Zend_Controller_Action $p = new Application_Model_Person(); $personMapper->find($personID,$p); if($p != null) - $session->setMembershipID("[".$session->getMembershipID()."] ".$p->getFirstname()." ".$p->getName()); - } + $session->setMembershipID("[".$session->getMembershipID()."] ".$p->getFirstname()." ".$p->getName()); + } $session->setTime(date(Zend_Registry::get('dateformat'),$session->getTime())); $mySessions[] =$session; - } + } } // 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; - }); - + usort($mySessions, sortFunc); + // Search $search = $this->_request->getParam('search'); $mySearch = new Pbs_Search(); $mySearch->setSearchTerm($search); $mySearch->setModule('session'); if($search != ''){ - $this->view->search = $mySearch->getSearchTerm(); - $mySessions = $mySearch->search($mySessions); + $this->view->search = $mySearch->getSearchTerm(); + $mySessions = $mySearch->search($mySessions); } $this->view->searchform = $mySearch->searchForm(); - - // Pagination - $pagination = new Pbs_Pagination(); - $pagination->setPerPage(10); + + // Pagination + $pagination = new Pbs_Pagination(); + $pagination->setPerPage(10); $pagination->setElement($mySessions); - $pagination->setRequestPage($this->_request->getParam('page')); + $pagination->setRequestPage($this->_request->getParam('page')); $pagination->setPageUrl('/user/session/index'.((isset($this->view->search))?'/search/'.$this->view->search:'')); - $mySessions = $pagination->getElements(); - + $mySessions = $pagination->getElements(); + $this->view->pagination = $pagination->pagination(); $this->view->page = $pagination->getRequestPage(); - $this->view->sessions = $mySessions; - - } - - public function searchAction(){ + $this->view->sessions = $mySessions; + + } + + public function searchAction(){ $this->_redirect('/user/session/index/search/'.($_GET['search'])); } } +function sortFunc($func_a, $func_b) { + if($func_a->getID() == $func_b->getID()) return 0; + return ($func_a->getID() < $func_b->getID()) ? 1 : -1; +} \ No newline at end of file diff --git a/application/modules/user/views/scripts/bootos/index.phtml b/application/modules/user/views/scripts/bootos/index.phtml index 00a0eb8..c2ce559 100644 --- a/application/modules/user/views/scripts/bootos/index.phtml +++ b/application/modules/user/views/scripts/bootos/index.phtml @@ -53,7 +53,7 @@ 'page' => $this->page ), 'default', - true, false) ?>">Updates available + true, false) ?>">Updates available No updates available diff --git a/application/modules/user/views/scripts/index/index.phtml b/application/modules/user/views/scripts/index/index.phtml index f00d0dd..4acdfca 100644 --- a/application/modules/user/views/scripts/index/index.phtml +++ b/application/modules/user/views/scripts/index/index.phtml @@ -5,7 +5,7 @@ links)>0 && is_array($this->links)): ?> diff --git a/send-post.html b/send-post.html index 6cad8c8..addeec8 100644 --- a/send-post.html +++ b/send-post.html @@ -10,11 +10,11 @@ http://132.230.4.27/
-
+
-
+
-
+
@@ -22,11 +22,11 @@ http://pbs2.local/
-
+
-
+
-
+
@@ -34,11 +34,11 @@ http://localhost:81/
-
+
-
+
-
+
-- cgit v1.2.3-55-g7522