From 2922ca2c5508f313dc88cf90af2ce056dd4ef910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Sat, 29 Mar 2014 21:39:56 +0100 Subject: [PATCH] suche erste schritte --- app/Controller/SearchController.php | 42 +++++++++++++++++++++++++++++ app/View/Search/listopenings.ctp | 15 +++++++++++ app/View/Search/listworkers.ctp | 15 +++++++++++ 3 files changed, 72 insertions(+) create mode 100644 app/Controller/SearchController.php create mode 100644 app/View/Search/listopenings.ctp create mode 100644 app/View/Search/listworkers.ctp 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)); + } + ?> +
+