dreamjob/app/View/Elements/user_worker_item.ctp

78 lines
2.7 KiB
PHP

<?php
/*
*
*/
$User = 'User';
$DreamjobUser = 'DreamjobUser';
$AppUser = 'AppUser';
$DreamjobListGraducation = 'DreamjobListGraducation';
if($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">
<img src="<?php
if($profil[$AppUser]['take_systemwide'])
if($profil[$User]['avatar'])
echo $MEDIA_URL.$profil[$User]['avatar'];
else
echo $STATIC_URL."img/icon_user.png";
else
if($profil[$AppUser]['avatar'])
echo $MEDIA_URL.$profil[$AppUser]['avatar'];
else
echo $STATIC_URL."img/icon_user.png";
?>"/>
</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($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($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"));
echo $this->Html->link($statusApp,array('controller'=>'job', 'action'=>'applicationGet', 'id'=> $profil['DreamjobJobApplication']['id']),array("class" => "btn btn-default"));
}
?>
</div>
</div>
</div>