This commit is contained in:
Martin Müller 2014-04-15 21:43:23 +02:00
parent 19b27a9669
commit 4208400e10
5 changed files with 59 additions and 11 deletions

View File

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

View File

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

View File

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

View File

@ -15,13 +15,15 @@ if($profil['AppUser']['take_systemwide']){
<?php if($avatar or $edit){ ?>
<div class="box-extra-left infofield">
<div class="box">
<img src="<?php
if($profil['AppUser']['take_systemwide']){
echo $MEDIA.DS.$profil['User']['avatar'];
}else{
echo $MEDIA.DS.$profil['AppUser']['avatar'];
}
?>"/>
<?php
if($profil['AppUser']['take_systemwide'])
$url = $MEDIA.DS.$profil['User']['avatar'];
else
$url = $MEDIA.DS.$profil['AppUser']['avatar'];
if($edit and isset($url))
$url = 'img/icon_user.png';
?>
<img src="<?=$url;?>"/>
<?php if($edit): ?>
<div class="imgsubtitle edit">
<?php

View File

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