opening und application view in company ready
This commit is contained in:
parent
841e2ffe12
commit
c167e24236
|
@ -40,8 +40,15 @@
|
|||
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/:favorite', array('controller' => 'job', 'action' => 'openingGet'), array("id" => "[0-9]+",'favorite' => '(?i:favorite)'));
|
||||
Router::connect('/opening/:id/application', array('controller' => 'job', 'action' => 'applicationByOpening'),array("id" => "[0-9]+"));
|
||||
|
||||
Router::connect('/application', array('controller' => 'job', 'action' => 'applicationList'));
|
||||
Router::connect('/application/:id', array('controller' => 'job', 'action' => 'applicationGet'),array("id" => "[0-9]+"));
|
||||
Router::connect('/application/:id/page/:page', array('controller' => 'job', 'action' => 'applicationGet'),array("id" => "[0-9]+","page" => "[0-9]+"));
|
||||
Router::connect('/application/:id/mess:ages', array('controller' => 'job', 'action' => 'applicationGet'), array("id" => "[0-9]+",'ages' => '(?i:ages)'));
|
||||
Router::connect('/application/:id/arc:hiv', array('controller' => 'job', 'action' => 'applicationGet'), array("id" => "[0-9]+",'hiv' => '(?i:hiv)'));
|
||||
|
||||
Router::connect('/applicate/:id', array('controller' => 'job', 'action' => 'applicationSend'),array("id" => "[0-9]+"));
|
||||
|
||||
Router::connect('/favorite', array('controller' => 'job', 'action' => 'favorite'));
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ class JobController extends AppController {
|
|||
* @var array
|
||||
*/
|
||||
|
||||
public $uses = array('DreamjobJobOpening','DreamjobJobFavority','DreamjobJobApplication');
|
||||
public $uses = array('DreamjobJobOpening','DreamjobJobFavority','DreamjobJobApplication','DreamjobPageText','DreamjobPageImage','DreamjobJobMsg');
|
||||
|
||||
/**
|
||||
* Displays a view
|
||||
|
@ -25,14 +25,20 @@ class JobController extends AppController {
|
|||
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
$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) or count($self) <= 0){
|
||||
$this->set('error', 'dreamjob.error.noPermision');
|
||||
$this->render('/Home/error');
|
||||
}else{
|
||||
if(!empty($this->request->query['del'])){
|
||||
$o =$this->DreamjobJobOpening->findById($this->request->query['del']);
|
||||
if($o['AppUser']['id']== $self['AppUser']['id']){
|
||||
$this->DreamjobJobOpening->delete($this->request->query['del'],false);
|
||||
$this->MiconwareSession->setFlash('dreamjob.opening.delete','flash',array('alert'=>'success'));
|
||||
}else{
|
||||
$this->MiconwareSession->setFlash('dreamjob.opening.delete.error','flash',array('alert'=>'danger'));
|
||||
}
|
||||
}
|
||||
$openings = $this->DreamjobJobOpening->find('all',array('conditions' => array('DreamjobJobOpening.company_id' => $self['AppUser']['id'])));
|
||||
$this->set('openings',$openings);
|
||||
$this->render('/Job/opening_list');
|
||||
|
@ -110,7 +116,7 @@ class JobController extends AppController {
|
|||
|
||||
|
||||
if(!empty($this->request->params['id'])){
|
||||
if(!empty($this->request->params['favorite']) and count($this->request->params['favorite'])>0){
|
||||
if(!empty($this->request->params['favorite']) or count($this->request->params['favorite'])>0){
|
||||
$WORKER = $this->MiconwareSession->getWorker();
|
||||
$fav=false;
|
||||
foreach($WORKER['Favority'] as $val){
|
||||
|
@ -135,7 +141,7 @@ class JobController extends AppController {
|
|||
$this->MiconwareSession->refreshCache();
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
|
||||
if(!is_array($opening) and count($opening) <= 0 ){
|
||||
if(!is_array($opening) or count($opening) <= 0 ){
|
||||
$this->set('error', 'dreamjob.error.opening.notFound');
|
||||
$this->render('/Home/error');
|
||||
}else{
|
||||
|
@ -149,7 +155,7 @@ class JobController extends AppController {
|
|||
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
$self = $this->MiconwareSession->getWorker();
|
||||
if(!is_array($self) and count($self) <= 0){
|
||||
if(!is_array($self) or count($self) <= 0){
|
||||
$this->set('error', 'dreamjob.error.noPermision');
|
||||
$this->render('/Home/error');
|
||||
}else{
|
||||
|
@ -158,6 +164,7 @@ class JobController extends AppController {
|
|||
$fav_id[]=$fav['id'];
|
||||
$openings = $this->DreamjobJobOpening->find('all',array('conditions' => array('DreamjobJobOpening.id' =>$fav_id)));
|
||||
$this->set('openings',$openings);
|
||||
$this->set('opening_MINI',true);
|
||||
$this->render('/Job/favorite');
|
||||
}
|
||||
}
|
||||
|
@ -167,14 +174,115 @@ class JobController extends AppController {
|
|||
$this->MiconwareSession->initWeb($this);
|
||||
$self = $this->MiconwareSession->getWorker();
|
||||
|
||||
if(!is_array($self) and count($self) <= 0){
|
||||
if(!is_array($self) or count($self) <= 0){
|
||||
$this->set('error', 'dreamjob.error.noPermision');
|
||||
$this->render('/Home/error');
|
||||
}else{
|
||||
$applications = $this->DreamjobJobApplication->find('all',array('conditions' => array('DreamjobJobApplication.worker_id' => $self['AppUser']['id'])));
|
||||
$this->set('applications',$applications);
|
||||
$this->set('opening_MINI',true);
|
||||
$this->render('/Job/applicationWorker_list');
|
||||
}
|
||||
}
|
||||
public function applicationGet() {
|
||||
$this->MiconwareSession->init($this);
|
||||
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
$WORKER = $this->MiconwareSession->getWorker();
|
||||
$COMPANY = $self = $this->MiconwareSession->getCompany();
|
||||
$application = null;
|
||||
if(isset($this->request->params['id'])){
|
||||
if(is_array($WORKER) and count($WORKER) > 0)
|
||||
$application = $this->DreamjobJobApplication->find('first',array('conditions' => array('DreamjobJobApplication.worker_id' => $WORKER['AppUser']['id'],'DreamjobJobApplication.id'=> $this->request->params['id'] )));
|
||||
if(is_array($COMPANY) and count($COMPANY) > 0)
|
||||
$application = $this->DreamjobJobApplication->find('first',array('conditions' => array('DreamjobJobOpening.company_id' => $COMPANY['AppUser']['id'],'DreamjobJobApplication.id'=> $this->request->params['id'] )));
|
||||
}
|
||||
|
||||
if(!is_array($application) or count($application) <= 0){
|
||||
$this->set('error', 'dreamjob.error.noPermision');
|
||||
$this->render('/Home/error');
|
||||
}else{
|
||||
$this->set('page',null);
|
||||
if(!empty($this->request->params['hiv'])){
|
||||
$this->DreamjobJobApplication->id = $application['DreamjobJobApplication']['id'];
|
||||
if ($this->DreamjobJobApplication->saveField('closed',!$application['DreamjobJobApplication']['closed'])) {
|
||||
$application = $this->DreamjobJobApplication->find('first',array('conditions' => array('DreamjobJobApplication.id'=> $this->request->params['id'] )));
|
||||
$this->MiconwareSession->setFlash('dreamjob.application.archiv','flash',array('alert'=>'success'));
|
||||
}else{
|
||||
$this->MiconwareSession->setFlash('dreamjob.application.archiv.error','flash',array('alert'=>'danger'));
|
||||
}
|
||||
}
|
||||
if(!empty($this->request->params['ages'])){
|
||||
$this->set('msg',true);
|
||||
if ($this->request->is('post')) {
|
||||
$this->DreamjobJobMsg->create($this->request->data);
|
||||
$this->DreamjobJobMsg->data['DreamjobJobMsg']['saw'] = false;
|
||||
$this->DreamjobJobMsg->data['DreamjobJobMsg']['application_id'] = $application['DreamjobJobApplication']['id'];
|
||||
$this->DreamjobJobMsg->data['DreamjobJobMsg']['fromcompany'] = is_array($COMPANY) and count($COMPANY) > 0;
|
||||
if ($this->DreamjobJobMsg->save()) {
|
||||
$application = $this->DreamjobJobApplication->find('first',array('conditions' => array('DreamjobJobApplication.id'=> $this->request->params['id'] )));
|
||||
$this->MiconwareSession->setFlash('dreamjob.application.msg.add','flash',array('alert'=>'success'));
|
||||
}else{
|
||||
$this->MiconwareSession->setFlash('dreamjob.application.msg.error','flash',array('alert'=>'danger'));
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$this->set('msg',false);
|
||||
if(!empty($this->request->params['page'])){
|
||||
$this->set('pageInh',$this->DreamjobJobApplication->Page->find('first',
|
||||
array('conditions' => array("Page.id" => $this->request->params['page']))
|
||||
));
|
||||
$page = $this->DreamjobJobApplication->PageText->find('first',
|
||||
array('conditions' => array("PageText.page_ptr_id" => $this->request->params['page']))
|
||||
);
|
||||
if(!is_array($page) or count($page)<= 0)
|
||||
$page = $this->DreamjobJobApplication->PageImage->find('first',
|
||||
array('conditions' => array("PageImage.page_ptr_id" => $this->request->params['page']))
|
||||
);
|
||||
$this->set('page',$page);
|
||||
}
|
||||
}
|
||||
$this->set('application',$application);
|
||||
$this->render('/Job/application');
|
||||
}
|
||||
}
|
||||
public function applicationByOpening(){
|
||||
$this->MiconwareSession->init($this);
|
||||
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
$COMPANY = $self = $this->MiconwareSession->getCompany();
|
||||
$applications = null;
|
||||
$opening = null;
|
||||
if(isset($this->request->params['id'])){
|
||||
if(is_array($COMPANY) and count($COMPANY) > 0)
|
||||
$opening = $this->DreamjobJobOpening->find('first',array('conditions' => array('DreamjobJobOpening.company_id' => $COMPANY['AppUser']['id'],'DreamjobJobOpening.id'=> $this->request->params['id'] )));
|
||||
$filter_current = false;
|
||||
$filter_archiv = false;
|
||||
$condition = array('DreamjobJobOpening.company_id' => $COMPANY['AppUser']['id'],'DreamjobJobApplication.opening_id'=> $this->request->params['id']);
|
||||
if(isset($this->request->query['filter']) and $this->request->query['filter'] =='all'){
|
||||
}elseif(isset($this->request->query['filter']) and $this->request->query['filter'] =='archiv'){
|
||||
$condition['closed'] = true;
|
||||
$filter_archiv = true;
|
||||
}else{
|
||||
$condition['closed'] = false;
|
||||
$filter_current = true;
|
||||
}
|
||||
|
||||
|
||||
$applications = $this->DreamjobJobApplication->find('all',array('conditions' =>$condition));
|
||||
$this->set("filter_archiv",$filter_archiv);
|
||||
$this->set("filter_current",$filter_current);
|
||||
}
|
||||
if(!is_array($opening) or count($opening) <= 0){
|
||||
$this->set('error', 'dreamjob.error.noPermision');
|
||||
$this->render('/Home/error');
|
||||
}else{
|
||||
$this->set('opening',$opening);
|
||||
$this->set('applications',$applications);
|
||||
$this->render('/Job/applicationCompany_list');
|
||||
}
|
||||
}
|
||||
public function applicationSend() {
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -145,6 +145,19 @@ class DreamjobJobApplication extends AppModel {
|
|||
|
||||
|
||||
public $hasOne = array(
|
||||
'WorkerGraducation' => array(
|
||||
'className' => 'DreamjobListGraducation',
|
||||
'foreignKey' => false,
|
||||
'conditions' => array('DreamjobWorker.graducation_id = WorkerGraducation.id'),
|
||||
'limit' => 1
|
||||
),
|
||||
'WorkerUser' => array(
|
||||
'className' => 'User',
|
||||
'foreignKey' => false,
|
||||
'conditions' => array('DreamjobJobApplication.worker_id = AppUserWorker.id and WorkerUser.id = AppUserWorker.user_id'),
|
||||
'limit' => 1
|
||||
),
|
||||
//achtung
|
||||
'DreamjobCompany' => array(
|
||||
'className' => 'DreamjobCompany',
|
||||
'foreignKey' => false,
|
||||
|
@ -183,4 +196,34 @@ class DreamjobJobApplication extends AppModel {
|
|||
),
|
||||
|
||||
);
|
||||
public $hasAndBelongsToMany = array(
|
||||
'PageText' =>
|
||||
array(
|
||||
'className' => 'DreamjobPageText',
|
||||
'with' => 'DreamjobJobApplicationPage',
|
||||
'foreignKey' => 'application_id',
|
||||
'associationForeignKey' => 'page_id'
|
||||
),
|
||||
'PageImage' =>
|
||||
array(
|
||||
'className' => 'DreamjobPageImage',
|
||||
'with' => 'DreamjobJobApplicationPage',
|
||||
'foreignKey' => 'application_id',
|
||||
'associationForeignKey' => 'page_id'
|
||||
),
|
||||
'Page' =>
|
||||
array(
|
||||
'className' => 'DreamjobPageInh',
|
||||
'with' => 'DreamjobJobApplicationPage',
|
||||
'foreignKey' => 'application_id',
|
||||
'associationForeignKey' => 'page_id'
|
||||
)
|
||||
);
|
||||
|
||||
public $hasMany = array(
|
||||
'DreamjobJobMsg' => array(
|
||||
'className' => 'DreamjobJobMsg',
|
||||
'foreignKey' => 'application_id'
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* MicDjJobsApplicationPage Model
|
||||
*
|
||||
* @property Application $Application
|
||||
* @property Page $Page
|
||||
*/
|
||||
class DreamjobJobApplicationPage extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
public $useTable = 'mic_dj_jobs_application_pages';
|
||||
|
||||
/**
|
||||
* Primary key field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $primaryKey = 'id';
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'id';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'id' => array(
|
||||
'numeric' => array(
|
||||
'rule' => array('numeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'application_id' => array(
|
||||
'numeric' => array(
|
||||
'rule' => array('numeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'page_id' => array(
|
||||
'numeric' => array(
|
||||
'rule' => array('numeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
|
||||
/**
|
||||
* belongsTo associations
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $belongsTo = array(
|
||||
'DreamjobJobApplication' => array(
|
||||
'className' => 'DreamjobJobApplication',
|
||||
'foreignKey' => 'application_id'
|
||||
),
|
||||
'DreamjobPage' => array(
|
||||
'className' => 'DreamjobPageInh',
|
||||
'foreignKey' => 'page_id'
|
||||
),
|
||||
);
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* MicDjJobsMsg Model
|
||||
*
|
||||
* @property Application $Application
|
||||
*/
|
||||
class DreamjobJobMsg extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_dj_jobs_msg';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'id';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'application_id' => array(
|
||||
'numeric' => array(
|
||||
'rule' => array('numeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'fromcompany' => array(
|
||||
'boolean' => array(
|
||||
'rule' => array('boolean'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'saw' => array(
|
||||
'boolean' => array(
|
||||
'rule' => array('boolean'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'text' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
|
||||
/**
|
||||
* belongsTo associations
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $belongsTo = array(
|
||||
'Application' => array(
|
||||
'className' => 'Application',
|
||||
'foreignKey' => 'application_id',
|
||||
'conditions' => '',
|
||||
'fields' => '',
|
||||
'order' => ''
|
||||
)
|
||||
);
|
||||
}
|
|
@ -164,6 +164,10 @@ class DreamjobWorker extends AppModel {
|
|||
'DreamjobPageInh' => array(
|
||||
'className' => 'DreamjobPageInh',
|
||||
'foreignKey' => 'user_id'
|
||||
),
|
||||
'DreamjobJobApplication' => array(
|
||||
'className' => 'DreamjobJobApplication',
|
||||
'foreignKey' => 'worker_id'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -10,6 +10,11 @@
|
|||
if($val['id'] == $opening['DreamjobJobOpening']['id'])
|
||||
$opening_in_fav=true;
|
||||
}
|
||||
foreach($WORKER['DreamjobJobApplication'] as $val){
|
||||
if($val['opening_id'] == $opening['DreamjobJobOpening']['id'])
|
||||
$opening_in_app=true;
|
||||
$opening_inApp=$val;
|
||||
}
|
||||
}
|
||||
|
||||
$avatar = false;
|
||||
|
@ -21,11 +26,11 @@ if($opening['AppUser']['take_systemwide']){
|
|||
$avatar = true;
|
||||
}
|
||||
?>
|
||||
<c:if test="${empty opening_MINI || not (opening_in_app || opening_in_fav)}">
|
||||
<?php if(!empty($opening_MINI) or !($opening_in_app or $opening_in_fav)){ ?>
|
||||
<div class="openingitem">
|
||||
<h3><?=$opening['DreamjobJobOpening']['title'];?></h3>
|
||||
<c:if test="${WORKER!=null}">
|
||||
<c:if test="${not opening_in_app}">
|
||||
<?php if(!empty($WORKER)){ ?>
|
||||
<?php if(!$opening_in_app){ ?>
|
||||
<span style="float: right;">
|
||||
<?php
|
||||
$image='favority_off.png';
|
||||
|
@ -34,8 +39,8 @@ if($opening['AppUser']['take_systemwide']){
|
|||
echo $this->Html->image($image,array('url' => array('controller'=>'job','action'=>'openingGet','id'=>$opening['DreamjobJobOpening']['id'],'favorite'=>'favorite')));
|
||||
?>
|
||||
</span>
|
||||
</c:if>
|
||||
</c:if>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<div>
|
||||
<?php if($avatar){ ?>
|
||||
<div class="icon">
|
||||
|
@ -70,33 +75,31 @@ if($opening['AppUser']['take_systemwide']){
|
|||
echo $this->Html->link(__('dreamjob.opening.detail'),array('controller'=>'job', 'action'=>'openingGet', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => "btn btn-default"));
|
||||
|
||||
if( isset($COMPANY['AppUser']['id']) and $COMPANY['AppUser']['id'] == $opening['DreamjobJobOpening']['company_id']){
|
||||
echo $this->Html->link(__('dreamjob.application'),array('controller'=>'job', 'action'=>'applicationByOpening', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => "btn btn-default"));
|
||||
echo $this->Html->link(__('dreamjob.opening.edit'),array('controller'=>'job', 'action'=>'openingEdit', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => "btn btn-default"));
|
||||
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:set var="count" value="0"/>
|
||||
<c:set var="newcount" value="0"/>
|
||||
<c:forEach var="item" items="${opening_app.messages}">
|
||||
<c:if test="${item.fromcompany && not saw}">
|
||||
<c:set var="newcount" value="${newcount + 1}"/>
|
||||
</c:if>
|
||||
<c:set var="count" value="${count + 1}"/>
|
||||
</c:forEach>
|
||||
<a class="btn btn-default" href="<c:url value="${URL}application/${opening_app.id}/"/>">
|
||||
<spring:message code="dreamjob.applicated"/>
|
||||
<span class="badge">
|
||||
<c:if test="${newcount eq count}">${newcount}/</c:if>
|
||||
${count}</span>
|
||||
</a>
|
||||
<?php }else{ ?>
|
||||
<a class="btn btn-default
|
||||
<?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 %}">
|
||||
<?=__("dreamjob.applicate");?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
}elseif($opening_in_app){
|
||||
if(!empty($enableMsg)){
|
||||
$countstr= count($opening['DreamjobJobMsg']);
|
||||
$newcount=0;
|
||||
foreach($opening['DreamjobJobMsg'] as $msg)
|
||||
if(!$msg['saw'])
|
||||
$newcount++;
|
||||
if($newcount>0)
|
||||
$countstr = $newcount."/".$countstr;
|
||||
$countstr =__('dreamjob.applicated').'<span class="badge">'.$countstr.'</span>';
|
||||
}else
|
||||
$countstr =__('dreamjob.applicated');
|
||||
echo $this->Html->link($countstr,array('controller'=>'job', 'action'=>'applicationGet', 'id' => $opening_inApp['id']),array("class" => "btn btn-default"));
|
||||
}else{
|
||||
$class="btn btn-default";
|
||||
if(isset($WORKER) and !is_array($WORKER) and count($WORKER) <= 0)
|
||||
$class = "btn btn-default disable";
|
||||
echo $this->Html->link(__('dreamjob.applicate'),array('controller'=>'job', 'action'=>'applicationSend', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => $class));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<?php } ?>
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<div class="item">
|
||||
<div class="icon"> <img src="{% if workershow.avatar %}{{workershow.avatar.url}}{% else %}{{ STATIC_URL }}img/icon_user.png{% endif %}"></div>
|
||||
<div class="left">
|
||||
<span class="title">{{workershow}}</span>
|
||||
<span>{% trans 'city' %}:{{workershow.city}}</span>
|
||||
<span>{% trans 'branch' %}:{{workershow.branch}}</span>
|
||||
<span>{% trans 'graducation' %}:{{workershow.graducation}}</span>
|
||||
{% if workershow.workexperience %}
|
||||
<span>{% trans 'workexperience' %}:{{workershow.workexperience}} {% trans 'years' %}</span>
|
||||
{% endif %}
|
||||
<span>{{application.created}}</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
{% if application.closed %}
|
||||
<a href="{% url de.miconware.dreamjob.jobs.views.opening_application opening=application.opening.pk application=application.pk showarchive=showarchive %}"><span jtype="button">{% trans 'application open' %}</span></a>
|
||||
<a href="{% url de.miconware.dreamjob.jobs.views.application_show application.pk %}"><span jtype="button">{% trans 'detail' %}</span></a>
|
||||
|
||||
{% else %}
|
||||
<a href="{% url de.miconware.dreamjob.jobs.views.opening_application opening=application.opening.pk application=application.pk showarchive=showarchive %}"><span jtype="button">{% trans 'application archiv' %}</span></a>
|
||||
<a href="{% url de.miconware.dreamjob.jobs.views.application_show application.pk %}"><span jtype="button">
|
||||
{% if application.messages_set.all|length > 0 %}
|
||||
{% blocktrans with new=application.newmsgcompany.all|length all=application.messages_set.all|length %}detail ({{new}}/{{all}}){% endblocktrans %}
|
||||
{% else %}
|
||||
{% trans 'detail' %}
|
||||
{% endif %}
|
||||
</span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,135 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
?>
|
||||
|
||||
<div>
|
||||
<span>
|
||||
<?php if(!empty($WORKER)){
|
||||
echo $this->Html->link(__('dreamjob.my.application'),array('controller'=>'job','action'=>'applicationList'));
|
||||
}else{
|
||||
echo $this->Html->link(__('dreamjob.application'),array('controller'=>'job','action'=>'applicationByOpening','id'=>$application['DreamjobJobOpening']['id']));
|
||||
} ?>
|
||||
</span>
|
||||
<span style="float: right;">
|
||||
<?=$this->Html->link(__('dreamjob.opening'),array('controller'=>'job','action'=>'openingGet','id'=>$application['DreamjobJobOpening']['id'])); ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-title">
|
||||
<h3><?=$application['AppUser']['nickname']." ".$application['DreamjobCompany']['corporateform'];?></h3>
|
||||
<h1><?=$application['DreamjobJobOpening']['title'];?></h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<span>
|
||||
<?php if(!empty($COMPANY)){
|
||||
$str = 'dreamjob.application.close';
|
||||
if($application['DreamjobJobApplication']['closed'])
|
||||
$str = 'dreamjob.application.close.activet';
|
||||
?>
|
||||
<!-- TODO -->
|
||||
<?=$this->Html->link(__($str),array('controller'=>'job','action'=>'applicationGet','id'=>$application['DreamjobJobApplication']['id'],'hiv'=>'hiv')); ?>
|
||||
<?php } ?>
|
||||
|
||||
</span>
|
||||
<span style="float: right;">
|
||||
<?php if($msg){
|
||||
echo $this->Html->link(__('dreamjob.applicated'),array('controller'=>'job','action'=>'applicationGet','id'=>$application['DreamjobJobApplication']['id']));
|
||||
}else{
|
||||
echo $this->Html->link(__('dreamjob.message.send'),array('controller'=>'job','action'=>'applicationGet','id'=>$application['DreamjobJobApplication']['id'],'ages'=>'ages'));
|
||||
} ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<?php if(!empty($COMPANY)){ ?>
|
||||
<div class="box">
|
||||
<?php
|
||||
$profil=array('DreamjobWorker'=>$application['DreamjobWorker'],
|
||||
'DreamjobUser'=>$application["DreamjobUserWorker"],
|
||||
'AppUser'=>$application["AppUserWorker"],
|
||||
'User'=>$application["WorkerUser"],
|
||||
'DreamjobListGraducation'=>$application["WorkerGraducation"]);
|
||||
echo $this->element('user_worker_header',array('profil'=>$profil));
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div id="tab">
|
||||
<!-- tab -->
|
||||
<?php if(!$msg){ ?>
|
||||
<div class="box">
|
||||
<div class="tabs-below">
|
||||
<ul class="nav nav-tabs pull-right">
|
||||
<li<?php if (empty($page)){?> class="active"<?php } ?>>
|
||||
<?=$this->Html->link(__("dreamjob.application"),array('controller'=>'job','action'=>'applicationGet','id'=> $application['DreamjobJobApplication']['id'] ),array('rel'=>"tab")); ?>
|
||||
</li>
|
||||
<?php foreach($application['Page'] as $pag){ ?>
|
||||
<li<?php if(isset($page['DreamjobPageInh']['id'])) if ($page['DreamjobPageInh']['id'] == $pag['id']){?> class="active"<?php } ?>>
|
||||
<?=$this->Html->link($pag['title'],array('controller'=>'job','action'=>'applicationGet','id'=> $application['DreamjobJobApplication']['id'],'page'=> $pag['id'] ),array('rel'=>"tab")); ?>
|
||||
<?php }?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php }
|
||||
if($msg){
|
||||
|
||||
foreach($application['DreamjobJobMsg'] as $msgitem){
|
||||
?>
|
||||
<div class="box msg">
|
||||
<legend>
|
||||
<span>
|
||||
<?php if($msgitem['fromcompany']){
|
||||
echo $application['AppUser']['nickname']." ".$application['DreamjobCompany']['corporateform'];
|
||||
}else{
|
||||
echo $application['WorkerUser']['first_name']." ".$application['WorkerUser']['last_name'];
|
||||
?>
|
||||
<c:out value="${application.worker.firstName} ${application.worker.lastName}"/>
|
||||
<?php } ?>
|
||||
</span>
|
||||
<span class="created" style="float:right;<?php if($msgitem['saw']){ ?>color:red;<?php } ?>">
|
||||
<?=$this->Time->format('d.m.Y H:i', $msgitem['created']);?>
|
||||
</span>
|
||||
</legend>
|
||||
<div class="text">
|
||||
<?=$msgitem['text']; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php }
|
||||
}elseif($page!=null){ ?>
|
||||
<?php
|
||||
if(isset($page['PageText']))
|
||||
$page = array("DreamjobPageText"=>$page['PageText'],"DreamjobPageInh"=>$pageInh['Page']);
|
||||
else
|
||||
$page = array("DreamjobPageImage"=>$page['PageImage'],"DreamjobPageInh"=>$pageInh['Page']);
|
||||
echo $this->element('user_page',array("page"=>$page));
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php }else{ ?>
|
||||
<?=$application['DreamjobJobApplication']['text'];?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if($msg and !$application['DreamjobJobApplication']['closed']){
|
||||
?>
|
||||
<div class="box">
|
||||
<?php echo $this->Form->create('DreamjobJobMsg',$default_Form); ?>
|
||||
<fieldset>
|
||||
<legend><?=__("dreamjob.message");?></legend>
|
||||
<?=$this->Form->textarea('DreamjobJobMsg.text',array("class"=>'form-control',"rows"=>10)); ?>
|
||||
<div style="text-align:right;margin-top:25px;">
|
||||
<?=$this->Form->button(__('dreamjob.save'),array('div' => false,'class'=>"btn btn-default",'type' => 'submit'));?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo $this->Form->end(); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- /tab -->
|
||||
</div>
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<div class="box">
|
||||
<div class="box-title">
|
||||
<h3><?=$opening['AppUser']['nickname']." ".$opening['DreamjobCompany']['corporateform'];?></h3>
|
||||
<h1><?=$opening['DreamjobJobOpening']['title'];?></h1>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab" class="box">
|
||||
<!-- tab -->
|
||||
<div class="tabs-below">
|
||||
<ul class="nav nav-tabs pull-right">
|
||||
<li<?php if($filter_current){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.application.archiv.activ'),array('controller'=>'job', 'action'=>'applicationByOpening', 'id'=> $opening['DreamjobJobOpening']['id']),array("rel" => "tab"));?></li>
|
||||
<li<?php if($filter_archiv){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.application.archiv'),array('controller'=>'job', 'action'=>'applicationByOpening', 'id'=> $opening['DreamjobJobOpening']['id'],"?"=>array("filter"=>"archiv")),array("rel" => "tab"));?></li>
|
||||
<li<?php if(!$filter_current and !$filter_archiv){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.application.archiv.all'),array('controller'=>'job', 'action'=>'applicationByOpening', 'id'=> $opening['DreamjobJobOpening']['id'],"?"=>array("filter"=>"all")),array("rel" => "tab"));?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3><?=__("dreamjob.applications");?></h3>
|
||||
<div class="openinggroup">
|
||||
<?php
|
||||
foreach($applications as $opening){
|
||||
echo $this->element('user_worker_item',array('opening' => $opening,'enableOpening'=>true));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<!-- /tab -->
|
||||
</div>
|
|
@ -8,7 +8,7 @@
|
|||
<div class="openinggroup">
|
||||
<?php
|
||||
foreach($applications as $opening){
|
||||
echo $this->element('job_opening_item',array('opening' => $opening));
|
||||
echo $this->element('job_opening_item',array('opening' => $opening,'enableMsg'=>true));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -3,11 +3,18 @@
|
|||
*
|
||||
*/
|
||||
$fav=false;
|
||||
if(isset($WORKER['Favority']))
|
||||
$opening_in_app=false;
|
||||
if(isset($WORKER['Favority'])){
|
||||
foreach($WORKER['Favority'] as $val){
|
||||
if($val['id'] == $opening['DreamjobJobOpening']['id'])
|
||||
$fav=true;
|
||||
}
|
||||
foreach($WORKER['DreamjobJobApplication'] as $val){
|
||||
if($val['opening_id'] == $opening['DreamjobJobOpening']['id'])
|
||||
$opening_in_app=true;
|
||||
$opening_inApp=$val;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div>
|
||||
<span><?=$this->Html->link(__('dreamjob.company.to'),array('controller'=>'user','action'=>'profil','id'=>$opening['AppUser']['id']));?></span>
|
||||
|
@ -17,8 +24,8 @@
|
|||
<span style="float: right;">
|
||||
<?php
|
||||
//TODO bereits beworben
|
||||
if(false)
|
||||
echo $this->Html->link(__('dreamjob.my.application'),array('controller'=>'job','action'=>'openingGet','id'=>$opening['DreamjobJobOpening']['id'],'favorite'=>'favorite'));
|
||||
if($opening_in_app)
|
||||
echo $this->Html->link(__('dreamjob.my.application'),array('controller'=>'job','action'=>'applicationGet','id'=>$opening_inApp['id']));
|
||||
else{
|
||||
//TODO isFavority
|
||||
$link='dreamjob.favority.adding';
|
||||
|
|
|
@ -322,7 +322,14 @@ body.loading #container{
|
|||
padding: 40px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.msg legend{
|
||||
margin:0px 0px 5px 0px;
|
||||
font-size:14px;
|
||||
}
|
||||
.msg .text{
|
||||
font-weight:bold;
|
||||
font-size:16px;
|
||||
}
|
||||
.infofield{
|
||||
color:black;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue