From 9e30df97c5273dddff21ec0650fece03fad2a110 Mon Sep 17 00:00:00 2001
From: Simon
Date: Thu, 14 Apr 2011 15:07:32 +0200
Subject: Ticket #211 - Es werden Meldungen angezeigt, sobald es das eigene
oder andere Bootmenus sind
---
.../modules/fbgui/controllers/IndexController.php | 16 ++++++++++++++--
.../modules/fbgui/views/scripts/index/index.phtml | 9 +++------
2 files changed, 17 insertions(+), 8 deletions(-)
(limited to 'application/modules/fbgui')
diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php
index c27fb10..1058a11 100644
--- a/application/modules/fbgui/controllers/IndexController.php
+++ b/application/modules/fbgui/controllers/IndexController.php
@@ -90,11 +90,21 @@ class Fbgui_IndexController extends Zend_Controller_Action
// 'Your client is '.$session->getClientID(),
// 'goto bootmenu '.$bootmenuID);
+ $bootmenuMapper = new Application_Model_BootMenuMapper();
+ $bm = $bootmenuMapper->find($bootmenuID);
+ $this->view->title = $bm->getTitle();
+
$bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper();
$res = $bootmenuentriesMapper->findBy(array('bootmenuID' => $bootmenuID),false);
$this->view->entries = $res;
if (!Zend_Auth::getInstance()->hasIdentity()) {
- echo "Goto Login to get your Bootmenu";
+ #echo "Goto Login to get your Bootmenu";
+ $pbsNotifier = new Pbs_Notifier();
+ $this->view->notification = $pbsNotifier->notify("This is not your Bootmenu. You have to login to get your own Bootmenu.
Click here to login",'info');
+ }
+ if(Zend_Auth::getInstance()->hasIdentity() && $bm->MembershipID != $this->membership->getID() ){
+ $pbsNotifier = new Pbs_Notifier();
+ $this->view->notification = $pbsNotifier->notify("This is not your Bootmenu. There is currently a BootMenu with a higher priority active.",'info');
}
}
else{
@@ -106,7 +116,9 @@ class Fbgui_IndexController extends Zend_Controller_Action
// 'Your client is '.$session->getClientID(),
// 'there is no bootmenu for you');
- echo "Goto Login to get your Bootmenu";
+ $pbsNotifier = new Pbs_Notifier();
+ $this->view->notification = $pbsNotifier->notify("There is no BootMenu to show. Please log in to get your BootMenu.
Click here to login",'error');
+
}
}
else{
diff --git a/application/modules/fbgui/views/scripts/index/index.phtml b/application/modules/fbgui/views/scripts/index/index.phtml
index f12e93c..0ef6e4e 100644
--- a/application/modules/fbgui/views/scripts/index/index.phtml
+++ b/application/modules/fbgui/views/scripts/index/index.phtml
@@ -1,3 +1,4 @@
+notification != ''){echo $this->notification;} ?>
entries)):?>
-