diff --git a/app/Controller/UserController.php b/app/Controller/UserController.php index f1c0dde..a93992b 100755 --- a/app/Controller/UserController.php +++ b/app/Controller/UserController.php @@ -81,9 +81,11 @@ class UserController extends AppController { }else{ if(isset($profil['DreamjobWorker'])){ $cv = $this->DreamjobCvEntry->find('all',array('conditions' => array('worker_id'=> $profil['AppUser']['id']))); - if(!$self_company and $profil['AppUser']['id']==$self['AppUser']['id']) - $this->request->data = $cv; - $this->set("cv",$cv); + if(!$self_company and $profil['AppUser']['id']==$self['AppUser']['id']){ + $cvp0 = $this->DreamjobListCvCategory->find('first',array('conditions' => array('DreamjobListCvCategory.position' => 0))); + $this->set('cvp0', $cvp0); + $this->set("cv",$cv); + } } } } diff --git a/app/View/Elements/user_worker_cv.ctp b/app/View/Elements/user_worker_cv.ctp index dab9dd6..abd0668 100644 --- a/app/View/Elements/user_worker_cv.ctp +++ b/app/View/Elements/user_worker_cv.ctp @@ -18,13 +18,15 @@ if($edit){ $inCat= -1; foreach($cv as $cvc){ if ( $inCat != $cvc['DreamjobListCvCategory']['id'] ){ - if($inCat == -1){ + if($cvp0['DreamjobListCvCategory']['id'] != $cvc['DreamjobListCvCategory']['id']){ ?> - -

- + +

+
- +
@@ -48,11 +50,10 @@ if($edit){