This commit is contained in:
Martin Müller 2014-05-11 15:47:32 +02:00
parent b791d541a6
commit 1e33ae2534
2 changed files with 5 additions and 1 deletions

View File

@ -32,6 +32,9 @@ class HomeController extends AppController {
public function home() { public function home() {
$this->MiconwareSession->init($this); $this->MiconwareSession->init($this);
$this->MiconwareSession->initWeb($this); $this->MiconwareSession->initWeb($this);
$c = $this->MiconwareSession->getCompany();
if (!empty($c))
return $this->redirect(array('controller'=>'home','action' => 'company'));
$openings = $this->DreamjobJobOpening->find('all',array('conditions'=>$this->MiconwareSession->getOpeningCondition(), $openings = $this->DreamjobJobOpening->find('all',array('conditions'=>$this->MiconwareSession->getOpeningCondition(),
'order'=>'DreamjobJobOpening.id DESC','limit'=> self::$opening_limit)); 'order'=>'DreamjobJobOpening.id DESC','limit'=> self::$opening_limit));
$this->set('openings',$openings); $this->set('openings',$openings);

View File

@ -1,8 +1,9 @@
<ul> <ul>
<li<?php if(isset($MENU_START)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.startpage'),array('controller'=>'home','action'=>'home'));?></li>
<?php if(!empty($COMPANY)): ?> <?php if(!empty($COMPANY)): ?>
<li<?php if(isset($MENU_START)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.startpage'),array('controller'=>'home','action'=>'company'));?></li>
<li<?php if(isset($MENU_SEARCH)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.search'),array('controller'=>'search','action'=>'worker'));?></li> <li<?php if(isset($MENU_SEARCH)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.search'),array('controller'=>'search','action'=>'worker'));?></li>
<?php else: ?> <?php else: ?>
<li<?php if(isset($MENU_START)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.startpage'),array('controller'=>'home','action'=>'home'));?></li>
<li<?php if(isset($MENU_SEARCH)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.search'),array('controller'=>'search','action'=>'opening'));?></li> <li<?php if(isset($MENU_SEARCH)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.search'),array('controller'=>'search','action'=>'opening'));?></li>
<?php endif; ?> <?php endif; ?>
<li<?php if(isset($MENU_SERVICE)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.service'),'/service/');?></li> <li<?php if(isset($MENU_SERVICE)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.service'),'/service/');?></li>