lebenslauf <-> profil-Kopf

This commit is contained in:
Martin Müller 2014-04-13 20:06:35 +02:00
parent fd0212e071
commit b243acf97d
8 changed files with 76 additions and 26 deletions

View File

@ -139,7 +139,7 @@ class UserController extends AppController {
$this->MiconwareSession->setFlash('dreamjob.settings.save.error','flash',array('alert'=>'danger')); $this->MiconwareSession->setFlash('dreamjob.settings.save.error','flash',array('alert'=>'danger'));
} }
} }
$cvc = $this->DreamjobListCvCategory->find('all',array('order'=>'id')); $cvc = $this->DreamjobListCvCategory->find('all');
$cve = $this->DreamjobCvEntry->find('all',array('conditions' => array('worker_id'=> $self['AppUser']['id']))); $cve = $this->DreamjobCvEntry->find('all',array('conditions' => array('worker_id'=> $self['AppUser']['id'])));
$cve2 = array('DreamjobCvEntry'=>null); $cve2 = array('DreamjobCvEntry'=>null);
foreach($cve as $i => $data) foreach($cve as $i => $data)

View File

@ -27,7 +27,7 @@ class DreamjobCvEntry extends AppModel {
* @var string * @var string
*/ */
public $displayField = 'title'; public $displayField = 'title';
public $order = array('DreamjobCvEntry.category_id','DreamjobCvEntry.enddate desc','DreamjobCvEntry.id'); public $order = array('DreamjobListCvCategory.position','DreamjobCvEntry.enddate desc','DreamjobCvEntry.id');
public function saveAndDelete($data,$old){ public function saveAndDelete($data,$old){
$dataSource = $this->getDataSource(); $dataSource = $this->getDataSource();

View File

@ -26,6 +26,7 @@ class DreamjobListCvCategory extends AppModel {
* @var string * @var string
*/ */
public $displayField = 'name'; public $displayField = 'name';
public $order ='position';
/** /**
* Validation rules * Validation rules

View File

@ -24,7 +24,32 @@ if($edit){
<?php } ?> <?php } ?>
<h4><?=$cvc['DreamjobListCvCategory']['name'];?></h4> <h4><?=$cvc['DreamjobListCvCategory']['name'];?></h4>
<table class="cv"> <table class="cv">
<?php if($cvc['DreamjobListCvCategory']['position'] == 0){ ?>
<tr>
<td><?=__("dreamjob.bday");?></td>
<td>
<?php
if($profil['AppUser']['take_systemwide'])
echo $this->Time->format('d.m.Y', $profil['User']['bday']);
else
echo $this->Time->format('d.m.Y', $profil['AppUser']['bday']);
?>
</td>
</tr>
<tr>
<td><?=__("dreamjob.workexperience");?></td>
<td><?=$profil['DreamjobWorker']['workexperience'];?></td>
</tr>
<tr>
<td><?=__("dreamjob.graducation.worker");?></td>
<td><?=$profil['DreamjobListGraducation']['name'];?></td>
</tr>
<tr>
<td><?=__("dreamjob.country.worker");?></td>
<td><?=$profil['DreamjobWorker']['country'];?></td>
</tr>
<?php <?php
}
$inCat = $cvc['DreamjobListCvCategory']['id']; $inCat = $cvc['DreamjobListCvCategory']['id'];
} }
?> ?>

View File

@ -22,6 +22,31 @@ echo $this->Html->link($text,array('controller'=>'user','action'=>'profil'),arra
<h4><?=$cvc_item['DreamjobListCvCategory']['name'];?></h4> <h4><?=$cvc_item['DreamjobListCvCategory']['name'];?></h4>
<table class="cv table table-striped"> <table class="cv table table-striped">
<tbody> <tbody>
<?php if($cvc_item['DreamjobListCvCategory']['position'] == 0){ ?>
<tr>
<td><?=__("dreamjob.bday");?></td>
<td>
<?php
if($profil['AppUser']['take_systemwide'])
echo $this->Time->format('d.m.Y', $profil['User']['bday']);
else
echo $this->Time->format('d.m.Y', $profil['AppUser']['bday']);
?>
</td>
</tr>
<tr>
<td><?=__("dreamjob.workexperience");?></td>
<td><?=$profil['DreamjobWorker']['workexperience'];?></td>
</tr>
<tr>
<td><?=__("dreamjob.graducation.worker");?></td>
<td><?=$profil['DreamjobListGraducation']['name'];?></td>
</tr>
<tr>
<td><?=__("dreamjob.country.worker");?></td>
<td><?=$profil['DreamjobWorker']['country'];?></td>
</tr>
<?php } ?>
<?php <?php
while(count($cve) > $i and $cvc_item['DreamjobListCvCategory']['id']==$cve[$i]['DreamjobCvEntry']['category_id']){ while(count($cve) > $i and $cvc_item['DreamjobListCvCategory']['id']==$cve[$i]['DreamjobCvEntry']['category_id']){
?> ?>

View File

@ -33,32 +33,11 @@
<?=$profil['DreamjobWorker']['iam'];?> <?=$profil['DreamjobWorker']['iam'];?>
<c:out value="${profil.iam}"/> <c:out value="${profil.iam}"/>
</p> </p>
<?php if(!empty($WORKER) and is_array($WORKER) and count($WORKER) > 0){ ?>
<h3><?=__("dreamjob.mail");?></h3> <h3><?=__("dreamjob.mail");?></h3>
<a href="mailto:<?=$profil['User']['mail'];?>"> <a href="mailto:<?=$profil['User']['mail'];?>">
<?=$profil['User']['mail'];?> <?=$profil['User']['mail'];?>
</a> </a>
</div> <?php } ?>
<div class="bar">
<p>
<?=__("dreamjob.bday");?>:<br/>
<?php
if($profil['AppUser']['take_systemwide'])
echo $this->Time->format('d.m.Y', $profil['User']['bday']);
else
echo $this->Time->format('d.m.Y', $profil['AppUser']['bday']);
?>
</p>
<p>
<?=__("dreamjob.workexperience");?>:<br/>
<?=$profil['DreamjobWorker']['workexperience'];?>
</p>
<p>
<?=__("dreamjob.graducation.worker");?>:<br/>
<?=$profil['DreamjobListGraducation']['name'];?>
</p>
<p>
<?=__("dreamjob.country.worker");?>:<br/>
<?=$profil['DreamjobWorker']['country'];?>
</p>
</div> </div>
</div> </div>

View File

@ -50,5 +50,12 @@ if(( !empty($COMPANY) and is_array($COMPANY) and count($COMPANY) > 0 and ($COMPA
<!-- /tab --> <!-- /tab -->
</div> </div>
<?php <?php
} }elseif( !empty($COMPANY) and is_array($COMPANY) and count($COMPANY) > 0){
?>
<div class="box">
<h1><?=__('dreamjob.company.nopro.title');?></h1>
<?=__('dreamjob.company.nopro');?>
</div>
<?php
}
?> ?>

View File

@ -74,3 +74,16 @@ Update `mic_dj_cv_entry` left join `mic_dj_cv_category` on `mic_dj_cv_category`.
Update `mic_sys_micacc` `a` join `mic_sys_micacc` `d` on `d`.`id` = `a`.`id` set `a`.`code`=concat('a:',`d`.`code`) where not `a`.`code` like '_:%' and not `a`.`code` =''; Update `mic_sys_micacc` `a` join `mic_sys_micacc` `d` on `d`.`id` = `a`.`id` set `a`.`code`=concat('a:',`d`.`code`) where not `a`.`code` like '_:%' and not `a`.`code` ='';
--Update `mic_sys_micacc` `a` join `mic_sys_micacc` `d` on `d`.`id` = `a`.`id` set `a`.`code`=replace(`d`.`code`,'a:','') where `a`.`code` like 'a:\%%' --Update `mic_sys_micacc` `a` join `mic_sys_micacc` `d` on `d`.`id` = `a`.`id` set `a`.`code`=replace(`d`.`code`,'a:','') where `a`.`code` like 'a:\%%'
--Update `mic_sys_micacc` `a` join `mic_sys_micacc` `d` on `d`.`id` = `a`.`id` set `a`.`code`=replace(`d`.`code`,'a:','') where not `a`.`code` like '_:%' --Update `mic_sys_micacc` `a` join `mic_sys_micacc` `d` on `d`.`id` = `a`.`id` set `a`.`code`=replace(`d`.`code`,'a:','') where not `a`.`code` like '_:%'
-- cv sortieren
ALTER TABLE `mic_dj_list_cv-category` ADD `position` INT NOT NULL AFTER `id`;
UPDATE `muellersql3`.`mic_dj_list_cv-category` SET `position` = '10' WHERE `mic_dj_list_cv-category`.`id` = 1;
UPDATE `muellersql3`.`mic_dj_list_cv-category` SET `position` = '20' WHERE `mic_dj_list_cv-category`.`id` = 9;
UPDATE `muellersql3`.`mic_dj_list_cv-category` SET `position` = '30' WHERE `mic_dj_list_cv-category`.`id` = 3;
UPDATE `muellersql3`.`mic_dj_list_cv-category` SET `position` = '40' WHERE `mic_dj_list_cv-category`.`id` = 5;
UPDATE `muellersql3`.`mic_dj_list_cv-category` SET `position` = '50' WHERE `mic_dj_list_cv-category`.`id` = 6;
UPDATE `muellersql3`.`mic_dj_list_cv-category` SET `position` = '60' WHERE `mic_dj_list_cv-category`.`id` = 7;
UPDATE `muellersql3`.`mic_dj_list_cv-category` SET `position` = '70' WHERE `mic_dj_list_cv-category`.`id` = 8;
UPDATE `muellersql3`.`mic_dj_list_cv-category` SET `position` = '80' WHERE `mic_dj_list_cv-category`.`id` = 2;
UPDATE `muellersql3`.`mic_dj_list_cv-category` SET `position` = '90' WHERE `mic_dj_list_cv-category`.`id` = 10;