erste arbeiten an den einstellungen

This commit is contained in:
Martin Müller 2014-03-15 13:56:26 +01:00
parent 066f7950fa
commit 040aa2b59b
5 changed files with 111 additions and 2 deletions

View File

@ -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]+"));

View File

@ -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);

View File

@ -26,9 +26,9 @@ if($isLoggedin){
<li<?php if(isset($MENU_OPENING)){?> class="active"<?php } ?>><?=$this->Html->image('bar-job.png',array('url'=>array('controller'=>'job','action'=>'openingList'))); ?></li>
<?php }elseif(!empty($WORKER)){ ?>
<li<?php if(isset($MENU_APPLICATION)){?> class="active"<?php } ?>><?=$this->Html->image('bar-job.png',array('url'=>array('controller'=>'job','action'=>'applicationList'))); ?></li>
<li<?php if(isset($MENU_FAVORITY)){?> class="active"<?php } ?>><?=$this->Html->image('bar-favority.png',array('url'=>array('controller'=>'job','action'=>'favorite'))); ?></a></li>
<li<?php if(isset($MENU_FAVORITY)){?> class="active"<?php } ?>><?=$this->Html->image('bar-favority.png',array('url'=>array('controller'=>'job','action'=>'favorite'))); ?></li>
<?php } ?>
<li<?php if(isset($MENU_SETTINGS)){?> class="active"<?php } ?>><a href=""><img src="<c:url value="${STATIC_URL}img/bar-settings.png"/>"/></a></li>
<li<?php if(isset($MENU_SETTINGS)){?> class="active"<?php } ?>><?=$this->Html->image('bar-settings.png',array('url'=>array('controller'=>'user','action'=>'settings'))); ?></li>
</ul>
<?php
}elseif(!empty($MENU_START)){

View File

@ -0,0 +1,40 @@
<?php
/*
*
*/
$avatar = false;
if($profil['AppUser']['take_systemwide']){
if($profil['User']['avatar'])
$avatar = true;
}else{
if($profil['AppUser']['avatar'])
$avatar = true;
}
?>
<div class="box">
<?php
if(!empty($WORKER) and count($WORKER)>0){
?>
<div class="tabs-below">
<ul class="nav nav-tabs pull-right">
<li class="active"><?=$this->Html->link(__("dreamjob.settings"),array('controller'=>'user','action'=>'settings'));?></li>
<li><?=$this->Html->link(__("dreamjob.settings.isearch"),array('controller'=>'user','action'=>'isearch'));?></li>
</ul>
</div>
<?php
}
echo $this->Form->create('DreamjobJobApplication',$default_Form);
?>
<h1><?=__("dreamjob.settings");?></h1>
<fieldset>
<legend><?=__("dreamjob.account");?></legend>
<?php
echo $this->Form->input('User.mail',array('label'=>array('text'=>__("dreamjob.title"),"class"=>$default_Form['inputDefaults']['label']['class'])));
?>
<div class="buttonrow">
<?=$this->Form->button(__('dreamjob.application.send'),array('div' => false,'class'=>"btn btn-default ",'type' => 'submit'));?>
</div>
</fieldset>
<?php echo $this->Form->end(); ?>
</div>

View File

@ -0,0 +1,21 @@
<?php
/*
*
*/
$avatar = false;
if($profil['AppUser']['take_systemwide']){
if($profil['User']['avatar'])
$avatar = true;
}else{
if($profil['AppUser']['avatar'])
$avatar = true;
}
?>
<div class="box">
<div class="tabs-below">
<ul class="nav nav-tabs pull-right">
<li><?=$this->Html->link(__("dreamjob.settings"),array('controller'=>'user','action'=>'settings'));?></li>
<li class="active"><?=$this->Html->link(__("dreamjob.settings.isearch"),array('controller'=>'user','action'=>'isearch'));?></li>
</ul>
</div>
</div>