dreamjob/app/View/User/settings_pages.ctp

102 lines
3.0 KiB
PHP

<?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>
<li class="active"><?=$this->Html->link(__("dreamjob.settings.pages"),array('controller'=>'user','action'=>'settings_pageInh'));?></li>
<?php
if(!empty($WORKER) and count($WORKER)>0){
?>
<li><?=$this->Html->link(__("dreamjob.settings.isearch"),array('controller'=>'user','action'=>'settings_isearch'));?></li>
<?php
}
?>
</ul>
</div>
<h1><?=__("dreamjob.settings.pages");?></h1>
<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
echo $this->Html->link('<span class="glyphicon glyphicon-move"></span> '.$pag['title'],array('controller'=>'user','action'=>'settings_pageInh','page'=> $pag['id'] ),array('escape'=>false));
?>
</li>
<?php } ?>
<li<?php if(empty($page)){?> class="active"<?php } ?>>
<?php echo $this->Html->link('<span class="glyphicon glyphicon-plus"></span> '.__('dreamjob.page.new'),array('controller'=>'user','action'=>'settings_pageInh'),array('escape'=>false));
?></li>
</ul>
<legend></legend>
<?php
if(empty($page) or !isset($page['DreamjobPageText']))
$default_Form['type']='file';
echo $this->Form->create(false,$default_Form);
?>
<fieldset>
<?php
echo $this->Form->input('DreamjobPageInh.title');
?>
</fieldset>
<legend><?=__('dreamjob.pages.types');?></legend>
<fieldset>
<?php
if(empty($page) or isset($page['DreamjobPageImage']))
echo $this->Form->input('DreamjobPageImage.image',array('type'=>'file'));
if(empty($page)){
?>
<div>Oder:</div>
<?php
}
if(empty($page) or isset($page['DreamjobPageText']))
echo $this->Form->input('DreamjobPageText.text');
?>
</fieldset>
<div class="buttonrow">
<?php
if(!empty($page)){
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'));
}
?>
<?=$this->Form->button('<span class="glyphicon glyphicon-floppy-disk"></span> '.__('dreamjob.settings.save'),array('div' => false,'class'=>"btn btn-primary ",'type' => 'submit'));?>
</div>
<?php
echo $this->Form->end();
?>
</div>