dreamjob/app/View/Elements/job_opening_head.ctp

62 lines
2.6 KiB
Plaintext
Raw Normal View History

<?php
/*
*
*/
2014-12-16 21:17:20 +01:00
$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;
}
}
?>
2014-12-16 21:17:20 +01:00
<div class="opening-header">
<h1><span><?=$opening['DreamjobJobOpening']['title'];?></span></h1>
<?=$this->Html->image('openingBanner.jpg',array('class'=>'banner'));?>
<?php if($avatar){ ?> <img src="<?=$url;?>" class="logo"/><?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>
2014-12-16 21:17:20 +01:00
<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>