dreamjob/app/View/Job/opening.ctp

53 lines
1.6 KiB
PHP

<?php
/*
*
*/
$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>
<span><?=$this->Html->link(__('dreamjob.company.to'),array('controller'=>'user','action'=>'profil','id'=>$opening['AppUser']['id']));?></span>
<?php
if(isset($WORKER) and is_array($WORKER) and count($WORKER) > 0){
?>
<span style="float: right;">
<?php
//TODO bereits beworben
if($opening_in_app)
echo $this->Html->link(__('dreamjob.my.application'),array('controller'=>'job','action'=>'applicationGet','id'=>$opening_inApp['id']));
else{
//TODO isFavority
$link='dreamjob.favority.adding';
if($fav)
$link='dreamjob.favority.removeing';
echo $this->Html->link(__($link),array('controller'=>'job','action'=>'openingGet','id'=>$opening['DreamjobJobOpening']['id'],'favorite'=>'favorite'));
}
?>
</span>
<?php } ?>
</div>
<div class="box">
<?=$this->element('job_opening_head');?>
<?=$this->element('job_opening_head_extra');?>
<br/>
<div>
<?=$opening['DreamjobJobOpening']['text'];?>
</div>
<div class="buttonrow">
<?php
echo $this->Html->link(__('dreamjob.applicate'),array('controller'=>'job', 'action'=>'openingGet', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => "btn btn-default"));
?>
</div>
</div>