dreamjob/app/View/User/settings_pages.ctp

121 lines
3.9 KiB
Plaintext
Raw Normal View History

2014-03-23 10:16:15 +01:00
<?php
/*
*
*/
$avatar = false;
if($profil['AppUser']['take_systemwide']){
if($profil['User']['avatar'])
$avatar = true;
}else{
if($profil['AppUser']['avatar'])
$avatar = true;
}
$this->startIfEmpty('scriptEnd');
?>
<script>
!function($) {
$(function() {
$('.nav-pills').sortable({
handle: '.glyphicon-move',
update: function () {
order = $('.nav-pills').sortable("toArray",{attribute:'page'}).filter(Number);
global_load("/settings/pages/order?list[]="+order.join('&list[]='),{},false);
}
});
});
}(window.jQuery);
</script>
<?php $this->end(); ?>
<div class="box">
<div class="tabs-below">
<ul class="nav nav-tabs pull-right">
<li><?=$this->Html->link(__("dreamjob.settings"),array('controller'=>'user','action'=>'settings_account'));?></li>
<?php
if(!empty($WORKER) and count($WORKER)>0){
?>
2014-04-29 22:06:45 +02:00
<li class="active"><?=$this->Html->link(__("dreamjob.settings.pages"),array('controller'=>'user','action'=>'settings_pageInh'));?></li>
2014-03-23 10:16:15 +01:00
<li><?=$this->Html->link(__("dreamjob.settings.isearch"),array('controller'=>'user','action'=>'settings_isearch'));?></li>
2014-04-29 22:06:45 +02:00
<?php
}else{
?>
<li class="active"><?=$this->Html->link(__("dreamjob.settings.pages.company"),array('controller'=>'user','action'=>'settings_pageInh'));?></li>
2014-03-23 10:16:15 +01:00
<?php
}
?>
</ul>
</div>
2014-04-29 21:52:18 +02:00
<?php if(!empty($WORKER) and count($WORKER)>0){ ?>
<h1><?=__("dreamjob.settings.pages");?></h1>
2014-04-29 22:06:45 +02:00
<?php }else{ ?>
<h1><?=__("dreamjob.settings.pages.company");?></h1>
2014-04-29 21:52:18 +02:00
<?php } ?>
2014-03-23 10:16:15 +01:00
<ul class="nav nav-pills">
<?php foreach($profil['DreamjobPageInh'] as $pag){ ?>
<li<?php if(isset($page['DreamjobPageInh']['id'])) if ($page['DreamjobPageInh']['id'] == $pag['id']){?> class="active"<?php } ?> page="<?=$pag['id'];?>">
<?php
2014-03-26 09:15:43 +01:00
echo $this->Html->link('<span class="glyphicon glyphicon-move"></span> '.$pag['title'],array('controller'=>'user','action'=>'settings_pageInh','page'=> $pag['id'] ),array('escape'=>false));
2014-03-23 10:16:15 +01:00
?>
</li>
<?php } ?>
<li<?php if(empty($page)){?> class="active"<?php } ?>>
2014-04-29 22:06:45 +02:00
<?php
2014-04-29 22:21:50 +02:00
if(!empty($WORKER) and count($WORKER)>0)
2014-04-29 22:06:45 +02:00
$lng = __('dreamjob.pages.new');
else
$lng = __('dreamjob.pages.company.new');
echo $this->Html->link('<span class="glyphicon glyphicon-plus"></span> '.$lng,array('controller'=>'user','action'=>'settings_pageInh'),array('escape'=>false));
2014-03-23 10:16:15 +01:00
?></li>
</ul>
<legend></legend>
<?php
2014-03-26 09:15:43 +01:00
if(empty($page) or !isset($page['DreamjobPageText']))
$default_Form['type']='file';
2014-03-23 10:16:15 +01:00
echo $this->Form->create(false,$default_Form);
?>
<fieldset>
<?php
2014-04-29 22:21:50 +02:00
if(!empty($WORKER) and count($WORKER)>0)
2014-04-29 22:06:45 +02:00
$lng = __('dreamjob.pages.title.placeholder');
else
$lng = __('dreamjob.pages.company.title.placeholder');
echo $this->Form->input('DreamjobPageInh.title',array('placeholder'=>$lng,'label'=>array('text'=>__("dreamjob.page.title"),"class"=>$default_Form['inputDefaults']['label']['class'])));
2014-03-23 10:16:15 +01:00
?>
</fieldset>
<legend><?=__('dreamjob.pages.types');?></legend>
<fieldset>
<?php
2014-03-26 09:15:43 +01:00
if(empty($page) or isset($page['DreamjobPageImage']))
2014-04-23 16:13:39 +02:00
echo $this->Form->input('DreamjobPageImage.image',array('label'=>array('text'=>__("dreamjob.page.image"),"class"=>$default_Form['inputDefaults']['label']['class']),'type'=>'file'));
2014-03-26 09:15:43 +01:00
if(empty($page)){
2014-03-23 10:16:15 +01:00
?>
<div>Oder:</div>
2014-03-26 09:15:43 +01:00
<?php
}
if(empty($page) or isset($page['DreamjobPageText']))
2014-04-23 16:13:39 +02:00
echo $this->Form->input('DreamjobPageText.text',array('label'=>array('text'=>__("dreamjob.page.text"),"class"=>$default_Form['inputDefaults']['label']['class'])));
2014-03-26 09:15:43 +01:00
?>
2014-03-23 10:16:15 +01:00
</fieldset>
<div class="buttonrow">
<?php
if(!empty($page)){
2014-03-26 09:15:43 +01:00
echo $this->Html->link('<span class="glyphicon glyphicon-trash"></span> '.__('dreamjob.page.del'),array('controller'=>'user','action'=>'settings_pageInh','?'=>array('del'=> $pag['id'])),array('escape'=>false,'class'=>'btn btn-default'));
2014-03-23 10:16:15 +01:00
}
?>
2014-03-26 09:15:43 +01:00
<?=$this->Form->button('<span class="glyphicon glyphicon-floppy-disk"></span> '.__('dreamjob.settings.save'),array('div' => false,'class'=>"btn btn-primary ",'type' => 'submit'));?>
2014-03-23 10:16:15 +01:00
</div>
<?php
echo $this->Form->end();
?>
</div>