diff --git a/app/Config/routes.php b/app/Config/routes.php index 555ddf0..c777cfe 100755 --- a/app/Config/routes.php +++ b/app/Config/routes.php @@ -68,6 +68,7 @@ Router::connect('/favorite', array('controller' => 'job', 'action' => 'favorite')); Router::connect('/search', array('controller' => 'search', 'action' => 'listopening')); + Router::connect('/search/o', array('controller' => 'search', 'action' => 'openings')); Router::connect('/test/', array('controller' => 'user', 'action' => 'test')); diff --git a/app/Controller/SearchController.php b/app/Controller/SearchController.php index 6eb2625..e4d4b31 100644 --- a/app/Controller/SearchController.php +++ b/app/Controller/SearchController.php @@ -10,7 +10,8 @@ class SearchController extends AppController { * @var array */ - public $uses = array('DreamjobWorker','DreamjobJobOpening'); + public $uses = array('DreamjobWorker','DreamjobJobOpening', + 'DreamjobListBranch','DreamjobListCity','DreamjobListKindofjob','DreamjobListGraducation'); public $components = array('MiconwareSession'); /** @@ -21,7 +22,23 @@ class SearchController extends AppController { * @throws NotFoundException When the view file could not be found * or MissingViewException in debug mode. */ - + public function openings() { + $this->MiconwareSession->init($this); + + $this->MiconwareSession->initWeb($this); + + $con = $this->MiconwareSession->getOpeningCondition(); + $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')); + $this->set("kindofjobs",$this->DreamjobListKindofjob->find('list')); + + $this->set("openings",$openings); + $this->render('/Search/searchopenings'); + + } public function listopening() { $this->MiconwareSession->init($this); diff --git a/app/Controller/UserController.php b/app/Controller/UserController.php index 5840fa9..8d89c78 100755 --- a/app/Controller/UserController.php +++ b/app/Controller/UserController.php @@ -99,9 +99,11 @@ class UserController extends AppController { $this->set('error', 'dreamjob.error.noPermision'); $this->render('/Home/error'); } - }else{ + }elseif($profil['AppUser']['id'] == $self['AppUser']['id']){ $this->set('edit', true); $this->set('MENU_PROFIL',true); + }else{ + $this->set('edit', false); } if(!empty($this->request->params['page']) and (!is_array($page) or count($page)<= 0)) $this->MiconwareSession->setFlash(__('dreamjob.error.page.notFound'),'flash',array('alert'=>'danger')); diff --git a/app/View/User/company.ctp b/app/View/User/company.ctp index 801f316..06363ca 100644 --- a/app/View/User/company.ctp +++ b/app/View/User/company.ctp @@ -15,14 +15,16 @@ if($profil['AppUser']['take_systemwide']){
- - + + +
'.__('dreamjob.image.edit'); diff --git a/app/webroot/css/dreamjob.css b/app/webroot/css/dreamjob.css index 40597bd..eab7350 100755 --- a/app/webroot/css/dreamjob.css +++ b/app/webroot/css/dreamjob.css @@ -431,3 +431,29 @@ body.loading #container{ .imgsubtitle.edit a{ color:white; } + +fieldset.search{ + text-align:center; +} +fieldset.search .form-group{ + text-align:left; + width:250px; + display:block; + float:left; + margin:0; +} +fieldset.search .submit.form-group{ + padding-top:40px; + margin:0px 15px; +} +fieldset.search .form-group label{ + margin: 0px 20px; + width:250px; + font-weight:700; + height:25px; + +} +fieldset.search .form-group div{ + width:250px; + display:block; +}