suche erste schritte
This commit is contained in:
parent
73c6f7d87a
commit
2922ca2c55
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
App::uses('AppController', 'Controller');
|
||||
|
||||
class SearchController extends AppController {
|
||||
|
||||
/**
|
||||
* This controller use User Model
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
|
||||
public $uses = array('DreamjobWorker','DreamjobJobOpening');
|
||||
public $components = array('MiconwareSession');
|
||||
|
||||
/**
|
||||
* Displays a view
|
||||
*
|
||||
* @param mixed What page to display
|
||||
* @return void
|
||||
* @throws NotFoundException When the view file could not be found
|
||||
* or MissingViewException in debug mode.
|
||||
*/
|
||||
|
||||
|
||||
public function listopening() {
|
||||
$this->MiconwareSession->init($this);
|
||||
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
$profil = $this->MiconwareSession->getCompany();
|
||||
if(!empty($profil) and count($profil) > 0){
|
||||
$workers = $this->DreamjobWorker->find('all',array('conditions' => array('DreamjobWorker.searchhidden'=>false)));
|
||||
$this->set("workers",$workers);
|
||||
$this->render('/Search/listworkers');
|
||||
}else{
|
||||
$con = $this->MiconwareSession->getOpeningCondition();
|
||||
$openings = $this->DreamjobJobOpening->find('all',array('conditions' => $con));
|
||||
$this->set("openings",$openings);
|
||||
$this->render('/Search/listopenings');
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<div class="box">
|
||||
<h1>Temporäre Suche</h1>
|
||||
<div class="openinggroup">
|
||||
<?php
|
||||
foreach($openings as $opening){
|
||||
echo $this->element('job_opening_item',array('opening' => $opening));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<div class="box">
|
||||
<h1>Temporäre Suche</h1>
|
||||
<div class="openinggroup">
|
||||
<?php
|
||||
foreach($workers as $worker){
|
||||
echo $this->element('user_worker_item',array('profil' => $worker));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue