dreamjob/app/View/Elements/job_opening_item.ctp

50 lines
1013 B
PHP

<?php
/*
*
*/
$opening_in_app = false;
$opening_in_fav=false;
if(isset($WORKER) and is_array($WORKER) and count($WORKER)>0){
foreach($WORKER['Favority'] as $val){
if($val['id'] == $opening['DreamjobJobOpening']['id'])
$opening_in_fav=true;
}
foreach($WORKER['DreamjobJobApplication'] as $val){
if($val['opening_id'] == $opening['DreamjobJobOpening']['id'])
$opening_in_app=true;
$opening_inApp=$val;
}
}
$avatar = false;
$url = '';
if($opening['AppUser']['avatar']){
$url = $MEDIA.DS.$opening['AppUser']['avatar'];
$avatar = true;
}
?>
<?php if(!empty($opening_MINI) or !($opening_in_app or $opening_in_fav)){ ?>
<div class="openingitem">
<div class="text">
<h1><?=$opening['DreamjobJobOpening']['title']; $this->Html->link(__('dreamjob.opening.detail'));?></h1>
<span><?=$opening['AppUser']['nickname'];?></span>
</div>
<div class="icon">
<?php if($avatar){ ?>
<div><img src="<?=$url;?>"/></div>
<?php
}else{
?>
<div></div>
<?php } ?>
</div>
</div>
<?php } ?>