dreamjob/app/View/Job/application.ctp

139 lines
4.7 KiB
PHP

<?php
/*
*
*/
?>
<div>
<span>
<?php if(!empty($WORKER)){
echo $this->Html->link(__('dreamjob.my.application'),array('controller'=>'job','action'=>'applicationList'));
}else{
echo $this->Html->link(__('dreamjob.application'),array('controller'=>'job','action'=>'applicationByOpening','id'=>$application['DreamjobJobOpening']['id']));
} ?>
</span>
<span style="float: right;">
<?=$this->Html->link(__('dreamjob.opening'),array('controller'=>'job','action'=>'openingGet','id'=>$application['DreamjobJobOpening']['id'])); ?>
</span>
</div>
<div class="box">
<?=$this->element('job_opening_head',array("opening"=>$application));?>
</div>
<div>
<span>
<?php if(!empty($COMPANY)){
$str = 'dreamjob.application.close';
if($application['DreamjobJobApplication']['closed'])
$str = 'dreamjob.application.close.activet';
?>
<?=$this->Html->link(__($str),array('controller'=>'job','action'=>'applicationGet','id'=>$application['DreamjobJobApplication']['id'],'hiv'=>'hiv')); ?>
<?php } ?>
&nbsp;
</span>
<span style="float: right;">
<?php if($msg){
echo $this->Html->link(__('dreamjob.applicated'),array('controller'=>'job','action'=>'applicationGet','id'=>$application['DreamjobJobApplication']['id']));
}else{
echo $this->Html->link(__('dreamjob.message.send'),array('controller'=>'job','action'=>'applicationGet','id'=>$application['DreamjobJobApplication']['id'],'ages'=>'ages'));
} ?>
</span>
</div>
<?php if(!empty($COMPANY)){ ?>
<div class="box">
<?php
$profil=array('DreamjobWorker'=>$application['DreamjobWorker'],
'DreamjobUser'=>$application["DreamjobUserWorker"],
'AppUser'=>$application["AppUserWorker"],
'User'=>$application["WorkerUser"],
'DreamjobListGraducation'=>$application["WorkerGraducation"]);
echo $this->element('user_worker_header',array('profil'=>$profil));
?>
</div>
<?php } ?>
<div id="tab">
<!-- tab -->
<?php if(!$msg){ ?>
<div class="box">
<div class="tabs-below">
<ul class="nav nav-tabs pull-right">
<li<?php if (empty($page) and empty($cv)){?> class="active"<?php } ?>>
<?=$this->Html->link(__("dreamjob.application"),array('controller'=>'job','action'=>'applicationGet','id'=> $application['DreamjobJobApplication']['id'] ),array('rel'=>"tab")); ?>
</li>
<li<?php if (!empty($cv)){?> class="active"<?php } ?>>
<?=$this->Html->link(__('dreamjob.cv'),array('controller'=>'job','action'=>'applicationGet','id'=>$application['DreamjobJobApplication']['id'],'vitea'=>'vitea')); ?>
</li>
<?php foreach($application['Page'] as $pag){ ?>
<li<?php if(isset($page['DreamjobPageInh']['id'])) if ($page['DreamjobPageInh']['id'] == $pag['id']){?> class="active"<?php } ?>>
<?=$this->Html->link($pag['title'],array('controller'=>'job','action'=>'applicationGet','id'=> $application['DreamjobJobApplication']['id'],'page'=> $pag['id'] ),array('rel'=>"tab")); ?>
<?php }?>
</ul>
</div>
<?php }
if($msg){
foreach($application['DreamjobJobMsg'] as $msgitem){
?>
<div class="box msg">
<legend>
<span>
<?php if($msgitem['fromcompany']){
echo $application['AppUser']['nickname']." ".$application['DreamjobCompany']['corporateform'];
}else{
echo $application['WorkerUser']['first_name']." ".$application['WorkerUser']['last_name'];
} ?>
</span>
<span class="created" style="float:right;<?php if(!$msgitem['saw']){ ?>color:red;<?php } ?>">
<?=$this->Time->format('d.m.Y H:i', $msgitem['created']);?>
</span>
</legend>
<div class="text">
<?=strip_tags($msgitem['text'],$strip_tags); ?>
</div>
</div>
<?php }
}elseif(!empty($cv)){ ?>
<?php
echo $this->element('user_worker_cv');
?>
</div>
<?php
}elseif($page!=null){ ?>
<?php
if(isset($page['PageText']))
$page = array("DreamjobPageText"=>$page['PageText'],"DreamjobPageInh"=>$pageInh['Page']);
else
$page = array("DreamjobPageImage"=>$page['PageImage'],"DreamjobPageInh"=>$pageInh['Page']);
echo $this->element('user_page',array("page"=>$page));
?>
</div>
<?php }else{ ?>
<?=$application['DreamjobJobApplication']['text'];?>
</div>
<?php
}
?>
<?php
if($msg and !$application['DreamjobJobApplication']['closed']){
?>
<div class="box">
<?php echo $this->Form->create('DreamjobJobMsg',$default_Form); ?>
<fieldset>
<legend><?=__("dreamjob.message");?></legend>
<?=$this->Form->textarea('DreamjobJobMsg.text',array("class"=>'form-control',"rows"=>10)); ?>
<div class="buttonrow">
<?=$this->Form->button(__('dreamjob.save'),array('div' => false,'class'=>"btn btn-default",'type' => 'submit'));?>
</div>
</fieldset>
<?php echo $this->Form->end(); ?>
</div>
<?php } ?>
<!-- /tab -->
</div>