diff --git a/app/Config/routes.php b/app/Config/routes.php index 9c97cce..ca95232 100755 --- a/app/Config/routes.php +++ b/app/Config/routes.php @@ -32,6 +32,10 @@ Router::connect('/profil', array('controller' => 'user', 'action' => 'profil')); Router::connect('/profil/page/:page', array('controller' => 'user', 'action' => 'profil'),array("page" => "[0-9]+")); + Router::connect('/settings', array('controller' => 'user', 'action' => 'settings')); + Router::connect('/settings/isearch', array('controller' => 'user', 'action' => 'isearch')); + + Router::connect('/user/:id', array('controller' => 'user', 'action' => 'profil'),array("id" => "[0-9]+")); Router::connect('/user/:id/page/:page', array('controller' => 'user', 'action' => 'profil'),array("id" => "[0-9]+","page" => "[0-9]+")); diff --git a/app/Controller/UserController.php b/app/Controller/UserController.php index 938b2d1..f92bc99 100755 --- a/app/Controller/UserController.php +++ b/app/Controller/UserController.php @@ -126,6 +126,50 @@ class UserController extends AppController { $this->set('_serialize', array('cv','error')); } + public function settings() { + $this->MiconwareSession->init($this); + + $this->MiconwareSession->initWeb($this); + $this->autoRender = true; + $this->layout = 'default'; + $this->RequestHandler->setContent('html', 'application/html' ); + + + + $profil = $this->MiconwareSession->getWorker(); + if(empty($profil) or count($profil) <= 0) + $profil = $this->MiconwareSession->getCompany(); + + if(empty($profil) or count($profil) <= 0){ + $this->MiconwareSession->setFlash(__('dreamjob.error.page.notFound'),'flash',array('alert'=>'danger')); + $this->set('error', 'dreamjob.error.noPermision'); + $this->render('/Home/error'); + }else{ + $this->set('profil',$profil); + $this->render('/User/settings_account'); + } + } + public function iSearch() { + $this->MiconwareSession->init($this); + + $this->MiconwareSession->initWeb($this); + $this->autoRender = true; + $this->layout = 'default'; + $this->RequestHandler->setContent('html', 'application/html' ); + + + + $profil = $this->MiconwareSession->getWorker(); + + if(empty($profil) or count($profil) <= 0){ + $this->MiconwareSession->setFlash(__('dreamjob.error.page.notFound'),'flash',array('alert'=>'danger')); + $this->set('error', 'dreamjob.error.noPermision'); + $this->render('/Home/error'); + }else{ + $this->set('profil',$profil); + $this->render('/User/settings_isearch'); + } + } public function test() { $this->MiconwareSession->init($this); diff --git a/app/View/Elements/barleft.ctp b/app/View/Elements/barleft.ctp index c169992..2896639 100755 --- a/app/View/Elements/barleft.ctp +++ b/app/View/Elements/barleft.ctp @@ -26,9 +26,9 @@ if($isLoggedin){