From 3a3bd96f8b6f8168f488f56342883613b2f5e3c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Tue, 22 Apr 2014 22:59:02 +0200 Subject: [PATCH] errors --- app/Controller/JobController.php | 5 ++++- app/View/Job/application.ctp | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Controller/JobController.php b/app/Controller/JobController.php index 21a78e9..c7c7d83 100644 --- a/app/Controller/JobController.php +++ b/app/Controller/JobController.php @@ -10,7 +10,7 @@ class JobController extends AppController { * @var array */ - public $uses = array('DreamjobJobOpening','DreamjobJobFavority','DreamjobJobApplication','DreamjobPageText','DreamjobPageImage','DreamjobJobMsg','DreamjobCvEntry','DreamjobListBranch'); + public $uses = array('DreamjobJobOpening','DreamjobJobFavority','DreamjobJobApplication','DreamjobPageText','DreamjobPageImage','DreamjobJobMsg','DreamjobCvEntry','DreamjobListCvCategory','DreamjobListBranch','DreamjobListCity'); /** * Displays a view @@ -213,6 +213,7 @@ class JobController extends AppController { $this->render('/Home/error'); }else{ $this->set('page',null); + $this->set("edit",false); if(!empty($this->request->params['hiv'])){ $this->DreamjobJobApplication->id = $application['DreamjobJobApplication']['id']; if ($this->DreamjobJobApplication->saveField('closed',!$application['DreamjobJobApplication']['closed'])) { @@ -247,6 +248,8 @@ class JobController extends AppController { if(!empty($this->request->params['vitea'])){ $cv = $this->DreamjobCvEntry->find('all',array('conditions' => array('worker_id'=> $application['DreamjobJobApplication']['worker_id']))); $this->set("cv",$cv); + $cvp0 = $this->DreamjobListCvCategory->find('first',array('conditions' => array('DreamjobListCvCategory.position' => 0))); + $this->set('cvp0', $cvp0); }else{ if(!empty($this->request->params['page'])){ /*$this->set('pageInh',$this->DreamjobJobApplication->Page->find('first', diff --git a/app/View/Job/application.ctp b/app/View/Job/application.ctp index 2bc881d..d90694a 100644 --- a/app/View/Job/application.ctp +++ b/app/View/Job/application.ctp @@ -99,16 +99,17 @@ element('user_worker_cv'); + echo $this->element('user_worker_cv',array('profil'=>array('User'=>$application['WorkerUser'] + ,'AppUser'=>$application['AppUserWorker'],'DreamjobWorker'=>$application['DreamjobWorker'],'DreamjobListGraducation'=>$application['WorkerGraducation'],'DreamjobListCity'=>$application['DreamjobWorkerListCity']))); ?> $page['PageText'],"DreamjobPageInh"=>$pageInh['Page']); + $page = array("DreamjobPageText"=>$page['PageText'],"DreamjobPageInh"=>$page['DreamjobPageInh']); else - $page = array("DreamjobPageImage"=>$page['PageImage'],"DreamjobPageInh"=>$pageInh['Page']); + $page = array("DreamjobPageImage"=>$page['PageImage'],"DreamjobPageInh"=>$page['DreamjobPageInh']); echo $this->element('user_page',array("page"=>$page)); ?>