dreamjob/app/View/Elements/user_worker_item.ctp

79 lines
2.9 KiB
PHP

<?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>
<?php
if($profil[$AppUser]['take_systemwide'])
echo $profil[$User]['first_name'].' '.$profil[$User]['last_name'];
else
echo $profil[$AppUser]['first_name'].' '.$profil[$AppUser]['last_name'];
?>
</h3>
<div class="icon">
<?php
$url='/img/icon_user.png';
if($profil[$AppUser]['take_systemwide'])
if($profil[$User]['avatar'])
$url = $MEDIA.DS.$profil[$User]['avatar'];
else
if($profil[$AppUser]['avatar'])
$url = $MEDIA.DS.$profil[$AppUser]['avatar'];
?>
<img src="<?=$url;?>"/>
</div>
<div class="left">
<span><?=__('dreamjob.city').': '.$profil[$DreamjobUser]['city'];?></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.activet';
$statusApp= count($profil['DreamjobJobMsg']);
$newcount=0;
foreach($profil['DreamjobJobMsg'] as $msg)
if(!$msg['saw'])
$newcount++;
if($newcount>0)
$statusApp = $newcount."/".$statusApp;
$statusApp =__('dreamjob.applicated').'<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' => true));
echo $this->Html->link($statusApp,array('controller'=>'job', 'action'=>'applicationGet', 'id'=> $profil['DreamjobJobApplication']['id']),array("class" => "btn btn-default",'escape' => true));
}else{
echo $this->Html->link(__('dreamjob.details'),array('controller'=>'user', 'action'=>'profil', 'id'=> $profil[$AppUser]['id']),array("class" => "btn btn-default"));
}
?>
</div>
</div>
</div>