lebenslauf <-> profil-Kopf

This commit is contained in:
Martin Müller 2014-04-13 20:39:12 +02:00
parent af2fd20f7e
commit cf44a07942
2 changed files with 15 additions and 12 deletions

View File

@ -81,9 +81,11 @@ class UserController extends AppController {
}else{ }else{
if(isset($profil['DreamjobWorker'])){ if(isset($profil['DreamjobWorker'])){
$cv = $this->DreamjobCvEntry->find('all',array('conditions' => array('worker_id'=> $profil['AppUser']['id']))); $cv = $this->DreamjobCvEntry->find('all',array('conditions' => array('worker_id'=> $profil['AppUser']['id'])));
if(!$self_company and $profil['AppUser']['id']==$self['AppUser']['id']) if(!$self_company and $profil['AppUser']['id']==$self['AppUser']['id']){
$this->request->data = $cv; $cvp0 = $this->DreamjobListCvCategory->find('first',array('conditions' => array('DreamjobListCvCategory.position' => 0)));
$this->set("cv",$cv); $this->set('cvp0', $cvp0);
$this->set("cv",$cv);
}
} }
} }
} }

View File

@ -18,13 +18,15 @@ if($edit){
$inCat= -1; $inCat= -1;
foreach($cv as $cvc){ foreach($cv as $cvc){
if ( $inCat != $cvc['DreamjobListCvCategory']['id'] ){ if ( $inCat != $cvc['DreamjobListCvCategory']['id'] ){
if($inCat == -1){ if($cvp0['DreamjobListCvCategory']['id'] != $cvc['DreamjobListCvCategory']['id']){
?> ?>
</table>
<?php } ?>
<h4><?=$cvc['DreamjobListCvCategory']['name'];?></h4> <h4><?=$cvc['DreamjobListCvCategory']['name'];?></h4>
<table class="cv"> <table class="cv">
<?php if($cvc['DreamjobListCvCategory']['position'] == 0){ ?> <?php
}else{
?>
<h4><?=$cvp0['DreamjobListCvCategory']['name'];?></h4>
<table class="cv">
<tr> <tr>
<td><?=__("dreamjob.bday");?></td> <td><?=__("dreamjob.bday");?></td>
<td> <td>
@ -48,11 +50,10 @@ if($edit){
<td><?=__("dreamjob.country.worker");?></td> <td><?=__("dreamjob.country.worker");?></td>
<td><?=$profil['DreamjobWorker']['country'];?></td> <td><?=$profil['DreamjobWorker']['country'];?></td>
</tr> </tr>
<?php <?php }
} $inCat = $cvc['DreamjobListCvCategory']['id'];
$inCat = $cvc['DreamjobListCvCategory']['id']; }
} ?>
?>
<tr> <tr>
<?php <?php
if($cvc['DreamjobListCvCategory']['startdate'] and $cvc['DreamjobListCvCategory']['enddate'] and $cvc['DreamjobListCvCategory']['place']){ if($cvc['DreamjobListCvCategory']['startdate'] and $cvc['DreamjobListCvCategory']['enddate'] and $cvc['DreamjobListCvCategory']['place']){