dreamjob/app/View/Elements/user_worker_item.ctp

68 lines
2.6 KiB
Plaintext
Raw Permalink Normal View History

2015-03-31 14:49:03 +02:00
<?php
/*
*
*/
$User = 'User';
$DreamjobUser = 'DreamjobUser';
$AppUser = 'AppUser';
$DreamjobListGraducation = 'DreamjobListGraducation';
if(isset($enableOpening) and $enableOpening){
$User = 'WorkerUser';
$DreamjobUser = 'DreamjobUserWorker';
$AppUser = 'AppUserWorker';
$DreamjobListGraducation = 'WorkerGraducation';
}
// echo var_dump($profil);
?>
<div class="openingitem">
<h3><?=$profil[$AppUser]['first_name'].' '.$profil[$AppUser]['last_name'];?></h3>
<div class="icon">
<?php
$url='/img/icon_user.png';
if($profil[$AppUser]['avatar'])
$url = $MEDIA.DS.$profil[$AppUser]['avatar'];
?>
<img src="<?=$url;?>"/>
</div>
<div class="left">
<span><?=__('dreamjob.city').': '.$profil['DreamjobListCity']['name'];?></span>
<span><?=__('dreamjob.graducation').': '.$profil[$DreamjobListGraducation]['name'];?></span>
<?php if($profil['DreamjobWorker']['workexperience']){ ?>
<span><?=__('dreamjob.workexperience').': '.$profil['DreamjobWorker']['workexperience'].' '.__('dreamjob.years');?></span>
<?php } ?>
<?php if(isset($enableOpening) and $enableOpening){ ?>
<span><?=$this->Time->format('d.m.Y H:i', $profil['DreamjobJobApplication']['created']);?></span>
<?php } ?>
</div>
<div class="right">
<div class="btn-group-vertical">
<?php
if(isset($enableOpening) and $enableOpening){
$status = __('dreamjob.application.close');
$statusApp = null;
$archiv = array("archiv"=> $profil['DreamjobJobApplication']['id']);
if(!$profil['DreamjobJobApplication']['closed']){
$status = __('dreamjob.application.close.actived');
$statusApp= count($profil['DreamjobJobMsg']);
$newcount=0;
foreach($profil['DreamjobJobMsg'] as $msg)
if(!$msg['saw'])
$newcount++;
if($newcount>0)
$statusApp = $newcount."/".$statusApp;
$statusApp =__('dreamjob.applicated.to').' <span class="badge">'.$statusApp.'</span>';
$archiv['filter'] = 'archiv';
}else{
$statusApp = __('dreamjob.application');
}
echo $this->Html->link($status,array('controller'=>'job', 'action'=>'applicationByOpening', 'id'=> $profil['DreamjobJobApplication']['opening_id'],'?'=>$archiv),array("class" => "btn btn-default",'escape' => false));
echo $this->Html->link($statusApp,array('controller'=>'job', 'action'=>'applicationGet', 'id'=> $profil['DreamjobJobApplication']['id']),array("class" => "btn btn-default",'escape' => false));
}else{
echo $this->Html->link(__('dreamjob.details'),array('controller'=>'user', 'action'=>'profil', 'id'=> $profil[$AppUser]['id']),array("class" => "btn btn-default"));
}
?>
</div>
</div>
</div>