dreamjob/app/View/Job/application.ctp

142 lines
5.4 KiB
Plaintext
Raw Normal View History

<?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">
2014-03-10 23:53:06 +01:00
<?=$this->element('job_opening_head',array("opening"=>$application));?>
</div>
<div>
2014-03-05 00:01:58 +01:00
<span>
<?php if(!empty($COMPANY)){
2014-04-23 13:06:43 +02:00
$str = __('dreamjob.application.close');
2014-03-05 00:01:58 +01:00
if($application['DreamjobJobApplication']['closed'])
2014-04-23 16:13:39 +02:00
$str = __('dreamjob.application.close.actived');
2014-05-09 17:47:06 +02:00
echo $this->Html->link($str,array('controller'=>'job','action'=>'applicationGet','id'=>$application['DreamjobJobApplication']['id'],'hiv'=>'hiv'));
}else{
echo $this->Html->link(__('dreamjob.application.mappePDF'),array('controller'=>'pdf','action'=>'applicationGetPdf','id'=>$application['DreamjobJobApplication']['id']),array('rel'=>'external','target'=>'_blank'));
} ?>
2014-03-05 00:01:58 +01:00
</span>
<span style="float: right;">
<?php if($msg){
2014-05-25 10:44:04 +02:00
echo $this->Html->link(__('dreamjob.applicate'),array('controller'=>'job','action'=>'applicationGet','id'=>$application['DreamjobJobApplication']['id']));
2014-03-05 00:01:58 +01:00
}else{
echo $this->Html->link(__('dreamjob.message.send'),array('controller'=>'job','action'=>'applicationGet','id'=>$application['DreamjobJobApplication']['id'],'ages'=>'ages'));
} ?>
2014-03-05 00:01:58 +01:00
</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"]);
2014-04-23 17:18:47 +02:00
echo $this->element('user_worker_header',array('profil'=>$profil,'application'=>$application));
?>
</div>
<?php } ?>
2014-03-05 00:01:58 +01:00
<div id="tab">
<!-- tab -->
<?php if(!$msg){ ?>
<div class="box">
<div class="tabs-below">
<ul class="nav nav-tabs pull-right">
2014-03-15 01:52:07 +01:00
<li<?php if (empty($page) and empty($cv)){?> class="active"<?php } ?>>
2014-04-23 13:04:07 +02:00
<?=$this->Html->link(__("dreamjob.application.why"),array('controller'=>'job','action'=>'applicationGet','id'=> $application['DreamjobJobApplication']['id'] ),array('rel'=>"tab")); ?>
</li>
2014-03-15 01:52:07 +01:00
<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){
?>
2014-03-05 00:01:58 +01:00
<div class="box msg">
<legend>
<span>
<?php if($msgitem['fromcompany']){
2014-04-23 19:23:23 +02:00
echo $application['AppUser']['nickname'];
}else{
echo $application['WorkerUser']['first_name']." ".$application['WorkerUser']['last_name'];
2014-03-05 00:01:58 +01:00
} ?>
</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">
2014-04-15 19:47:57 +02:00
<?=strip_tags($msgitem['text'],$strip_tags); ?>
</div>
2014-03-05 00:01:58 +01:00
</div>
<?php }
2014-03-15 01:52:07 +01:00
}elseif(!empty($cv)){ ?>
<?php
2014-04-22 22:59:02 +02:00
echo $this->element('user_worker_cv',array('profil'=>array('User'=>$application['WorkerUser']
,'AppUser'=>$application['AppUserWorker'],'DreamjobWorker'=>$application['DreamjobWorker'],'DreamjobListGraducation'=>$application['WorkerGraducation'],'DreamjobListCity'=>$application['DreamjobWorkerListCity'])));
2014-03-15 01:52:07 +01:00
?>
</div>
<?php
}elseif($page!=null){ ?>
<?php
if(isset($page['PageText']))
2014-04-22 22:59:02 +02:00
$page = array("DreamjobPageText"=>$page['PageText'],"DreamjobPageInh"=>$page['DreamjobPageInh']);
else
2014-04-22 22:59:02 +02:00
$page = array("DreamjobPageImage"=>$page['PageImage'],"DreamjobPageInh"=>$page['DreamjobPageInh']);
echo $this->element('user_page',array("page"=>$page));
?>
</div>
<?php }else{ ?>
2014-04-23 13:04:07 +02:00
<h1><?=__('dreamjob.application.why');?></h1>
2014-04-23 16:13:39 +02:00
<h3><?=$application['DreamjobJobApplication']['subject'];?></h3>
<?=$application['DreamjobJobApplication']['text'];?>
</div>
<?php
}
?>
<?php
2014-03-05 22:01:30 +01:00
if($msg and !$application['DreamjobJobApplication']['closed']){
?>
<div class="box">
<?php echo $this->Form->create('DreamjobJobMsg',$default_Form); ?>
<fieldset>
<legend><?=__("dreamjob.message");?></legend>
<div><?=$this->Form->textarea('DreamjobJobMsg.text',array("class"=>'form-control',"rows"=>10)); ?></div>
2014-03-05 22:01:30 +01:00
<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>