diff --git a/app/Controller/SearchController.php b/app/Controller/SearchController.php new file mode 100644 index 0000000..6eb2625 --- /dev/null +++ b/app/Controller/SearchController.php @@ -0,0 +1,42 @@ +MiconwareSession->init($this); + + $this->MiconwareSession->initWeb($this); + $profil = $this->MiconwareSession->getCompany(); + if(!empty($profil) and count($profil) > 0){ + $workers = $this->DreamjobWorker->find('all',array('conditions' => array('DreamjobWorker.searchhidden'=>false))); + $this->set("workers",$workers); + $this->render('/Search/listworkers'); + }else{ + $con = $this->MiconwareSession->getOpeningCondition(); + $openings = $this->DreamjobJobOpening->find('all',array('conditions' => $con)); + $this->set("openings",$openings); + $this->render('/Search/listopenings'); + } + } +} diff --git a/app/View/Search/listopenings.ctp b/app/View/Search/listopenings.ctp new file mode 100644 index 0000000..a2354b3 --- /dev/null +++ b/app/View/Search/listopenings.ctp @@ -0,0 +1,15 @@ + +
+

Temporäre Suche

+
+ element('job_opening_item',array('opening' => $opening)); + } + ?> +
+
diff --git a/app/View/Search/listworkers.ctp b/app/View/Search/listworkers.ctp new file mode 100644 index 0000000..a75b9d0 --- /dev/null +++ b/app/View/Search/listworkers.ctp @@ -0,0 +1,15 @@ + +
+

Temporäre Suche

+
+ element('user_worker_item',array('profil' => $worker)); + } + ?> +
+