summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorSebastian Wagner2011-08-22 16:39:15 +0200
committerSebastian Wagner2011-08-22 16:39:15 +0200
commit5a8c4a0b47d5d92448f13a2caac9724afcd505b6 (patch)
treeb36e3d3667d35977888ec7f0059d12030921dc34 /application
parentMerge branch 'master' of git.openslx.org:lsfks/projekte/poolctrl (diff)
downloadpoolctrl-5a8c4a0b47d5d92448f13a2caac9724afcd505b6.tar.gz
poolctrl-5a8c4a0b47d5d92448f13a2caac9724afcd505b6.tar.xz
poolctrl-5a8c4a0b47d5d92448f13a2caac9724afcd505b6.zip
kleine Korrektur
Diffstat (limited to 'application')
-rw-r--r--application/controllers/EventController.php46
-rw-r--r--application/views/scripts/event/index.phtml8
2 files changed, 27 insertions, 27 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index 39eb9e7..1367109 100644
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -27,22 +27,7 @@ class EventController extends Zend_Controller_Action
public function init()
{
$actionName = $this->getRequest()->getActionName();
- if (Zend_Auth::getInstance()->hasIdentity()) {
- $bootstrap = $this->getInvokeArg('bootstrap');
- $this->config = $bootstrap->getOptions();
- $this->pbs2host = $this->config['pbs2']['host'];
- $this->userIDsNamespace = Zend_Session::namespaceGet('userIDs');
- if(isset($this->userIDsNamespace['apikey'])) {
- $this->acl = new Poolctrl_Acl($this->pbs2host, $this->config['pbs2']['checkright'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
- }
- if($this->userIDsNamespace['membershipID'] !='') {
- $this->eventMapper = new Application_Model_EventMapper();
- $this->eventcategoryMapper = new Application_Model_EventcategoryMapper();
- } else {
- $this->_helper->redirector('selectmembership', 'person');
- return;
- }
- } else if($actionName == "report" || $actionName == "run") {
+ if($actionName == "report" || $actionName == "run") {
$this->userIDsNamespace = Zend_Session::namespaceGet('userIDs');
if(isset($this->userIDsNamespace['apikey'])) {
$apikey = $this->userIDsNamespace['apikey'];
@@ -97,6 +82,21 @@ class EventController extends Zend_Controller_Action
$this->eventMapper = new Application_Model_EventMapper();
$this->eventcategoryMapper = new Application_Model_EventcategoryMapper();
}
+ } else if (Zend_Auth::getInstance()->hasIdentity()) {
+ $bootstrap = $this->getInvokeArg('bootstrap');
+ $this->config = $bootstrap->getOptions();
+ $this->pbs2host = $this->config['pbs2']['host'];
+ $this->userIDsNamespace = Zend_Session::namespaceGet('userIDs');
+ if(isset($this->userIDsNamespace['apikey'])) {
+ $this->acl = new Poolctrl_Acl($this->pbs2host, $this->config['pbs2']['checkright'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
+ }
+ if($this->userIDsNamespace['membershipID'] !='') {
+ $this->eventMapper = new Application_Model_EventMapper();
+ $this->eventcategoryMapper = new Application_Model_EventcategoryMapper();
+ } else {
+ $this->_helper->redirector('selectmembership', 'person');
+ return;
+ }
} else {
$this->_helper->redirector('login', 'auth');
return;
@@ -498,18 +498,18 @@ class EventController extends Zend_Controller_Action
public function listeventsAction(){
-
+
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$eventList = $this->eventMapper->fetchAll();
foreach ($eventList as $event){
- if($event->getCategory() == 1){$color= 'green' AND $category= 'Lecture';}
- else if ($event->getCategory() == 2){$color= 'yellow' AND $category= 'Maintenance';}
- else if ($event->getCategory() == 3){$color= 'blue' AND $category= 'BootEvent';}
- else if ($event->getCategory() == 4){$color= 'red' AND $category= 'ShutdownEvent';}
- $events[] = array(
+ if($event->getCategory() == 1){$color= 'green' AND $category= 'Lecture';}
+ else if ($event->getCategory() == 2){$color= 'yellow' AND $category= 'Maintenance';}
+ else if ($event->getCategory() == 3){$color= 'blue' AND $category= 'BootEvent';}
+ else if ($event->getCategory() == 4){$color= 'red' AND $category= 'ShutdownEvent';}
+ $events[] = array(
$events[] = array(
'id' => $event->getID(),
@@ -523,7 +523,7 @@ class EventController extends Zend_Controller_Action
'bootosID' => $event->getPbs_bootosID(),
'allDay' => false,
'color' => $color,
- )
+ )
);
}
echo json_encode($events);
diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml
index a1db7b6..899e1e8 100644
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -20,10 +20,10 @@
</select>
</form>
-<input type=checkbox name="shutdown" checked=ON><font color="#008800">Lecture</font>
-<input type=checkbox name="shutdown" checked=ON><font color="#FFFF00">Maintenance</font>
-<input type=checkbox name="shutdown" checked=ON><font color="#0000FF">BootEvents</font>
-<input type=checkbox name="shutdown" checked=ON><font color="#FF0000">ShutdownEvents</font>
+<input type=checkbox name="shutdown" checked=ON><font style="background-color:#008800;">Lecture</font>
+<input type=checkbox name="shutdown" checked=ON><font style="background-color:#FFFF00">Maintenance</font>
+<input type=checkbox name="shutdown" checked=ON><font style="background-color:#0000FF">BootEvents</font>
+<input type=checkbox name="shutdown" checked=ON><font style="background-color:#FF0000">ShutdownEvents</font>
<div id='calendar' style='margin:3em 0;font-size:13px'></div>