suche
This commit is contained in:
parent
89a45dad65
commit
857bde364b
|
@ -54,6 +54,16 @@ class SearchController extends AppController {
|
|||
$con = $this->MiconwareSession->getOpeningCondition();
|
||||
$con['DreamjobJobOpening.kindofjob_id'] = self::$TYPE_id[$type];
|
||||
|
||||
if(!empty($this->request->data['DreamjobJobOpening']['branch_id']))
|
||||
$con['DreamjobJobOpening.branch_id']=$this->request->data['DreamjobJobOpening']['branch_id'];
|
||||
|
||||
if(!empty($this->request->data['DreamjobJobOpening']['city']) and $this->request->data['DreamjobJobOpening']['city'] != 48)
|
||||
$con['DreamjobJobOpening.city LIKE']='%'.$this->DreamjobListCity->find('first',array('conditions' => array('id'=>$this->request->data['DreamjobJobOpening']['city'])))['DreamjobListCity']['name'].'%';
|
||||
|
||||
if(!empty($this->request->data['DreamjobJobOpening']['title']))
|
||||
$con['DreamjobJobOpening.title LIKE'] = '%'.$this->request->data['DreamjobJobOpening']['title'].'%';
|
||||
|
||||
|
||||
|
||||
$openings = $this->DreamjobJobOpening->find('all',array('conditions' => $con));
|
||||
$this->set("branches",$this->DreamjobListBranch->find('list'));
|
||||
|
@ -71,10 +81,29 @@ class SearchController extends AppController {
|
|||
$this->MiconwareSession->init($this);
|
||||
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
|
||||
$con = $this->MiconwareSession->getOpeningCondition();
|
||||
$openings = $this->DreamjobJobOpening->find('all',array('conditions' => $con));
|
||||
|
||||
if(!empty($this->request->data['DreamjobJobOpening']['branch_id']))
|
||||
$con['DreamjobJobOpening.graducation_id']=$this->request->data['DreamjobJobOpening']['branch_id'];
|
||||
|
||||
if(!empty($this->request->data['DreamjobJobOpening']['graducation_id']))
|
||||
$con['DreamjobJobOpening.graducation_id']=$this->request->data['DreamjobJobOpening']['graducation_id'];
|
||||
|
||||
if(!empty($this->request->data['DreamjobJobOpening']['kindofjob_id']))
|
||||
$con['DreamjobJobOpening.kindofjob_id']=$this->request->data['DreamjobJobOpening']['kindofjob_id'];
|
||||
|
||||
if(!empty($this->request->data['DreamjobJobOpening']['city']) and $this->request->data['DreamjobJobOpening']['city'] != 48)
|
||||
$con['DreamjobJobOpening.city LIKE']='%'.$this->DreamjobListCity->find('first',array('conditions' => array('id'=>$this->request->data['DreamjobJobOpening']['city'])))['DreamjobListCity']['name'].'%';
|
||||
|
||||
if(!empty($this->request->data['DreamjobJobOpening']['postcode']))
|
||||
$con['DreamjobJobOpening.postcode LIKE'] = '%'.$this->request->data['DreamjobJobOpening']['postcode'].'%';
|
||||
|
||||
if(!empty($this->request->data['DreamjobJobOpening']['title']))
|
||||
$con['DreamjobJobOpening.title LIKE'] = '%'.$this->request->data['DreamjobJobOpening']['title'].'%';
|
||||
|
||||
|
||||
|
||||
$openings = $this->DreamjobJobOpening->find('all',array('conditions' => $con));
|
||||
$this->set("branches",$this->DreamjobListBranch->find('list'));
|
||||
$this->set("cities",$this->DreamjobListCity->find('list'));
|
||||
$this->set("graducations",$this->DreamjobListGraducation->find('list'));
|
||||
|
@ -89,9 +118,17 @@ class SearchController extends AppController {
|
|||
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
|
||||
echo var_dump($this->request->data);
|
||||
$con=array();
|
||||
if(!empty($this->request->data['DreamjobCompany']['branch_id']))
|
||||
$con['DreamjobCompany.branch_id']=$this->request->data['DreamjobCompany']['branch_id'];
|
||||
|
||||
$companies = $this->DreamjobCompany->find('all');
|
||||
if(!empty($this->request->data['DreamjobUser']['city']) and $this->request->data['DreamjobUser']['city'] != 48)
|
||||
$con['DreamjobUser.city']=$this->DreamjobListCity->find('first',array('conditions' => array('id'=>$this->request->data['DreamjobUser']['city'])))['DreamjobListCity']['name'];
|
||||
|
||||
if(!empty($this->request->data['AppUser']['nickname']))
|
||||
$con['AppUser.nickname LIKE'] = '%'.$this->request->data['AppUser']['nickname'].'%';
|
||||
|
||||
$companies = $this->DreamjobCompany->find('all',array('conditions' => $con));
|
||||
|
||||
$this->set("branches",$this->DreamjobListBranch->find('list'));
|
||||
$this->set("cities",$this->DreamjobListCity->find('list'));
|
||||
|
@ -108,8 +145,11 @@ class SearchController extends AppController {
|
|||
$profil = $this->MiconwareSession->getWorker();
|
||||
if(!empty($profil) and count($profil) > 0){
|
||||
$con = $this->MiconwareSession->getOpeningCondition();
|
||||
|
||||
|
||||
|
||||
|
||||
$openings = $this->DreamjobJobOpening->find('all',array('conditions' => $con));
|
||||
|
||||
$this->set("openings",$openings);
|
||||
$this->render('/Search/auto');
|
||||
}else{
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
echo $this->Form->input('DreamjobJobOpening.title',$a);
|
||||
?>
|
||||
<fieldset class="search">
|
||||
<?=$this->Form->input('DreamjobJobOpening.branch',array('label'=>__('dreamjob.branch')));?>
|
||||
<?=$this->Form->input('DreamjobJobOpening.branch_id',array('label'=>__('dreamjob.branch')));?>
|
||||
<?=$this->Form->input('DreamjobJobOpening.city',array('label'=>__('dreamjob.city')));?>
|
||||
<div class="form-group submit">
|
||||
<div>
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
$a = $default_hForm['inputDefaults'];
|
||||
$a['inputDefaults']['between'] = false;
|
||||
$a['inputDefaults']['after'] = false;
|
||||
echo $this->Form->input('DreamjobCompany.title',$a);
|
||||
echo $this->Form->input('AppUser.nickname',$a);
|
||||
?>
|
||||
<fieldset class="search">
|
||||
<?=$this->Form->input('DreamjobJobOpening.branch',array('label'=>__('dreamjob.branch')));?>
|
||||
<?=$this->Form->input('DreamjobJobOpening.city',array('label'=>__('dreamjob.city')));?>
|
||||
<?=$this->Form->input('DreamjobCompany.branch_id',array('label'=>__('dreamjob.branch'),'empty'=>''));?>
|
||||
<?=$this->Form->input('DreamjobUser.city',array('label'=>__('dreamjob.city'),'empty'=>''));?>
|
||||
<div class="form-group submit">
|
||||
<div>
|
||||
<?=$this->Form->submit(__('dreamjob.search'),array('class'=>'btn btn-primary'));?>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
echo $this->Form->input('DreamjobJobOpening.title',$a);
|
||||
?>
|
||||
<fieldset class="search">
|
||||
<?=$this->Form->input('DreamjobJobOpening.branch',array('label'=>__('dreamjob.branch')));?>
|
||||
<?=$this->Form->input('DreamjobJobOpening.branch_id',array('label'=>__('dreamjob.branch')));?>
|
||||
<?=$this->Form->input('DreamjobJobOpening.city',array('label'=>__('dreamjob.city')));?>
|
||||
<div class="form-group submit">
|
||||
<div>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
echo $this->Form->input('DreamjobJobOpening.title',$a);
|
||||
?>
|
||||
<fieldset class="search">
|
||||
<?=$this->Form->input('DreamjobJobOpening.branch',array('label'=>__('dreamjob.branch')));?>
|
||||
<?=$this->Form->input('DreamjobJobOpening.branch_id',array('label'=>__('dreamjob.branch')));?>
|
||||
<?=$this->Form->input('DreamjobJobOpening.city',array('label'=>__('dreamjob.city')));?>
|
||||
<div class="form-group submit">
|
||||
<div>
|
||||
|
|
|
@ -20,11 +20,11 @@
|
|||
echo $this->Form->input('DreamjobJobOpening.title',$a);
|
||||
?>
|
||||
<fieldset class="search">
|
||||
<?=$this->Form->input('DreamjobJobOpening.branch',array('label'=>__('dreamjob.branch')));?>
|
||||
<?=$this->Form->input('DreamjobJobOpening.branch_id',array('label'=>__('dreamjob.branch')));?>
|
||||
<?=$this->Form->input('DreamjobJobOpening.postcode',array('label'=>__('dreamjob.postcode')));?>
|
||||
<?=$this->Form->input('DreamjobJobOpening.city',array('label'=>__('dreamjob.city')));?>
|
||||
<?=$this->Form->input('DreamjobJobOpening.graducation',array('label'=>__('dreamjob.graducation')));?>
|
||||
<?=$this->Form->input('DreamjobJobOpening.kindofjob',array('label'=>__('dreamjob.kindofjob')));?>
|
||||
<?=$this->Form->input('DreamjobJobOpening.graducation_id',array('label'=>__('dreamjob.graducation')));?>
|
||||
<?=$this->Form->input('DreamjobJobOpening.kindofjob_id',array('label'=>__('dreamjob.kindofjob')));?>
|
||||
<div class="form-group submit">
|
||||
<div>
|
||||
<?=$this->Form->submit(__('dreamjob.search'),array('class'=>'btn btn-primary'));?>
|
||||
|
|
Loading…
Reference in New Issue