Hallo
This commit is contained in:
parent
f2743d3e9e
commit
98aa6adb91
|
@ -37,6 +37,7 @@
|
||||||
|
|
||||||
Router::connect('/opening', array('controller' => 'job', 'action' => 'openingList'));
|
Router::connect('/opening', array('controller' => 'job', 'action' => 'openingList'));
|
||||||
Router::connect('/opening/add', array('controller' => 'job', 'action' => 'openingAdd'));
|
Router::connect('/opening/add', array('controller' => 'job', 'action' => 'openingAdd'));
|
||||||
|
Router::connect('/opening/edit/:id', array('controller' => 'job', 'action' => 'openingEdit'),array("id" => "[0-9]+"));
|
||||||
Router::connect('/opening/:id', array('controller' => 'job', 'action' => 'openingGet'),array("id" => "[0-9]+"));
|
Router::connect('/opening/:id', array('controller' => 'job', 'action' => 'openingGet'),array("id" => "[0-9]+"));
|
||||||
Router::connect('/opening/:id/:favorite', array('controller' => 'job', 'action' => 'openingGet'), array("id" => "[0-9]+",'favorite' => '(?i:favorite)'));
|
Router::connect('/opening/:id/:favorite', array('controller' => 'job', 'action' => 'openingGet'), array("id" => "[0-9]+",'favorite' => '(?i:favorite)'));
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,10 @@ class JobController extends AppController {
|
||||||
|
|
||||||
$this->MiconwareSession->initWeb($this);
|
$this->MiconwareSession->initWeb($this);
|
||||||
$self = $this->MiconwareSession->getCompany();
|
$self = $this->MiconwareSession->getCompany();
|
||||||
|
if(!empty($this->request->query['del'])){
|
||||||
|
//$this->DreamjobJobFavority->delete($this->request->query['del'],false);
|
||||||
|
$this->MiconwareSession->setFlash('dreamjob.opening.delete','flash',array('alert'=>'success'));
|
||||||
|
}
|
||||||
if(!is_array($self) and count($self) <= 0){
|
if(!is_array($self) and count($self) <= 0){
|
||||||
$this->set('error', 'dreamjob.error.noPermision');
|
$this->set('error', 'dreamjob.error.noPermision');
|
||||||
$this->render('/Home/error');
|
$this->render('/Home/error');
|
||||||
|
@ -35,6 +39,24 @@ class JobController extends AppController {
|
||||||
}
|
}
|
||||||
public function openingAdd() {
|
public function openingAdd() {
|
||||||
}
|
}
|
||||||
|
public function openingEdit() {
|
||||||
|
$this->MiconwareSession->init($this);
|
||||||
|
$this->MiconwareSession->initWeb($this);
|
||||||
|
$opening = false;
|
||||||
|
|
||||||
|
|
||||||
|
if(!empty($this->request->params['id'])){
|
||||||
|
$this->request->data = $this->DreamjobJobOpening->findById($this->request->params['id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!is_array($opening) and count($opening) <= 0 ){
|
||||||
|
$this->set('error', 'dreamjob.error.opening.notFound');
|
||||||
|
$this->render('/Home/error');
|
||||||
|
}else{
|
||||||
|
$this->set('opening',$opening);
|
||||||
|
$this->render('/Job/opening_edit');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function openingGet() {
|
public function openingGet() {
|
||||||
$this->MiconwareSession->init($this);
|
$this->MiconwareSession->init($this);
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
$opening_in_app = false;
|
$opening_in_app = false;
|
||||||
|
|
||||||
$opening_in_fav=false;
|
$opening_in_fav=false;
|
||||||
if(is_array($WORKER) and count($WORKER)>0){
|
if(isset($WORKER) and is_array($WORKER) and count($WORKER)>0){
|
||||||
foreach($WORKER['Favority'] as $val){
|
foreach($WORKER['Favority'] as $val){
|
||||||
if($val['id'] == $opening['DreamjobJobOpening']['id'])
|
if($val['id'] == $opening['DreamjobJobOpening']['id'])
|
||||||
$opening_in_fav=true;
|
$opening_in_fav=true;
|
||||||
|
@ -66,12 +66,13 @@ if($opening['AppUser']['take_systemwide']){
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="btn-group-vertical">
|
<div class="btn-group-vertical">
|
||||||
<?=$this->Html->link(__('dreamjob.opening.detail'),array('controller'=>'job', 'action'=>'openingGet', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => "btn btn-default"));?>
|
<?php
|
||||||
<?php if($COMPANY['AppUser']['id'] == $opening['DreamjobJobOpening']['company_id']){ ?>
|
echo $this->Html->link(__('dreamjob.opening.detail'),array('controller'=>'job', 'action'=>'openingGet', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => "btn btn-default"));
|
||||||
<a class="btn btn-default" href="<c:url value="${URL}opening/edit/${opening.id}/"/>">
|
|
||||||
<?=__("dreamjob.edit");?>
|
if( isset($COMPANY['AppUser']['id']) and $COMPANY['AppUser']['id'] == $opening['DreamjobJobOpening']['company_id']){
|
||||||
</a>
|
echo $this->Html->link(__('dreamjob.opening.edit'),array('controller'=>'job', 'action'=>'openingEdit', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => "btn btn-default"));
|
||||||
<?php }elseif(false){ ?>
|
echo $this->Html->link(__('dreamjob.opening.delete'),array('controller'=>'job', 'action'=>'openingList', '?' => array('del'=> $opening['DreamjobJobOpening']['id'])),array("class" => "btn btn-default"));
|
||||||
|
}elseif(false){ ?>
|
||||||
<c:when test="${opening_in_app}">
|
<c:when test="${opening_in_app}">
|
||||||
<c:set var="count" value="0"/>
|
<c:set var="count" value="0"/>
|
||||||
<c:set var="newcount" value="0"/>
|
<c:set var="newcount" value="0"/>
|
||||||
|
@ -89,7 +90,7 @@ if($opening['AppUser']['take_systemwide']){
|
||||||
</a>
|
</a>
|
||||||
<?php }else{ ?>
|
<?php }else{ ?>
|
||||||
<a class="btn btn-default
|
<a class="btn btn-default
|
||||||
<?php if(!is_array($WORKER) and count($WORKER) <= 0){ ?>disabled<?php } ?>"
|
<?php if(isset($WORKER) and !is_array($WORKER) and count($WORKER) <= 0){ ?>disabled<?php } ?>"
|
||||||
href="{% url de.miconware.dreamjob.jobs.views.application_send opening.pk %}">
|
href="{% url de.miconware.dreamjob.jobs.views.application_send opening.pk %}">
|
||||||
<?=__("dreamjob.applicate");?>
|
<?=__("dreamjob.applicate");?>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -9,13 +9,16 @@
|
||||||
--
|
--
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `mic_dj_job_opening_worker` (
|
CREATE TABLE IF NOT EXISTS `mic_dj_job_opening_worker` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`opening_id` int(11) NOT NULL,
|
`opening_id` int(11) NOT NULL,
|
||||||
`worker_id` int(11) NOT NULL,
|
`worker_id` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `opening_id` (`opening_id`,`worker_id`),
|
UNIQUE KEY `opening_id` (`opening_id`,`worker_id`),
|
||||||
KEY `mic_dj_job_opening_worker_favOpening` (`opening_id`),
|
KEY `mic_dj_job_opening_worker_favOpening` (`opening_id`),
|
||||||
KEY `mic_dj_job_opening_worker_favWorker` (`worker_id`)
|
KEY `mic_dj_job_opening_worker_favWorker` (`worker_id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
Loading…
Reference in New Issue