2014-02-18 12:10:29 +01:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
$opening_in_app = false;
|
2014-02-19 00:02:17 +01:00
|
|
|
|
|
|
|
$opening_in_fav=false;
|
2014-02-23 09:39:07 +01:00
|
|
|
if(isset($WORKER) and is_array($WORKER) and count($WORKER)>0){
|
2014-02-19 00:02:17 +01:00
|
|
|
foreach($WORKER['Favority'] as $val){
|
|
|
|
if($val['id'] == $opening['DreamjobJobOpening']['id'])
|
|
|
|
$opening_in_fav=true;
|
|
|
|
}
|
2014-03-04 09:07:18 +01:00
|
|
|
foreach($WORKER['DreamjobJobApplication'] as $val){
|
|
|
|
if($val['opening_id'] == $opening['DreamjobJobOpening']['id'])
|
|
|
|
$opening_in_app=true;
|
|
|
|
$opening_inApp=$val;
|
|
|
|
}
|
2014-02-19 00:02:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$avatar = false;
|
2014-04-15 19:47:57 +02:00
|
|
|
$url = '';
|
2014-02-19 00:02:17 +01:00
|
|
|
if($opening['AppUser']['take_systemwide']){
|
2014-04-15 19:47:57 +02:00
|
|
|
if($opening['User']['avatar']){
|
|
|
|
$url = $MEDIA.DS.$opening['User']['avatar'];
|
2014-02-19 00:02:17 +01:00
|
|
|
$avatar = true;
|
2014-04-15 19:47:57 +02:00
|
|
|
}
|
2014-02-19 00:02:17 +01:00
|
|
|
}else{
|
2014-04-15 19:47:57 +02:00
|
|
|
if($opening['AppUser']['avatar']){
|
|
|
|
$url = $MEDIA.DS.$opening['AppUser']['avatar'];
|
2014-02-19 00:02:17 +01:00
|
|
|
$avatar = true;
|
2014-04-15 19:47:57 +02:00
|
|
|
}
|
2014-02-19 00:02:17 +01:00
|
|
|
}
|
2014-02-18 12:10:29 +01:00
|
|
|
?>
|
2014-03-04 09:07:18 +01:00
|
|
|
<?php if(!empty($opening_MINI) or !($opening_in_app or $opening_in_fav)){ ?>
|
2014-02-18 12:10:29 +01:00
|
|
|
<div class="openingitem">
|
|
|
|
<h3><?=$opening['DreamjobJobOpening']['title'];?></h3>
|
2014-03-04 09:07:18 +01:00
|
|
|
<?php if(!empty($WORKER)){ ?>
|
|
|
|
<?php if(!$opening_in_app){ ?>
|
2014-04-29 23:07:17 +02:00
|
|
|
<span style="float: right;margin-right:60px;">
|
2014-02-19 00:02:17 +01:00
|
|
|
<?php
|
2014-05-11 09:43:25 +02:00
|
|
|
if(!$opening_in_fav)
|
|
|
|
echo $this->Html->image('favority_off.png',array('url' => array('controller'=>'job','action'=>'openingGet','id'=>$opening['DreamjobJobOpening']['id'],'favorite'=>'favorite')));
|
|
|
|
else
|
|
|
|
echo $this->Html->link('<span class="glyphicon glyphicon-trash"></span>',array('controller'=>'job','action'=>'openingGet','id'=>$opening['DreamjobJobOpening']['id'],'favorite'=>'favorite'),array('style'=>'color:black;font-size:16px;margin-right:5px;','escape'=>false));
|
2014-02-19 00:02:17 +01:00
|
|
|
?>
|
2014-02-18 12:10:29 +01:00
|
|
|
</span>
|
2014-03-04 09:07:18 +01:00
|
|
|
<?php } ?>
|
|
|
|
<?php } ?>
|
2014-02-18 12:10:29 +01:00
|
|
|
<div>
|
2014-02-19 00:02:17 +01:00
|
|
|
<?php if($avatar){ ?>
|
|
|
|
<div class="icon">
|
2014-04-23 19:23:23 +02:00
|
|
|
<span><?=$opening['AppUser']['nickname'];?></span>
|
2014-02-19 00:02:17 +01:00
|
|
|
<div>
|
2014-04-15 19:47:57 +02:00
|
|
|
<img src="<?=$url;?>"/>
|
2014-02-18 12:10:29 +01:00
|
|
|
</div>
|
2014-02-19 00:02:17 +01:00
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
}else{
|
|
|
|
?>
|
|
|
|
<div class="noicon-title">
|
2014-04-23 19:23:23 +02:00
|
|
|
<span><?=$opening['AppUser']['nickname'];?></span>
|
2014-02-19 00:02:17 +01:00
|
|
|
</div>
|
|
|
|
<?php } ?>
|
2014-02-18 12:10:29 +01:00
|
|
|
<div class="left">
|
|
|
|
<span><?=__("dreamjob.graducation.company");?>: <?=$opening['DreamjobListGraducation']['name'];?></span>
|
2014-03-28 16:22:19 +01:00
|
|
|
<span><?=__("dreamjob.branch");?>: <?=$opening['DreamjobListBranch']['name'];?></span>
|
2014-04-22 16:01:00 +02:00
|
|
|
<span><?=__("dreamjob.city");?>: <?=$opening['DreamjobListCity']['name'];?></span>
|
2014-02-18 12:10:29 +01:00
|
|
|
<span><?=__("dreamjob.kindofjob");?>: <?=$opening['DreamjobListKindofjob']['name'];?></span>
|
|
|
|
<span<?php if( time() > strtotime($opening['DreamjobJobOpening']['enddate'])){ ?> class="opening_outdate"<?php } ?>><?=__("dreamjob.opening.enddate");?>: <?=$this->Time->format('d.m.Y', $opening['DreamjobJobOpening']['enddate']);?></span>
|
|
|
|
</div>
|
|
|
|
<div class="right">
|
|
|
|
<div class="btn-group-vertical">
|
2014-02-23 09:39:07 +01:00
|
|
|
<?php
|
|
|
|
echo $this->Html->link(__('dreamjob.opening.detail'),array('controller'=>'job', 'action'=>'openingGet', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => "btn btn-default"));
|
|
|
|
|
|
|
|
if( isset($COMPANY['AppUser']['id']) and $COMPANY['AppUser']['id'] == $opening['DreamjobJobOpening']['company_id']){
|
2014-03-04 09:07:18 +01:00
|
|
|
echo $this->Html->link(__('dreamjob.application'),array('controller'=>'job', 'action'=>'applicationByOpening', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => "btn btn-default"));
|
2014-02-23 09:39:07 +01:00
|
|
|
echo $this->Html->link(__('dreamjob.opening.edit'),array('controller'=>'job', 'action'=>'openingEdit', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => "btn btn-default"));
|
|
|
|
echo $this->Html->link(__('dreamjob.opening.delete'),array('controller'=>'job', 'action'=>'openingList', '?' => array('del'=> $opening['DreamjobJobOpening']['id'])),array("class" => "btn btn-default"));
|
2014-03-04 09:07:18 +01:00
|
|
|
}elseif($opening_in_app){
|
|
|
|
if(!empty($enableMsg)){
|
|
|
|
$countstr= count($opening['DreamjobJobMsg']);
|
|
|
|
$newcount=0;
|
|
|
|
foreach($opening['DreamjobJobMsg'] as $msg)
|
|
|
|
if(!$msg['saw'])
|
|
|
|
$newcount++;
|
|
|
|
if($newcount>0)
|
|
|
|
$countstr = $newcount."/".$countstr;
|
2014-03-23 10:16:15 +01:00
|
|
|
$countstr =__('dreamjob.applicated').' <span class="badge">'.$countstr.'</span>';
|
2014-03-04 09:07:18 +01:00
|
|
|
}else
|
|
|
|
$countstr =__('dreamjob.applicated');
|
2014-03-23 10:16:15 +01:00
|
|
|
echo $this->Html->link($countstr,array('controller'=>'job', 'action'=>'applicationGet', 'id' => $opening_inApp['id']),array("class" => "btn btn-default","escape"=>false));
|
2014-03-04 09:07:18 +01:00
|
|
|
}else{
|
|
|
|
$class="btn btn-default";
|
|
|
|
if(isset($WORKER) and !is_array($WORKER) and count($WORKER) <= 0)
|
|
|
|
$class = "btn btn-default disable";
|
|
|
|
echo $this->Html->link(__('dreamjob.applicate'),array('controller'=>'job', 'action'=>'applicationSend', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => $class));
|
|
|
|
}
|
|
|
|
?>
|
2014-02-18 12:10:29 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-04 09:07:18 +01:00
|
|
|
<?php } ?>
|