dreamjob/app/View/User/company.ctp

138 lines
5.0 KiB
PHP

<?php
/*
*
*/
$avatar = false;
if($profil['AppUser']['take_systemwide']){
if($profil['User']['avatar'])
$avatar = true;
}else{
if($profil['AppUser']['avatar'])
$avatar = true;
}
?>
<div class="box-extra">
<?php if($avatar or $edit){ ?>
<div class="box-extra-left infofield">
<div class="box">
<?php
if($profil['AppUser']['take_systemwide'])
$url = $MEDIA.DS.$profil['User']['avatar'];
else
$url = $MEDIA.DS.$profil['AppUser']['avatar'];
if($edit and isset($url))
$url = 'img/icon_company.png';
?>
<img src="<?=$url;?>"/>
<?php if($edit): ?>
<div class="imgsubtitle edit">
<?php
$link = '<span class="glyphicon glyphicon-picture"></span>'.__('dreamjob.image.edit');
echo $this->Html->link($link,array('controller' => 'user', 'action' => 'avatar_upload'),array('data-target'=>'#popup','data-toggle'=>"modal",'title'=>__('dreamjob.image.edit'),"ref"=>"eventOff",'escape'=>false));
?>
</div>
<?php endif; ?>
</div>
<?php if(!empty($profil['DreamjobCompany']['website'])){?>
<p>
<?=__("dreamjob.website");?><br/>
<a href="<?=$profil['DreamjobCompany']['website'];?>" rel="external" target="_blank">
<?=$profil['DreamjobCompany']['website'];?>
</a>
</p>
<?php } ?>
<p>
<?=__("dreamjob.mail");?><br/>
<a href="mailto:<?=$profil['User']['mail'];?>">
<?=$profil['User']['mail'];?>
</a>
</p>
<br/>
</div>
<?php } ?>
<div class="box">
<h1><?=$profil['AppUser']['nickname']." ".$profil['DreamjobCompany']['corporateform'];?></h1>
<div class="columns">
<?php if(!$avatar){ ?>
<div class="bar">
<?php if(!empty($profil['DreamjobCompany']['website'])){?>
<p>
<?=__("dreamjob.website");?><br/>
<a href="<?=$profil['DreamjobCompany']['website'];?>" rel="external" target="_blank">
<?=$profil['DreamjobCompany']['website'];?>
</a>
</p>
<?php } ?>
<p>
<?=__("dreamjob.mail");?><br/>
<a href="mailto:<?=$profil['User']['mail'];?>">
<?=$profil['User']['mail'];?>
</a>
</p>
</div>
<?php } ?>
<div class="bar">
<p>
<?=__("dreamjob.owner");?>:<br/>
<?=$profil['DreamjobCompany']['owner'];?>
</p>
<p>
<?=__("dreamjob.branch");?>:<br/>
<?=$profil['DreamjobListBranch']['name'];?>
</p>
</div>
<div class="bar">
<h3><?=__("dreamjob.address");?></h3>
<?=$profil['DreamjobUser']['street'];?><br/>
<?=$profil['DreamjobUser']['postcode']." ".$profil['DreamjobListCity']['name'];?>
</div>
</div>
</div>
</div>
<div style="height:50px;">
<form class="navbar-form" method="post" action="${PROFIL_URL}jobs/search/">
<spring:message code="dreamjob.search" var="msg_dreamjob_search"/>
<input class="form-control col-lg-9" type="text" placeholder="${msg_dreamjob_search}" style="width:75%;"/>
<button type="submit" class="btn btn-default col-lg-2 col-lg-offset-1 liveButton"><?=__('dreamjob.search');?></button>
</form>
</div>
<div id="tab" class="box">
<!-- tab -->
<div class="tabs-below">
<ul class="nav nav-tabs pull-right">
<li<?php if (empty($page)){?> class="active"<?php } ?>>
<?php
if(isset($id))
echo $this->Html->link(__("dreamjob.opening"),array('controller'=>'user','action'=>'profil','id'=> $id ),array('rel'=>"tab"));
else
echo $this->Html->link(__("dreamjob.opening"),array('controller'=>'user','action'=>'profil' ),array('rel'=>"tab"));
?>
</li>
<?php foreach($profil['DreamjobPageInh'] as $pag){ ?>
<li<?php if(isset($page['DreamjobPageInh']['id'])) if ($page['DreamjobPageInh']['id'] == $pag['id']){?> class="active"<?php } ?>>
<?php
if(isset($id))
echo $this->Html->link($pag['title'],array('controller'=>'user','action'=>'profil','id'=> $id,'page'=> $pag['id'] ),array('rel'=>"tab"));
else
echo $this->Html->link($pag['title'],array('controller'=>'user','action'=>'profil','page'=> $pag['id'] ),array('rel'=>"tab"));
?>
<?php }?>
</ul>
</div>
<?php
if(!empty($page)){
echo $this->element('user_page');
}else{
?>
<h3><?=__("dreamjob.opening");?></h3>
<?php
foreach($openings as $opening){
echo $this->element('job_opening_item',array('opening' => $opening));
}
}
?>
<!-- /tab -->
</div>