Exemplo n.º 1
0
 public function getExpertisearea()
 {
     if (count($this->expertisearea) == 0) {
         $exp = new Staff_Domain_Volunteer();
         $this->expertisearea = $exp->getExpertiseAreas($this->id);
     }
     return $this->expertisearea;
 }
 public function getAction()
 {
     if ($this->_isUserAllowed(null, null)) {
         if ($this->_hasParam('id') || $this->_hasParam('person')) {
             $id = $this->_getParam('id') ? $this->_getParam('id') : $this->_getParam('person');
             $domain = new Staff_Domain_Volunteer();
             $emp = $domain->getById($id);
             $this->view->volunteer = $emp;
         }
     }
 }
Exemplo n.º 3
0
 public function injectGlobalMenu()
 {
     //TODO ACL
     $globalMenu = Zend_Registry::get('Navigation.GlobalMenu');
     $menuAdm = $globalMenu->findOneBy('id', 'menu-adm');
     if ($menuAdm === null) {
         $menuAdm = new Zend_Navigation_Page_Uri(array('label' => '{{i class=||icon-cog||}}{{/i}} {{translate}}Administration{{/translate}}', 'id' => 'menu-adm', 'uri' => '#', 'order' => 999));
     }
     if (!$globalMenu->findOneBy('id', 'menu-staff-adm')) {
         $newPage = new Zend_Navigation_Page_Mvc(array('label' => '{{i class=||icon-group||}}{{/i}} {{translate}}Staff{{/translate}}', 'id' => 'menu-staff-adm', 'parent' => $menuAdm, 'load-in' => 'content-container', 'action' => 'index', 'controller' => 'gm', 'module' => 'aganacore', 'params' => array('id' => 'staff')));
     }
     $menuReg = $globalMenu->findOneBy('id', 'menu-registrations');
     if ($menuReg === null) {
         $menuReg = new Zend_Navigation_Page_Uri(array('label' => '{{i class=||icon-list-alt||}}{{/i}} {{translate}}Registrations{{/translate}}', 'id' => 'menu-registrations', 'uri' => '#', 'order' => 998));
     }
     $pageHeader = new Zend_Navigation_Page_Uri(array('label' => '{{i class=||icon-group||}}{{/i}} {{translate}}Staff{{/translate}}', 'parent' => $menuReg, 'id' => 'menu-persons-header', 'class' => 'nav-header'));
     if (!$globalMenu->findOneBy('id', 'menu-staff-employee')) {
         $newPage = new Zend_Navigation_Page_Mvc(array('label' => '{{i class=||icon-group||}}{{/i}} {{translate}}List Employees{{/translate}}', 'id' => 'menu-staff-employee', 'parent' => $menuReg, 'load-in' => 'content-container', 'action' => 'index', 'controller' => 'employee', 'module' => 'staff', 'route' => 'default'));
     }
     if (Staff_Domain_Volunteer::isControllerEnabled()) {
         if (!$globalMenu->findOneBy('id', 'menu-staff-volunteer')) {
             $newPage = new Zend_Navigation_Page_Mvc(array('label' => '{{i class=||icon-group||}}{{/i}} {{translate}}List Volunteers{{/translate}}', 'id' => 'menu-staff-volunteer', 'parent' => $menuReg, 'load-in' => 'content-container', 'action' => 'index', 'controller' => 'volunteer', 'module' => 'staff', 'route' => 'default'));
         }
     }
     $globalMenu->addPage($menuAdm);
     $globalMenu->addPage($menuReg);
 }
Exemplo n.º 4
0
 public function __construct()
 {
     $boot = Agana_Util_Bootstrap::getBootstrap('staff');
     $boot = $boot->getOptions();
     $this->_name = 'Staff';
     $this->_navigation[] = array('icon' => 'icon-group', 'label' => 'Employees', 'module' => 'staff', 'controller' => 'employee', 'action' => 'list', 'route' => 'default', 'uri' => '', 'title' => '');
     if (Staff_Domain_Volunteer::isControllerEnabled()) {
         $this->_navigation[] = array('icon' => 'icon-group', 'label' => 'Volunteers', 'module' => 'staff', 'controller' => 'volunteer', 'action' => 'list', 'route' => 'default', 'uri' => '', 'title' => '');
     }
     $this->_navigation[] = array('icon' => 'icon-wrench', 'label' => 'Job function', 'module' => 'staff', 'controller' => 'jobfunction', 'action' => 'list', 'route' => 'default', 'uri' => '', 'title' => '');
     if (Staff_Domain_Expertisearea::isControllerEnabled()) {
         $this->_navigation[] = array('icon' => 'icon-certificate', 'label' => 'Expertise area', 'module' => 'staff', 'controller' => 'expertisearea', 'action' => 'list', 'route' => 'default', 'uri' => '', 'title' => '');
     }
 }
Exemplo n.º 5
0
 function _initPersonDependency()
 {
     if (Zend_Registry::isRegistered('Person-Dependency-Domain')) {
         $p = Zend_Registry::get('Person-Dependency-Domain');
     } else {
         $p = array();
     }
     // Employee
     $dep['domain']['class'] = 'Staff_Domain_Employee';
     $dep['menu']['label'] = 'Employee';
     $dep['menu']['title'] = 'Employee';
     $dep['menu']['icon'] = 'icon-group';
     $dep['menu']['module'] = 'staff';
     $dep['menu']['controller'] = 'employee';
     $dep['menu']['action'] = 'get';
     $dep['menu']['new']['title'] = 'Add new Employee';
     $dep['menu']['new']['module'] = 'staff';
     $dep['menu']['new']['controller'] = 'employee';
     $dep['menu']['new']['action'] = 'create';
     $p[] = $dep;
     Zend_Registry::getInstance()->set('Person-Dependency-Domain', $p);
     // Volunteer
     if (Staff_Domain_Volunteer::isControllerEnabled($this->getOptions())) {
         unset($dep);
         $dep['domain']['class'] = 'Staff_Domain_Volunteer';
         $dep['menu']['label'] = 'Volunteer';
         $dep['menu']['title'] = 'Volunteer';
         $dep['menu']['icon'] = 'icon-group';
         $dep['menu']['module'] = 'staff';
         $dep['menu']['controller'] = 'volunteer';
         $dep['menu']['action'] = 'get';
         $dep['menu']['new']['title'] = 'Add new Volunteer';
         $dep['menu']['new']['module'] = 'staff';
         $dep['menu']['new']['controller'] = 'volunteer';
         $dep['menu']['new']['action'] = 'create';
         Zend_Registry::getInstance()->set('Person-Dependency-Domain', $p);
         $p[] = $dep;
     }
     Zend_Registry::getInstance()->set('Person-Dependency-Domain', $p);
 }