From b99d7a884edabd9e5d297c8117ee7552ca702b96 Mon Sep 17 00:00:00 2001
From: Simon
Date: Wed, 16 Mar 2011 13:01:28 +0100
Subject: Arbeiten am Clientcontroller, Membership in Auth gesetzt
---
application/modules/dev/layouts/dev.phtml | 2 +-
application/modules/fbgui/layouts/fbgui.phtml | 2 +-
.../modules/user/controllers/AuthController.php | 1 +
.../modules/user/controllers/ClientController.php | 18 ++++++++++++++++--
.../modules/user/controllers/IndexController.php | 21 +++++++++++++++------
application/modules/user/layouts/user.phtml | 4 ++--
.../modules/user/views/scripts/index/index.phtml | 18 +++++++++++++++++-
7 files changed, 53 insertions(+), 13 deletions(-)
(limited to 'application/modules')
diff --git a/application/modules/dev/layouts/dev.phtml b/application/modules/dev/layouts/dev.phtml
index 2c7f6f0..b911944 100644
--- a/application/modules/dev/layouts/dev.phtml
+++ b/application/modules/dev/layouts/dev.phtml
@@ -22,7 +22,7 @@ echo $this->headScript()."\n";
-
dev
+
- Controller:
diff --git a/application/modules/fbgui/layouts/fbgui.phtml b/application/modules/fbgui/layouts/fbgui.phtml
index 1f10683..e3b286a 100644
--- a/application/modules/fbgui/layouts/fbgui.phtml
+++ b/application/modules/fbgui/layouts/fbgui.phtml
@@ -23,8 +23,8 @@ echo $this->headScript()."\n";
+
- fbgui
- Controller:
- Person
diff --git a/application/modules/user/controllers/AuthController.php b/application/modules/user/controllers/AuthController.php
index 4721616..76dc243 100644
--- a/application/modules/user/controllers/AuthController.php
+++ b/application/modules/user/controllers/AuthController.php
@@ -11,6 +11,7 @@ class User_AuthController extends Zend_Controller_Action
public function indexAction()
{
// action body
+ $_SESSION['membershipID'] = 1;
}
diff --git a/application/modules/user/controllers/ClientController.php b/application/modules/user/controllers/ClientController.php
index cb139d5..a8d0d3d 100644
--- a/application/modules/user/controllers/ClientController.php
+++ b/application/modules/user/controllers/ClientController.php
@@ -2,15 +2,29 @@
class User_ClientController extends Zend_Controller_Action
{
-
+ private $this->membership;
public function init()
{
/* Initialize action controller here */
+ $membershipMapper = new Application_Model_MembershipMapper();
+ $this->membership = new Application_Model_Membership();
+ $membershipMapper->find($_SESSION['membershipID'],$this->membership);
}
public function indexAction()
{
- // action body
+ // TODO: ACL: is he athorized to see this ?
+
+ // Get the Clients which booted with a bootiso of this group
+ $groupID = $this->membership->getGroupID();
+ $bootisoMapper = new Application_Model_BootIsoMapper();
+ $bootisos = $bootisoMapper->findby('groupID',$groupID);
+
+ $sessions
+
+
+
+
}
public function addclientAction()
diff --git a/application/modules/user/controllers/IndexController.php b/application/modules/user/controllers/IndexController.php
index d39ff21..8b295e0 100644
--- a/application/modules/user/controllers/IndexController.php
+++ b/application/modules/user/controllers/IndexController.php
@@ -2,17 +2,26 @@
class User_IndexController extends Zend_Controller_Action
{
-
public function init()
{
/* Initialize action controller here */
}
- public function indexAction()
- {
-
+ public function indexAction()
+ {
+ if (!Zend_Auth::getInstance()->hasIdentity()) {
+ $this->view->text = 'Your not logged in, please log in first here.';
+ }
+ else{
+ $this->view->text = "You're Welcome";
+ $links = array(
+ '/user/person' => 'Change your Details',
+ '/user/person/request' => 'Request Membership in a Group',
+ '/user/config' => 'Create your own Configuration',
+ '/user/bootmenu' => 'Create your Bootmenu',
+ );
+ }
+ $this->view->links = $links;
}
-
-
}
diff --git a/application/modules/user/layouts/user.phtml b/application/modules/user/layouts/user.phtml
index 91e5eb8..36d73b4 100644
--- a/application/modules/user/layouts/user.phtml
+++ b/application/modules/user/layouts/user.phtml
@@ -23,8 +23,8 @@ echo $this->headScript()."\n";
+
- user
- Controller:
- Person
@@ -37,7 +37,7 @@ echo $this->headScript()."\n";
- Client
- Filter
- Pool
-
+ - Auth
hasIdentity()) {?>
- Login
- Register
diff --git a/application/modules/user/views/scripts/index/index.phtml b/application/modules/user/views/scripts/index/index.phtml
index f4feaa0..77e0720 100644
--- a/application/modules/user/views/scripts/index/index.phtml
+++ b/application/modules/user/views/scripts/index/index.phtml
@@ -1,2 +1,18 @@
Welcome
-nothing to see here
+
+text;?>
+text;?>
+text;?>
+text;?>
+links);?>
+
+links)>0 && is_array($this->links)): ?>
+
+links as $link => $text):?>
+
+
+
+
+
+
+
--
cgit v1.2.3-55-g7522