dreamjob/app/View/Elements/job_opening_head.ctp

62 lines
2.6 KiB
Plaintext
Raw Permalink Normal View History

2015-03-31 14:49:03 +02:00
<?php
/*
*
*/
$avatar = false;
$url = '';
if($opening['AppUser']['avatar']){
$url = $MEDIA.DS.$opening['AppUser']['avatar'];
$avatar = true;
}
$fav=false;
$opening_in_app=false;
if(isset($WORKER['Favority'])){
foreach($WORKER['Favority'] as $val){
if($val['id'] == $opening['DreamjobJobOpening']['id'])
$fav=true;
}
foreach($WORKER['DreamjobJobApplication'] as $val){
if($val['opening_id'] == $opening['DreamjobJobOpening']['id'])
$opening_in_app=true;
$opening_inApp=$val;
}
}
?>
<div class="opening-header">
<h1><span><?=$opening['DreamjobJobOpening']['title'];?></span></h1>
<?=$this->Html->image('openingBanner.jpg',array('class'=>'banner'));?>
<?php if($avatar){ ?><div class="logo"><i><img src="<?=$url;?>"/></i></div><?php } ?>
<h3><?=$opening['AppUser']['nickname'];?></h3>
<div class="btn-group">
<?php
if(isset($WORKER) and is_array($WORKER) and count($WORKER) > 0){
?>
<?php
//TODO bereits beworben
if($opening_in_app)
echo $this->Html->link(__('dreamjob.my.application'),array('controller'=>'job','action'=>'applicationGet','id'=>$opening_inApp['id']),array('class'=>'btn btn-default','style'=>'margin-left:10px;'));
else{
echo $this->Html->link(($fav)?$this->Html->image('favority_off.png'):$this->Html->image('favority_on.png'),array('controller'=>'job','action'=>'openingGet','id'=>$opening['DreamjobJobOpening']['id'],'extra'=>'favorite'),array('class'=>'btn btn-default fav','escape'=>false));
}
?>
<?php } ?>
<?=$this->Html->link(__('dreamjob.company.to'),array('controller'=>'user','action'=>'profil','id'=>$opening['AppUser']['id']),array('class'=>'btn btn-default'));?>
<?php if(!empty($WORKER)){ ?>
<?php
echo $this->Html->link(__('dreamjob.applicate'),array('controller'=>'job', 'action'=>'applicationSend', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => "btn btn-primary"));
?>
<?php } ?>
</div>
</div>
<ul class="nav nav-tabs">
<li<?=(!empty($OPP_NORMAL))?' class="active"':'';?>><?=$this->Html->link(__("dreamjob.opening"),array('controller'=>'job','action'=>'openingGet','id'=>$opening['DreamjobJobOpening']['id']));?></a></li>
<li<?=(!empty($OPP_OPENING))?' class="active"':'';?>><?=$this->Html->link(__("dreamjob.opening.titleinfo"),array('controller'=>'job','action'=>'openingGet','id'=>$opening['DreamjobJobOpening']['id'],'extra'=>'openinginfo'));?></a></li>
<li<?=(!empty($OPP_COMPANY))?' class="active"':'';?>><?=$this->Html->link(__("dreamjob.company.titleinfo"),array('controller'=>'job','action'=>'openingGet','id'=>$opening['DreamjobJobOpening']['id'],'extra'=>'companyinfo'));?></a></li>
</ul>