application send
This commit is contained in:
parent
8f1f4f4220
commit
10a7114fed
|
@ -24,7 +24,6 @@ class HomeController extends AppController {
|
||||||
public function home() {
|
public function home() {
|
||||||
$this->MiconwareSession->init($this);
|
$this->MiconwareSession->init($this);
|
||||||
$this->MiconwareSession->initWeb($this);
|
$this->MiconwareSession->initWeb($this);
|
||||||
$this->MiconwareSession->setFlash('In Entwicklung','flash',array('alert'=>'info'));
|
|
||||||
$openings = $this->DreamjobJobOpening->find('all',$this->home_opening_condition);
|
$openings = $this->DreamjobJobOpening->find('all',$this->home_opening_condition);
|
||||||
$this->set('openings',$openings);
|
$this->set('openings',$openings);
|
||||||
$this->set('title', 'dreamjob.startpage');
|
$this->set('title', 'dreamjob.startpage');
|
||||||
|
|
|
@ -116,7 +116,7 @@ class JobController extends AppController {
|
||||||
|
|
||||||
|
|
||||||
if(!empty($this->request->params['id'])){
|
if(!empty($this->request->params['id'])){
|
||||||
if(!empty($this->request->params['favorite']) or count($this->request->params['favorite'])>0){
|
if(!empty($this->request->params['favorite']) and count($this->request->params['favorite'])>0){
|
||||||
$WORKER = $this->MiconwareSession->getWorker();
|
$WORKER = $this->MiconwareSession->getWorker();
|
||||||
$fav=false;
|
$fav=false;
|
||||||
foreach($WORKER['Favority'] as $val){
|
foreach($WORKER['Favority'] as $val){
|
||||||
|
@ -300,6 +300,41 @@ class JobController extends AppController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function applicationSend() {
|
public function applicationSend() {
|
||||||
|
$this->MiconwareSession->init($this);
|
||||||
|
$this->MiconwareSession->initWeb($this);
|
||||||
|
$w = $this->MiconwareSession->getWorker();
|
||||||
|
if(!empty($w)){
|
||||||
|
$opening = null;
|
||||||
|
if(!empty($this->request->params['id'])){
|
||||||
|
$opening = $this->DreamjobJobOpening->find('first',array('conditions' => array('DreamjobJobOpening.id' => $this->request->params['id'])));
|
||||||
|
}
|
||||||
|
if(!is_array($opening) or count($opening) <= 0 ){
|
||||||
|
$this->set('error', 'dreamjob.error.opening.notFound');
|
||||||
|
$this->render('/Home/error');
|
||||||
|
}else{
|
||||||
|
if ($this->request->is('post')) {
|
||||||
|
echo var_dump($this->request->data);
|
||||||
|
/*$this->DreamjobJobApplication->create($this->request->data);
|
||||||
|
$this->DreamjobJobOpening->worker_id = $w['AppUser']['id'];
|
||||||
|
$this->DreamjobJobOpening->opening_id = $this->request->params['id'];*/
|
||||||
|
if ($this->DreamjobJobOpening->saveAssociated($this->request->data)) {
|
||||||
|
$this->DreamjobJobOpening->worker_id = $w['AppUser']['id'];
|
||||||
|
$this->DreamjobJobOpening->opening_id = $this->request->params['id'];
|
||||||
|
if($this->DreamjobJobOpening->save()){
|
||||||
|
$this->MiconwareSession->setFlash('dreamjob.opening.save.add','flash',array('alert'=>'success'));
|
||||||
|
}else{
|
||||||
|
$this->MiconwareSession->setFlash('dreamjob.opening.save.error','flash',array('alert'=>'danger'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->set('pages', $w['DreamjobPageInh']);
|
||||||
|
$this->set('opening', $opening);
|
||||||
|
$this->render('/Job/application_send');
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$this->set('error', 'dreamjob.error.noCompany');
|
||||||
|
$this->render('/Home/error');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -17,10 +17,7 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-title">
|
<?=$this->element('job_opening_head');?>
|
||||||
<h3><?=$application['AppUser']['nickname']." ".$application['DreamjobCompany']['corporateform'];?></h3>
|
|
||||||
<h1><?=$application['DreamjobJobOpening']['title'];?></h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -114,18 +111,18 @@
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
if($msg and !$application['DreamjobJobApplication']['closed']){
|
if($msg and !$application['DreamjobJobApplication']['closed']){
|
||||||
?>
|
?>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<?php echo $this->Form->create('DreamjobJobMsg',$default_Form); ?>
|
<?php echo $this->Form->create('DreamjobJobMsg',$default_Form); ?>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><?=__("dreamjob.message");?></legend>
|
<legend><?=__("dreamjob.message");?></legend>
|
||||||
<?=$this->Form->textarea('DreamjobJobMsg.text',array("class"=>'form-control',"rows"=>10)); ?>
|
<?=$this->Form->textarea('DreamjobJobMsg.text',array("class"=>'form-control',"rows"=>10)); ?>
|
||||||
<div style="text-align:right;margin-top:25px;">
|
<div class="buttonrow">
|
||||||
<?=$this->Form->button(__('dreamjob.save'),array('div' => false,'class'=>"btn btn-default",'type' => 'submit'));?>
|
<?=$this->Form->button(__('dreamjob.save'),array('div' => false,'class'=>"btn btn-default",'type' => 'submit'));?>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php echo $this->Form->end(); ?>
|
<?php echo $this->Form->end(); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<!-- /tab -->
|
<!-- /tab -->
|
||||||
|
|
|
@ -4,10 +4,7 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-title">
|
<?=$this->element('job_opening_head');?>
|
||||||
<h3><?=$opening['AppUser']['nickname']." ".$opening['DreamjobCompany']['corporateform'];?></h3>
|
|
||||||
<h1><?=$opening['DreamjobJobOpening']['title'];?></h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="tab" class="box">
|
<div id="tab" class="box">
|
||||||
<!-- tab -->
|
<!-- tab -->
|
||||||
|
|
|
@ -38,34 +38,13 @@
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-title">
|
<?=$this->element('job_opening_head');?>
|
||||||
<h3><?=$opening['AppUser']['nickname']." ".$opening['DreamjobCompany']['corporateform'];?></h3>
|
<?=$this->element('job_opening_head_extra');?>
|
||||||
<h1><?=$opening['DreamjobJobOpening']['title'];?></h1>
|
|
||||||
</div>
|
|
||||||
<p>
|
|
||||||
<h4><?=__("dreamjob.opening.titleinfo");?></h4>
|
|
||||||
<?=__("dreamjob.graducation.company");?>: <?=$opening['DreamjobListGraducation']['name'];?><br/>
|
|
||||||
<?=__("dreamjob.branch");?>: <?=$opening['DreamjobJobOpening']['branch'];?><br/>
|
|
||||||
<?=__("dreamjob.kindofjob");?>: <?=$opening['DreamjobListKindofjob']['name'];?><br/>
|
|
||||||
<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>
|
|
||||||
</p>
|
|
||||||
<br/>
|
|
||||||
<p>
|
|
||||||
<h4><?=__("dreamjob.company.titleinfo");?></h4>
|
|
||||||
<?=__("dreamjob.company");?>: <?=$opening['AppUser']['nickname']." ".$opening['DreamjobCompany']['corporateform'];?><br/>
|
|
||||||
<?=__("dreamjob.headcount");?>: <?=$opening['DreamjobCompany']['headcount'];?><br/>
|
|
||||||
<?=__("dreamjob.owner");?>: <?=$opening['DreamjobCompany']['owner'];?>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<?=__("dreamjob.address");?>: <br/>
|
|
||||||
<?=$opening['DreamjobUser']['street'];?><br/>
|
|
||||||
<?=$opening['DreamjobUser']['postcode']." ".$opening['DreamjobUser']['city'];?>
|
|
||||||
</p>
|
|
||||||
<br/>
|
<br/>
|
||||||
<div>
|
<div>
|
||||||
<?=$opening['DreamjobJobOpening']['text'];?>
|
<?=$opening['DreamjobJobOpening']['text'];?>
|
||||||
</div>
|
</div>
|
||||||
<div style="text-align:right;">
|
<div class="buttonrow">
|
||||||
<?php
|
<?php
|
||||||
echo $this->Html->link(__('dreamjob.applicate'),array('controller'=>'job', 'action'=>'openingGet', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => "btn btn-default"));
|
echo $this->Html->link(__('dreamjob.applicate'),array('controller'=>'job', 'action'=>'openingGet', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => "btn btn-default"));
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -37,7 +37,7 @@ echo $this->Form->create('DreamjobJobOpening',$default_Form);
|
||||||
<label class="col-lg-3 control-label"><?=__("dreamjob.opening.active");?></label>
|
<label class="col-lg-3 control-label"><?=__("dreamjob.opening.active");?></label>
|
||||||
<div class="col-lg-9">
|
<div class="col-lg-9">
|
||||||
<?=$this->Form->checkbox('DreamjobJobOpening.active',array("class"=>'form-control',"label"=>__("dreamjob.opening.active")))?>
|
<?=$this->Form->checkbox('DreamjobJobOpening.active',array("class"=>'form-control',"label"=>__("dreamjob.opening.active")))?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<legend><?=__("dreamjob.address");?></legend>
|
<legend><?=__("dreamjob.address");?></legend>
|
||||||
<?php echo $this->Form->input('DreamjobJobOpening.street',array('label'=>array('text'=>__("dreamjob.street"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
<?php echo $this->Form->input('DreamjobJobOpening.street',array('label'=>array('text'=>__("dreamjob.street"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||||
|
@ -45,7 +45,7 @@ echo $this->Form->create('DreamjobJobOpening',$default_Form);
|
||||||
echo $this->Form->input('DreamjobJobOpening.city',array("label" => array('text'=>__("dreamjob.city"),"class"=>$default_Form['inputDefaults']['label']['class']))); ?>
|
echo $this->Form->input('DreamjobJobOpening.city',array("label" => array('text'=>__("dreamjob.city"),"class"=>$default_Form['inputDefaults']['label']['class']))); ?>
|
||||||
<legend><?=__("dreamjob.text");?></legend>
|
<legend><?=__("dreamjob.text");?></legend>
|
||||||
<?php echo $this->Form->textarea('DreamjobJobOpening.text',array("class"=>'form-control',"rows"=>10)); ?>
|
<?php echo $this->Form->textarea('DreamjobJobOpening.text',array("class"=>'form-control',"rows"=>10)); ?>
|
||||||
<div style="text-align:right;margin-top:25px;">
|
<div class="buttonrow">
|
||||||
<?=$this->Form->button(__('dreamjob.save'),array('div' => false,'class'=>"btn btn-default",'type' => 'submit'));?>
|
<?=$this->Form->button(__('dreamjob.save'),array('div' => false,'class'=>"btn btn-default",'type' => 'submit'));?>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -245,6 +245,10 @@ body.loading #container{
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
.buttonrow{
|
||||||
|
text-align:right;
|
||||||
|
margin-top:25px;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Opening
|
* Opening
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue