2014-02-19 00:03:29 +01:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
$fav=false;
|
2014-03-04 09:07:18 +01:00
|
|
|
$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-02-19 00:03:29 +01:00
|
|
|
?>
|
|
|
|
<div>
|
|
|
|
<span><?=$this->Html->link(__('dreamjob.company.to'),array('controller'=>'user','action'=>'profil','id'=>$opening['AppUser']['id']));?></span>
|
|
|
|
<?php
|
2014-03-01 12:15:34 +01:00
|
|
|
if(isset($WORKER) and is_array($WORKER) and count($WORKER) > 0){
|
2014-02-19 00:03:29 +01:00
|
|
|
?>
|
|
|
|
<span style="float: right;">
|
|
|
|
<?php
|
|
|
|
//TODO bereits beworben
|
2014-03-04 09:07:18 +01:00
|
|
|
if($opening_in_app)
|
|
|
|
echo $this->Html->link(__('dreamjob.my.application'),array('controller'=>'job','action'=>'applicationGet','id'=>$opening_inApp['id']));
|
2014-02-19 00:03:29 +01:00
|
|
|
else{
|
|
|
|
//TODO isFavority
|
2014-05-01 11:34:11 +02:00
|
|
|
$link=__('dreamjob.favority.adding');
|
2014-02-19 00:03:29 +01:00
|
|
|
if($fav)
|
2014-05-01 11:34:11 +02:00
|
|
|
$link=__('dreamjob.favority.removeing');
|
|
|
|
echo $this->Html->link($link,array('controller'=>'job','action'=>'openingGet','id'=>$opening['DreamjobJobOpening']['id'],'favorite'=>'favorite'));
|
2014-02-19 00:03:29 +01:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</span>
|
|
|
|
<?php } ?>
|
|
|
|
</div>
|
|
|
|
<div class="box">
|
2014-03-05 22:01:30 +01:00
|
|
|
<?=$this->element('job_opening_head');?>
|
|
|
|
<?=$this->element('job_opening_head_extra');?>
|
2014-02-19 00:03:29 +01:00
|
|
|
<br/>
|
|
|
|
<div>
|
2014-04-15 19:47:57 +02:00
|
|
|
<?=strip_tags($opening['DreamjobJobOpening']['text'],$strip_tags);?>
|
2014-02-19 00:03:29 +01:00
|
|
|
</div>
|
2014-04-15 19:47:57 +02:00
|
|
|
<?php if(!empty($WORKER)){ ?>
|
2014-03-05 22:01:30 +01:00
|
|
|
<div class="buttonrow">
|
2014-02-23 10:59:00 +01:00
|
|
|
<?php
|
2014-04-01 20:58:36 +02:00
|
|
|
echo $this->Html->link(__('dreamjob.applicate'),array('controller'=>'job', 'action'=>'applicationSend', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => "btn btn-primary"));
|
2014-02-23 10:59:00 +01:00
|
|
|
?>
|
|
|
|
</div>
|
2014-04-01 20:58:36 +02:00
|
|
|
<?php } ?>
|
2014-02-19 00:03:29 +01:00
|
|
|
</div>
|