From b70a9c8fae8c49d91673d94ce7340dea5c71d7f1 Mon Sep 17 00:00:00 2001 From: michael pereira Date: Fri, 23 Sep 2011 20:09:04 +0200 Subject: personid --- .../modules/ipxe/controllers/ResourceController.php | 14 +++++++------- .../modules/ipxe/views/scripts/resource/getvesamenu.phtml | 6 +++++- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'application/modules') diff --git a/application/modules/ipxe/controllers/ResourceController.php b/application/modules/ipxe/controllers/ResourceController.php index 36a0c86..00b5f29 100644 --- a/application/modules/ipxe/controllers/ResourceController.php +++ b/application/modules/ipxe/controllers/ResourceController.php @@ -18,13 +18,6 @@ class Ipxe_ResourceController extends Zend_Controller_Action public function init() { - - $person = $this->_request->getParam('person'); - if (isset($person)) { - $this->membershipMapper = new Application_Model_MembershipMapper(); - $this->memberships = $this->membershipMapper->findBy(array("personID" => $person),true); - } - $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); @@ -119,6 +112,13 @@ class Ipxe_ResourceController extends Zend_Controller_Action $login = $this->_request->getParam('login') == 'true'; if($login){ + + $person = $this->_request->getParam('person'); + if (isset($person)) { + $this->membershipMapper = new Application_Model_MembershipMapper(); + $this->memberships = $this->membershipMapper->findBy(array("personID" => $person),true); + } + $this->memberships = null; $groupMapper = new Application_Model_GroupMapper(); $roleMapper = new Application_Model_RoleMapper(); if(isset($this->memberships)) { diff --git a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml index 7ad44ba..c9c835f 100644 --- a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml +++ b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml @@ -105,10 +105,14 @@ MENU MSGCOLOR #ff1c2a33 #00000000 none title ( "Select Membership:" ); if(isset($this->memberships)){ foreach($this->memberships as $membership){ - uriboot ($membership['group'], 'test', 'test'); + uriboot ($membership['group']." as ".$membership['role'], 'test', 'test'); } + }else{ + label ("You have no memberships."); + uriboot ( "Return to Group Bootmenu", "/ipxe/auth/serial/serialnumber/55-44-33-22-11/mac/123/login/false", "" ); } + } -- cgit v1.2.3-55-g7522