Ejemplo n.º 1
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form')->setName('search');
     $elements = array();
     $mapperDrhTrainingPlan = new Fefop_Model_Mapper_DRHTrainingPlan();
     $institutes = $mapperDrhTrainingPlan->listIntitutes();
     $optInstitute[''] = '';
     foreach ($institutes as $institute) {
         $optInstitute[$institute['fk_id_fefpeduinstitution']] = $institute['entity'];
     }
     $elements[] = $this->createElement('select', 'fk_id_fefpeduinstitution')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Entidade responsável ba formasaun')->addMultiOptions($optInstitute);
     $mapperDrhContract = new Fefop_Model_Mapper_DRHContract();
     $trainingProvider = $mapperDrhContract->listTrainingProvider();
     $optTrainingProvider[''] = '';
     foreach ($trainingProvider as $institute) {
         $optTrainingProvider[$institute['responsible']] = $institute['institution'];
     }
     $elements[] = $this->createElement('select', 'training_provider')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Sentru Formasaun')->addMultiOptions($optTrainingProvider);
     $mapperScholarityArea = new Register_Model_Mapper_ScholarityArea();
     $sections = $mapperScholarityArea->fetchAll();
     $optScholarityArea[''] = '';
     foreach ($sections as $section) {
         $optScholarityArea[$section['id_scholarity_area']] = $section['scholarity_area'];
     }
     $elements[] = $this->createElement('select', 'fk_id_scholarity_area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Area Kursu')->addMultiOptions($optScholarityArea);
     $dbOccupationTimor = App_Model_DbTable_Factory::get('PROFOcupationTimor');
     $occupations = $dbOccupationTimor->fetchAll();
     $optOccupations[''] = '';
     foreach ($occupations as $occupation) {
         $optOccupations[$occupation['id_profocupationtimor']] = $occupation['acronym'] . ' ' . $occupation['ocupation_name_timor'];
     }
     $elements[] = $this->createElement('select', 'fk_id_profocupationtimor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Dezignasaun')->addMultiOptions($optOccupations);
     $dbCountry = App_Model_DbTable_Factory::get('AddCountry');
     $countries = $dbCountry->fetchAll();
     $optCountry[''] = '';
     foreach ($countries as $country) {
         $optCountry[$country['id_addcountry']] = $country['country'];
     }
     $elements[] = $this->createElement('select', 'fk_id_addcountry')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nasaun')->addMultiOptions($optCountry);
     $optModality[''] = '';
     $optModality['L'] = 'Iha rai laran no ho entidade nasionál sira';
     $optModality['A'] = 'Iha rai liur';
     $optModality['T'] = 'Iha rai laran ho entidade formadora husi rai liur';
     $elements[] = $this->createElement('select', 'modality')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Modalidade')->addMultiOptions($optModality);
     $elements[] = $this->createElement('text', 'date_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask')->setLabel('Data hahú');
     $elements[] = $this->createElement('text', 'date_finish')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask')->setLabel('Data finalizasaun');
     $elements[] = $this->createElement('text', 'beneficiary')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12')->setLabel('Naran Benefisiariu');
     $this->addElements($elements);
 }
Ejemplo n.º 2
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form')->setName('search');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'minimum_amount')->setValue(1000)->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'maximum_amount')->setValue(200000)->setDecorators(array('ViewHelper'));
     $mapperDrhTrainingPlan = new Fefop_Model_Mapper_DRHTrainingPlan();
     $institutes = $mapperDrhTrainingPlan->listIntitutes();
     $optInstitute[''] = '';
     foreach ($institutes as $institute) {
         $optInstitute[$institute['fk_id_fefpeduinstitution']] = $institute['entity'];
     }
     $elements[] = $this->createElement('select', 'fk_id_fefpeduinstitution')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Entidade responsável ba formasaun')->addMultiOptions($optInstitute);
     $mapperScholarityArea = new Register_Model_Mapper_ScholarityArea();
     $sections = $mapperScholarityArea->fetchAll();
     $optScholarityArea[''] = '';
     foreach ($sections as $section) {
         $optScholarityArea[$section['id_scholarity_area']] = $section['scholarity_area'];
     }
     $elements[] = $this->createElement('select', 'fk_id_scholarity_area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Area Kursu')->addMultiOptions($optScholarityArea);
     $dbOccupationTimor = App_Model_DbTable_Factory::get('PROFOcupationTimor');
     $occupations = $dbOccupationTimor->fetchAll();
     $optOccupations[''] = '';
     foreach ($occupations as $occupation) {
         $optOccupations[$occupation['id_profocupationtimor']] = $occupation['acronym'] . ' ' . $occupation['ocupation_name_timor'];
     }
     $elements[] = $this->createElement('select', 'fk_id_profocupationtimor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Dezignasaun')->addMultiOptions($optOccupations);
     $dbCountry = App_Model_DbTable_Factory::get('AddCountry');
     $countries = $dbCountry->fetchAll();
     $optCountry[''] = '';
     foreach ($countries as $country) {
         $optCountry[$country['id_addcountry']] = $country['country'];
     }
     $elements[] = $this->createElement('select', 'fk_id_addcountry')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nasaun')->addMultiOptions($optCountry);
     $optModality[''] = '';
     $optModality['L'] = 'Em território e entidades nacionais';
     $optModality['A'] = 'No estrangeiro';
     $optModality['T'] = 'Em território nacional com entidade formadora estrangeira';
     $elements[] = $this->createElement('select', 'modality')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Modalidade')->addMultiOptions($optModality);
     $elements[] = $this->createElement('text', 'date_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask')->setLabel('Data hahú');
     $elements[] = $this->createElement('text', 'date_finish')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask')->setLabel('Data finalizasaun');
     $this->addElements($elements);
 }
Ejemplo n.º 3
0
 /**
  *
  * @param int $drhTraining
  * @return string 
  */
 public function getDrhTrainingPlan($drhTraining)
 {
     $view = Zend_Layout::getMvcInstance()->getView();
     $link = '<a href="%s" target="_blank">%s</a>';
     $DRHNum = Fefop_Model_Mapper_DRHTrainingPlan::buildNum($drhTraining->id_drh_trainingplan);
     $drhLink = sprintf($link, $view->baseUrl('/fefop/drh-training-plan/edit/id/' . $drhTraining->id_drh_trainingplan), $DRHNum);
     $currency = new Zend_Currency();
     return sprintf(self::DRH_GREATER, $drhLink, $currency->setValue(Fefop_Model_Mapper_DRHTrainingPlan::LIMIT_AMOUNT)->toCurrency(), $currency->setValue($drhTraining->amount)->toCurrency());
 }
Ejemplo n.º 4
0
 /**
  * 
  */
 public function searchBeneficiaryAction()
 {
     $this->_helper->layout()->disableLayout();
     $this->view->rows = $this->_mapper->listBeneficiariesByFilter($this->_getAllParams());
 }
Ejemplo n.º 5
0
 /**
  * 
  */
 public function listContractsAction()
 {
     $this->_helper->layout()->disableLayout();
     $id = $this->_getParam('id');
     // Fetch the Expenses related to the DRH module
     $mapperBudgetCategory = new Fefop_Model_Mapper_Expense();
     $this->view->expenses = $mapperBudgetCategory->expensesInItem(Fefop_Model_Mapper_Expense::CONFIG_PFPCI_DRH);
     $mapperDRHTrainingPlan = new Fefop_Model_Mapper_DRHTrainingPlan();
     $filters = array('no_contract' => true, 'training_plan' => $id);
     $this->view->beneficiaries = $mapperDRHTrainingPlan->listBeneficiariesByFilter($filters);
     $this->view->training_plan = $mapperDRHTrainingPlan->detail($id);
 }