startseite+worker_item
This commit is contained in:
parent
c167e24236
commit
5d8504944e
|
@ -10,7 +10,7 @@ class HomeController extends AppController {
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public $uses = array();
|
public $uses = array("DreamjobJobOpening");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a view
|
* Displays a view
|
||||||
|
@ -25,6 +25,8 @@ class HomeController extends AppController {
|
||||||
$this->MiconwareSession->init($this);
|
$this->MiconwareSession->init($this);
|
||||||
$this->MiconwareSession->initWeb($this);
|
$this->MiconwareSession->initWeb($this);
|
||||||
$this->MiconwareSession->setFlash('In Entwicklung','flash',array('alert'=>'info'));
|
$this->MiconwareSession->setFlash('In Entwicklung','flash',array('alert'=>'info'));
|
||||||
|
$openings = $this->DreamjobJobOpening->find('all',array('contitions'=>array('active'=>true),'order'=>'DreamjobJobOpening.id DESC','limit'=>3));
|
||||||
|
$this->set('openings',$openings);
|
||||||
$this->set('title', 'dreamjob.startpage');
|
$this->set('title', 'dreamjob.startpage');
|
||||||
$this->set('MENU_START', true);
|
$this->set('MENU_START', true);
|
||||||
$this->render('/Home/home');
|
$this->render('/Home/home');
|
||||||
|
|
|
@ -219,13 +219,19 @@ class JobController extends AppController {
|
||||||
$this->DreamjobJobMsg->data['DreamjobJobMsg']['saw'] = false;
|
$this->DreamjobJobMsg->data['DreamjobJobMsg']['saw'] = false;
|
||||||
$this->DreamjobJobMsg->data['DreamjobJobMsg']['application_id'] = $application['DreamjobJobApplication']['id'];
|
$this->DreamjobJobMsg->data['DreamjobJobMsg']['application_id'] = $application['DreamjobJobApplication']['id'];
|
||||||
$this->DreamjobJobMsg->data['DreamjobJobMsg']['fromcompany'] = is_array($COMPANY) and count($COMPANY) > 0;
|
$this->DreamjobJobMsg->data['DreamjobJobMsg']['fromcompany'] = is_array($COMPANY) and count($COMPANY) > 0;
|
||||||
if ($this->DreamjobJobMsg->save()) {
|
if($this->DreamjobJobMsg->save()) {
|
||||||
$application = $this->DreamjobJobApplication->find('first',array('conditions' => array('DreamjobJobApplication.id'=> $this->request->params['id'] )));
|
$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'));
|
$this->MiconwareSession->setFlash('dreamjob.application.msg.add','flash',array('alert'=>'success'));
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.application.msg.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash('dreamjob.application.msg.error','flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TODO Mark as read
|
||||||
|
if(is_array($WORKER) and count($WORKER) > 0)
|
||||||
|
$this->DreamjobJobMsg->updateAll(array("saw"=>true),array("DreamjobJobMsg.fromcompany"=>true,"DreamjobJobMsg.application_id"=>$this->request->params['id']));
|
||||||
|
if(is_array($COMPANY) and count($COMPANY) > 0)
|
||||||
|
$this->DreamjobJobMsg->updateAll(array("saw"=>true),array("DreamjobJobMsg.fromcompany"=>false,"DreamjobJobMsg.application_id"=>$this->request->params['id']));
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
$this->set('msg',false);
|
$this->set('msg',false);
|
||||||
if(!empty($this->request->params['page'])){
|
if(!empty($this->request->params['page'])){
|
||||||
|
@ -256,6 +262,17 @@ class JobController extends AppController {
|
||||||
if(isset($this->request->params['id'])){
|
if(isset($this->request->params['id'])){
|
||||||
if(is_array($COMPANY) and count($COMPANY) > 0)
|
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'] )));
|
$opening = $this->DreamjobJobOpening->find('first',array('conditions' => array('DreamjobJobOpening.company_id' => $COMPANY['AppUser']['id'],'DreamjobJobOpening.id'=> $this->request->params['id'] )));
|
||||||
|
if(!empty($this->request->query['archiv']) and count($opening)>0){
|
||||||
|
$application = $this->DreamjobJobApplication->find('first',array('conditions' =>array('DreamjobJobApplication.id'=>$this->request->query['archiv'], 'DreamjobJobApplication.opening_id'=> $this->request->params['id'])));
|
||||||
|
$this->DreamjobJobApplication->id = $this->request->query['archiv'];
|
||||||
|
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'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$filter_current = false;
|
$filter_current = false;
|
||||||
$filter_archiv = false;
|
$filter_archiv = false;
|
||||||
$condition = array('DreamjobJobOpening.company_id' => $COMPANY['AppUser']['id'],'DreamjobJobApplication.opening_id'=> $this->request->params['id']);
|
$condition = array('DreamjobJobOpening.company_id' => $COMPANY['AppUser']['id'],'DreamjobJobApplication.opening_id'=> $this->request->params['id']);
|
||||||
|
|
|
@ -2,33 +2,76 @@
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
$User = 'User';
|
||||||
|
$DreamjobUser = 'DreamjobUser';
|
||||||
|
$AppUser = 'AppUser';
|
||||||
|
$DreamjobListGraducation = 'DreamjobListGraducation';
|
||||||
|
if($enableOpening){
|
||||||
|
$User = 'WorkerUser';
|
||||||
|
$DreamjobUser = 'DreamjobUserWorker';
|
||||||
|
$AppUser = 'AppUserWorker';
|
||||||
|
$DreamjobListGraducation = 'WorkerGraducation';
|
||||||
|
}
|
||||||
|
// echo var_dump($profil);
|
||||||
?>
|
?>
|
||||||
<div class="item">
|
<div class="openingitem">
|
||||||
<div class="icon"> <img src="{% if workershow.avatar %}{{workershow.avatar.url}}{% else %}{{ STATIC_URL }}img/icon_user.png{% endif %}"></div>
|
<h3>
|
||||||
|
<?php
|
||||||
|
if($profil[$AppUser]['take_systemwide'])
|
||||||
|
echo $profil[$User]['first_name'].' '.$profil[$User]['last_name'];
|
||||||
|
else
|
||||||
|
echo $profil[$AppUser]['first_name'].' '.$profil[$AppUser]['last_name'];
|
||||||
|
?>
|
||||||
|
</h3>
|
||||||
|
<div class="icon">
|
||||||
|
<img src="<?php
|
||||||
|
if($profil[$AppUser]['take_systemwide'])
|
||||||
|
if($profil[$User]['avatar'])
|
||||||
|
echo $MEDIA_URL.$profil[$User]['avatar'];
|
||||||
|
else
|
||||||
|
echo $STATIC_URL."img/icon_user.png";
|
||||||
|
else
|
||||||
|
if($profil[$AppUser]['avatar'])
|
||||||
|
echo $MEDIA_URL.$profil[$AppUser]['avatar'];
|
||||||
|
else
|
||||||
|
echo $STATIC_URL."img/icon_user.png";
|
||||||
|
?>"/>
|
||||||
|
</div>
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<span class="title">{{workershow}}</span>
|
<span><?=__('dreamjob.city').': '.$profil[$DreamjobUser]['city'];?></span>
|
||||||
<span>{% trans 'city' %}:{{workershow.city}}</span>
|
<span><?=__('dreamjob.graducation').': '.$profil[$DreamjobListGraducation]['name'];?></span>
|
||||||
<span>{% trans 'branch' %}:{{workershow.branch}}</span>
|
<?php if($profil['DreamjobWorker']['workexperience']){ ?>
|
||||||
<span>{% trans 'graducation' %}:{{workershow.graducation}}</span>
|
<span><?=__('dreamjob.workexperience').': '.$profil['DreamjobWorker']['workexperience'].' ',__('dreamjob.years');?></span>
|
||||||
{% if workershow.workexperience %}
|
<?php } ?>
|
||||||
<span>{% trans 'workexperience' %}:{{workershow.workexperience}} {% trans 'years' %}</span>
|
<?php if($enableOpening){ ?>
|
||||||
{% endif %}
|
<span><?=$this->Time->format('d.m.Y H:i', $profil['DreamjobJobApplication']['created']);?></span>
|
||||||
<span>{{application.created}}</span>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
{% if application.closed %}
|
<div class="btn-group-vertical">
|
||||||
<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>
|
<?php
|
||||||
<a href="{% url de.miconware.dreamjob.jobs.views.application_show application.pk %}"><span jtype="button">{% trans 'detail' %}</span></a>
|
if($enableOpening){
|
||||||
|
$status = 'dreamjob.application.close';
|
||||||
{% else %}
|
$statusApp = null;
|
||||||
<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>
|
$archiv = array("archiv"=> $profil['DreamjobJobApplication']['id']);
|
||||||
<a href="{% url de.miconware.dreamjob.jobs.views.application_show application.pk %}"><span jtype="button">
|
if($profil['DreamjobJobApplication']['closed']){
|
||||||
{% if application.messages_set.all|length > 0 %}
|
$status = 'dreamjob.application.close.activet';
|
||||||
{% blocktrans with new=application.newmsgcompany.all|length all=application.messages_set.all|length %}detail ({{new}}/{{all}}){% endblocktrans %}
|
$statusApp= count($profil['DreamjobJobMsg']);
|
||||||
{% else %}
|
$newcount=0;
|
||||||
{% trans 'detail' %}
|
foreach($profil['DreamjobJobMsg'] as $msg)
|
||||||
{% endif %}
|
if(!$msg['saw'])
|
||||||
</span></a>
|
$newcount++;
|
||||||
{% endif %}
|
if($newcount>0)
|
||||||
|
$statusApp = $newcount."/".$statusApp;
|
||||||
|
$statusApp =__('dreamjob.applicated').'<span class="badge">'.$statusApp.'</span>';
|
||||||
|
$archiv['filter'] = 'archiv';
|
||||||
|
}else{
|
||||||
|
$statusApp = __('dreamjob.application');
|
||||||
|
}
|
||||||
|
echo $this->Html->link(__($status),array('controller'=>'job', 'action'=>'applicationByOpening', 'id'=> $profil['DreamjobJobApplication']['opening_id'],'?'=>$archiv),array("class" => "btn btn-default"));
|
||||||
|
echo $this->Html->link($statusApp,array('controller'=>'job', 'action'=>'applicationGet', 'id'=> $profil['DreamjobJobApplication']['id']),array("class" => "btn btn-default"));
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,31 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
|
<div class="box" style="text-align:center;">
|
||||||
|
<img src="http://openhatch.org/blog/wp-content/uploads/2014/01/osctc-columbia.jpg" style="width:500;height:250px;float:left;margin-right:20px;"/>
|
||||||
|
<div style="display:inline-block;width:380px;height:250px;background-color:red; padding-top:40px;">
|
||||||
|
<h1 style="color:white;"><?=__('dreamjob.search');?></h1>
|
||||||
|
<div style="display:inline-block;width:80%;">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control">
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<button class="btn btn-default" type="button" style="background-color:orange;">Go!</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
|
<h1><?=__("dreamjob.startpage.openings");?></h1>
|
||||||
|
<div class="openinggroup">
|
||||||
|
<?php
|
||||||
|
foreach($openings as $opening){
|
||||||
|
echo $this->element('job_opening_item',array('opening' => $opening));
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box" style="margin-top:100px;">
|
||||||
Test Profile
|
Test Profile
|
||||||
<p><?php echo $this->Html->link("Miconware", '/user/24/'); ?>mail:imberg@miconware.de - PW:sebi</p>
|
<p><?php echo $this->Html->link("Miconware", '/user/24/'); ?>mail:imberg@miconware.de - PW:sebi</p>
|
||||||
<p><?php echo $this->Html->link("Sebi", '/user/4/'); ?>mail:- - PW:-</p>
|
<p><?php echo $this->Html->link("Sebi", '/user/4/'); ?>mail:- - PW:-</p>
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
if($application['DreamjobJobApplication']['closed'])
|
if($application['DreamjobJobApplication']['closed'])
|
||||||
$str = 'dreamjob.application.close.activet';
|
$str = 'dreamjob.application.close.activet';
|
||||||
?>
|
?>
|
||||||
<!-- TODO -->
|
|
||||||
<?=$this->Html->link(__($str),array('controller'=>'job','action'=>'applicationGet','id'=>$application['DreamjobJobApplication']['id'],'hiv'=>'hiv')); ?>
|
<?=$this->Html->link(__($str),array('controller'=>'job','action'=>'applicationGet','id'=>$application['DreamjobJobApplication']['id'],'hiv'=>'hiv')); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
@ -86,11 +85,9 @@
|
||||||
echo $application['AppUser']['nickname']." ".$application['DreamjobCompany']['corporateform'];
|
echo $application['AppUser']['nickname']." ".$application['DreamjobCompany']['corporateform'];
|
||||||
}else{
|
}else{
|
||||||
echo $application['WorkerUser']['first_name']." ".$application['WorkerUser']['last_name'];
|
echo $application['WorkerUser']['first_name']." ".$application['WorkerUser']['last_name'];
|
||||||
?>
|
} ?>
|
||||||
<c:out value="${application.worker.firstName} ${application.worker.lastName}"/>
|
|
||||||
<?php } ?>
|
|
||||||
</span>
|
</span>
|
||||||
<span class="created" style="float:right;<?php if($msgitem['saw']){ ?>color:red;<?php } ?>">
|
<span class="created" style="float:right;<?php if(!$msgitem['saw']){ ?>color:red;<?php } ?>">
|
||||||
<?=$this->Time->format('d.m.Y H:i', $msgitem['created']);?>
|
<?=$this->Time->format('d.m.Y H:i', $msgitem['created']);?>
|
||||||
</span>
|
</span>
|
||||||
</legend>
|
</legend>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<div class="openinggroup">
|
<div class="openinggroup">
|
||||||
<?php
|
<?php
|
||||||
foreach($applications as $opening){
|
foreach($applications as $opening){
|
||||||
echo $this->element('user_worker_item',array('opening' => $opening,'enableOpening'=>true));
|
echo $this->element('user_worker_item',array('profil' => $opening,'enableOpening'=>true));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 7.1 KiB |
Loading…
Reference in New Issue