city abhängigkeit herstellen

This commit is contained in:
Martin Müller 2014-04-22 16:15:30 +02:00
parent 43f6cd6b61
commit 474f9cfba1
5 changed files with 16 additions and 13 deletions

View File

@ -61,6 +61,9 @@ class SearchController extends AppController {
if(!empty($this->request->data['DreamjobJobOpening']['title'])) if(!empty($this->request->data['DreamjobJobOpening']['title']))
$con['DreamjobJobOpening.title LIKE'] = '%'.$this->request->data['DreamjobJobOpening']['title'].'%'; $con['DreamjobJobOpening.title LIKE'] = '%'.$this->request->data['DreamjobJobOpening']['title'].'%';
if(!empty($this->request->data['DreamjobUser']['city']) and $this->request->data['DreamjobUser']['city'] != 48){
$con['DreamjobUser.city_id']=$this->request->data['DreamjobUser']['city'];
}
$openings = $this->DreamjobJobOpening->find('all',array('conditions' => $con)); $openings = $this->DreamjobJobOpening->find('all',array('conditions' => $con));
@ -91,7 +94,7 @@ class SearchController extends AppController {
$con['DreamjobJobOpening.kindofjob_id']=$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){ if(!empty($this->request->data['DreamjobJobOpening']['city']) and $this->request->data['DreamjobJobOpening']['city'] != 48){
$con['DreamjobJobOpening.city_id']=$con['DreamjobJobOpening']['city']; $con['DreamjobJobOpening.city_id']=$this->request->data['DreamjobJobOpening']['city'];
} }
if(!empty($this->request->data['DreamjobJobOpening']['postcode'])) if(!empty($this->request->data['DreamjobJobOpening']['postcode']))
$con['DreamjobJobOpening.postcode LIKE'] = '%'.$this->request->data['DreamjobJobOpening']['postcode'].'%'; $con['DreamjobJobOpening.postcode LIKE'] = '%'.$this->request->data['DreamjobJobOpening']['postcode'].'%';
@ -121,7 +124,7 @@ class SearchController extends AppController {
$con['DreamjobCompany.branch_id']=$this->request->data['DreamjobCompany']['branch_id']; $con['DreamjobCompany.branch_id']=$this->request->data['DreamjobCompany']['branch_id'];
if(!empty($this->request->data['DreamjobUser']['city']) and $this->request->data['DreamjobUser']['city'] != 48){ if(!empty($this->request->data['DreamjobUser']['city']) and $this->request->data['DreamjobUser']['city'] != 48){
$con['DreamjobUser.city_id']=$data['DreamjobUser']['city']; $con['DreamjobUser.city_id']=$this->request->data['DreamjobUser']['city'];
} }
if(!empty($this->request->data['AppUser']['nickname'])) if(!empty($this->request->data['AppUser']['nickname']))
$con['AppUser.nickname LIKE'] = '%'.$this->request->data['AppUser']['nickname'].'%'; $con['AppUser.nickname LIKE'] = '%'.$this->request->data['AppUser']['nickname'].'%';

View File

@ -20,8 +20,8 @@
echo $this->Form->input('DreamjobJobOpening.title',$a); echo $this->Form->input('DreamjobJobOpening.title',$a);
?> ?>
<fieldset class="search"> <fieldset class="search">
<?=$this->Form->input('DreamjobJobOpening.branch_id',array('label'=>__('dreamjob.branch')));?> <?=$this->Form->input('DreamjobJobOpening.branch_id',array('label'=>__('dreamjob.branch'),'empty'=>''));?>
<?=$this->Form->input('DreamjobJobOpening.city',array('label'=>__('dreamjob.city')));?> <?=$this->Form->input('DreamjobJobOpening.city',array('label'=>__('dreamjob.city'),'empty'=>''));?>
<div class="form-group submit"> <div class="form-group submit">
<div> <div>
<?=$this->Form->submit(__('dreamjob.search'),array('class'=>'btn btn-primary'));?> <?=$this->Form->submit(__('dreamjob.search'),array('class'=>'btn btn-primary'));?>

View File

@ -20,8 +20,8 @@
echo $this->Form->input('DreamjobJobOpening.title',$a); echo $this->Form->input('DreamjobJobOpening.title',$a);
?> ?>
<fieldset class="search"> <fieldset class="search">
<?=$this->Form->input('DreamjobJobOpening.branch_id',array('label'=>__('dreamjob.branch')));?> <?=$this->Form->input('DreamjobJobOpening.branch_id',array('label'=>__('dreamjob.branch'),'empty'=>''));?>
<?=$this->Form->input('DreamjobJobOpening.city',array('label'=>__('dreamjob.city')));?> <?=$this->Form->input('DreamjobJobOpening.city',array('label'=>__('dreamjob.city'),'empty'=>''));?>
<div class="form-group submit"> <div class="form-group submit">
<div> <div>
<?=$this->Form->submit(__('dreamjob.search'),array('class'=>'btn btn-primary'));?> <?=$this->Form->submit(__('dreamjob.search'),array('class'=>'btn btn-primary'));?>

View File

@ -20,8 +20,8 @@
echo $this->Form->input('DreamjobJobOpening.title',$a); echo $this->Form->input('DreamjobJobOpening.title',$a);
?> ?>
<fieldset class="search"> <fieldset class="search">
<?=$this->Form->input('DreamjobJobOpening.branch_id',array('label'=>__('dreamjob.branch')));?> <?=$this->Form->input('DreamjobJobOpening.branch_id',array('label'=>__('dreamjob.branch'),'empty'=>''));?>
<?=$this->Form->input('DreamjobJobOpening.city',array('label'=>__('dreamjob.city')));?> <?=$this->Form->input('DreamjobJobOpening.city',array('label'=>__('dreamjob.city'),'empty'=>''));?>
<div class="form-group submit"> <div class="form-group submit">
<div> <div>
<?=$this->Form->submit(__('dreamjob.search'),array('class'=>'btn btn-primary'));?> <?=$this->Form->submit(__('dreamjob.search'),array('class'=>'btn btn-primary'));?>

View File

@ -20,11 +20,11 @@
echo $this->Form->input('DreamjobJobOpening.title',$a); echo $this->Form->input('DreamjobJobOpening.title',$a);
?> ?>
<fieldset class="search"> <fieldset class="search">
<?=$this->Form->input('DreamjobJobOpening.branch_id',array('label'=>__('dreamjob.branch')));?> <?=$this->Form->input('DreamjobJobOpening.branch_id',array('label'=>__('dreamjob.branch'),'empty'=>''));?>
<?=$this->Form->input('DreamjobJobOpening.postcode',array('label'=>__('dreamjob.postcode')));?> <?=$this->Form->input('DreamjobJobOpening.postcode',array('label'=>__('dreamjob.postcode')));?>
<?=$this->Form->input('DreamjobJobOpening.city',array('label'=>__('dreamjob.city')));?> <?=$this->Form->input('DreamjobJobOpening.city',array('label'=>__('dreamjob.city'),'empty'=>''));?>
<?=$this->Form->input('DreamjobJobOpening.graducation_id',array('label'=>__('dreamjob.graducation')));?> <?=$this->Form->input('DreamjobJobOpening.graducation_id',array('label'=>__('dreamjob.graducation'),'empty'=>''));?>
<?=$this->Form->input('DreamjobJobOpening.kindofjob_id',array('label'=>__('dreamjob.kindofjob')));?> <?=$this->Form->input('DreamjobJobOpening.kindofjob_id',array('label'=>__('dreamjob.kindofjob'),'empty'=>''));?>
<div class="form-group submit"> <div class="form-group submit">
<div> <div>
<?=$this->Form->submit(__('dreamjob.search'),array('class'=>'btn btn-primary'));?> <?=$this->Form->submit(__('dreamjob.search'),array('class'=>'btn btn-primary'));?>