From 040aa2b59bdd5b273ed551ee9c8af3262149bd66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Sat, 15 Mar 2014 13:56:26 +0100 Subject: [PATCH] erste arbeiten an den einstellungen --- app/Config/routes.php | 4 +++ app/Controller/UserController.php | 44 ++++++++++++++++++++++++++++++ app/View/Elements/barleft.ctp | 4 +-- app/View/User/settings_account.ctp | 40 +++++++++++++++++++++++++++ app/View/User/settings_isearch.ctp | 21 ++++++++++++++ 5 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 app/View/User/settings_account.ctp create mode 100644 app/View/User/settings_isearch.ctp 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){ class="active">Html->image('bar-job.png',array('url'=>array('controller'=>'job','action'=>'openingList'))); ?> class="active">Html->image('bar-job.png',array('url'=>array('controller'=>'job','action'=>'applicationList'))); ?> - class="active">Html->image('bar-favority.png',array('url'=>array('controller'=>'job','action'=>'favorite'))); ?> + class="active">Html->image('bar-favority.png',array('url'=>array('controller'=>'job','action'=>'favorite'))); ?> - class="active">"/> + class="active">Html->image('bar-settings.png',array('url'=>array('controller'=>'user','action'=>'settings'))); ?> +
+ 0){ + ?> +
+ +
+ Form->create('DreamjobJobApplication',$default_Form); + ?> +

+
+ + Form->input('User.mail',array('label'=>array('text'=>__("dreamjob.title"),"class"=>$default_Form['inputDefaults']['label']['class']))); + ?> +
+ Form->button(__('dreamjob.application.send'),array('div' => false,'class'=>"btn btn-default ",'type' => 'submit'));?> +
+
+ Form->end(); ?> +
diff --git a/app/View/User/settings_isearch.ctp b/app/View/User/settings_isearch.ctp new file mode 100644 index 0000000..d156470 --- /dev/null +++ b/app/View/User/settings_isearch.ctp @@ -0,0 +1,21 @@ + +
+
+ +
+