264 lines
11 KiB
PHP
264 lines
11 KiB
PHP
<?php
|
|
/* Smarty version 3.1.30, created on 2022-11-23 08:20:59
|
|
from "/home/www/polonia/Admin/template/partial/Shared/StructureModern.tpl" */
|
|
|
|
/* @var Smarty_Internal_Template $_smarty_tpl */
|
|
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
|
'version' => '3.1.30',
|
|
'unifunc' => 'content_637dc9dbebb418_88285000',
|
|
'has_nocache_code' => false,
|
|
'file_dependency' =>
|
|
array (
|
|
'9be830a35d1f4d1799b28c55d4b44808f5661f3a' =>
|
|
array (
|
|
0 => '/home/www/polonia/Admin/template/partial/Shared/StructureModern.tpl',
|
|
1 => 1661849425,
|
|
2 => 'file',
|
|
),
|
|
),
|
|
'includes' =>
|
|
array (
|
|
),
|
|
),false)) {
|
|
function content_637dc9dbebb418_88285000 (Smarty_Internal_Template $_smarty_tpl) {
|
|
if (!is_callable('smarty_function_url')) require_once '/home/www/polonia/core/plugins/Smarty/function.url.php';
|
|
?>
|
|
|
|
|
|
<div class="floatLeft mainFrameTree structureTree">
|
|
|
|
|
|
<ul id="dhtmlgoodies_tree2" class="dhtmlgoodies_tree">
|
|
|
|
|
|
<div class="sideTitleGroup">Menu top</div>
|
|
|
|
<?php
|
|
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['arrayObjStructure']->value, 'objElement', false, 'idElement');
|
|
if ($_from !== null) {
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['idElement']->value => $_smarty_tpl->tpl_vars['objElement']->value) {
|
|
?>
|
|
<li id="node<?php echo $_smarty_tpl->tpl_vars['objElement']->value->GetId();?>
|
|
" ><a href="<?php echo smarty_function_url(array('label'=>'editStructure','id'=>$_smarty_tpl->tpl_vars['objElement']->value->GetId()),$_smarty_tpl);?>
|
|
" class="<?php if (!$_smarty_tpl->tpl_vars['objElement']->value->GetPublication()) {?>nonactive <?php }
|
|
if ($_smarty_tpl->tpl_vars['idStucture']->value == $_smarty_tpl->tpl_vars['objElement']->value->GetId()) {?>active<?php }?>" title="Edytuj" ><?php echo $_smarty_tpl->tpl_vars['objElement']->value->GetElementName();?>
|
|
</a>
|
|
|
|
|
|
<?php if ($_smarty_tpl->tpl_vars['objElement']->value->GetHaveChildren()) {?>
|
|
<ul>
|
|
<?php
|
|
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['objElement']->value->arrayChildren, 'objElementSub', false, 'idElementSub');
|
|
if ($_from !== null) {
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['idElementSub']->value => $_smarty_tpl->tpl_vars['objElementSub']->value) {
|
|
?>
|
|
<?php $_smarty_tpl->_assignInScope('idParentSub', $_smarty_tpl->tpl_vars['objElementSub']->value->GetId());
|
|
?>
|
|
<li id="node<?php echo $_smarty_tpl->tpl_vars['objElementSub']->value->GetId();?>
|
|
" ><a href="<?php echo smarty_function_url(array('label'=>'editStructure','id'=>$_smarty_tpl->tpl_vars['objElementSub']->value->GetId()),$_smarty_tpl);?>
|
|
" class="<?php if (!$_smarty_tpl->tpl_vars['objElementSub']->value->GetPublication()) {?>nonactive <?php }
|
|
if ($_smarty_tpl->tpl_vars['idStucture']->value == $_smarty_tpl->tpl_vars['objElementSub']->value->GetId()) {?>active<?php }?>" title="Edytuj"><?php echo $_smarty_tpl->tpl_vars['objElementSub']->value->GetElementName();?>
|
|
</a>
|
|
|
|
|
|
<?php if ($_smarty_tpl->tpl_vars['objElementSub']->value->GetHaveChildren()) {?>
|
|
<ul>
|
|
<?php
|
|
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['objElementSub']->value->arrayChildren, 'objElementSubSub', false, 'idElementSubSub');
|
|
if ($_from !== null) {
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['idElementSubSub']->value => $_smarty_tpl->tpl_vars['objElementSubSub']->value) {
|
|
?>
|
|
<li id="node<?php echo $_smarty_tpl->tpl_vars['objElementSubSub']->value->GetId();?>
|
|
" ><a href="<?php echo smarty_function_url(array('label'=>'editStructure','id'=>$_smarty_tpl->tpl_vars['objElementSubSub']->value->GetId()),$_smarty_tpl);?>
|
|
" class="<?php if (!$_smarty_tpl->tpl_vars['objElementSubSub']->value->GetPublication()) {?>nonactive <?php }
|
|
if ($_smarty_tpl->tpl_vars['idStucture']->value == $_smarty_tpl->tpl_vars['objElementSubSub']->value->GetId()) {?>active<?php }?>" title="Edytuj"><?php echo $_smarty_tpl->tpl_vars['objElementSubSub']->value->GetElementName();?>
|
|
</a>
|
|
|
|
<?php if ($_smarty_tpl->tpl_vars['objElementSubSub']->value->GetHaveChildren()) {?>
|
|
<?php $_smarty_tpl->_assignInScope('arraySubSubSub', $_smarty_tpl->tpl_vars['objElementSubSub']->value->arrayChildren);
|
|
?>
|
|
<ul>
|
|
<?php
|
|
$__section_customer_0_saved = isset($_smarty_tpl->tpl_vars['__smarty_section_customer']) ? $_smarty_tpl->tpl_vars['__smarty_section_customer'] : false;
|
|
$__section_customer_0_loop = (is_array(@$_loop=$_smarty_tpl->tpl_vars['arraySubSubSub']->value) ? count($_loop) : max(0, (int) $_loop));
|
|
$__section_customer_0_total = $__section_customer_0_loop;
|
|
$_smarty_tpl->tpl_vars['__smarty_section_customer'] = new Smarty_Variable(array());
|
|
if ($__section_customer_0_total != 0) {
|
|
for ($__section_customer_0_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_customer']->value['index'] = 0; $__section_customer_0_iteration <= $__section_customer_0_total; $__section_customer_0_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_customer']->value['index']++){
|
|
?>
|
|
<li id="node<?php echo $_smarty_tpl->tpl_vars['arraySubSubSub']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_customer']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_customer']->value['index'] : null)]->GetId();?>
|
|
" ><a href="<?php echo smarty_function_url(array('label'=>'editStructure','id'=>$_smarty_tpl->tpl_vars['arraySubSubSub']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_customer']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_customer']->value['index'] : null)]->GetId()),$_smarty_tpl);?>
|
|
" class="<?php if (!$_smarty_tpl->tpl_vars['arraySubSubSub']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_customer']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_customer']->value['index'] : null)]->GetPublication()) {?>nonactive <?php }
|
|
if ($_smarty_tpl->tpl_vars['idStucture']->value == $_smarty_tpl->tpl_vars['arraySubSubSub']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_customer']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_customer']->value['index'] : null)]->GetId()) {?>active<?php }?>" title="Edytuj"><?php echo $_smarty_tpl->tpl_vars['arraySubSubSub']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_customer']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_customer']->value['index'] : null)]->GetElementName();?>
|
|
</a>
|
|
|
|
|
|
</li>
|
|
<?php
|
|
}
|
|
}
|
|
if ($__section_customer_0_saved) {
|
|
$_smarty_tpl->tpl_vars['__smarty_section_customer'] = $__section_customer_0_saved;
|
|
}
|
|
?>
|
|
|
|
</ul>
|
|
<?php }?>
|
|
|
|
</li>
|
|
<?php
|
|
}
|
|
}
|
|
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
|
|
?>
|
|
|
|
</ul>
|
|
<?php }?>
|
|
</li>
|
|
<?php
|
|
}
|
|
}
|
|
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
|
|
?>
|
|
|
|
</ul>
|
|
<?php }?>
|
|
</li>
|
|
<?php
|
|
}
|
|
}
|
|
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
|
|
?>
|
|
|
|
|
|
<div class="sideTitleGroup">Pozostałe</div>
|
|
|
|
<?php
|
|
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['arrayObjStructureBottom']->value, 'objElement', false, 'idElement');
|
|
if ($_from !== null) {
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['idElement']->value => $_smarty_tpl->tpl_vars['objElement']->value) {
|
|
?>
|
|
<li id="node<?php echo $_smarty_tpl->tpl_vars['objElement']->value->GetId();?>
|
|
" ><a href="<?php echo smarty_function_url(array('label'=>'editStructure','id'=>$_smarty_tpl->tpl_vars['objElement']->value->GetId()),$_smarty_tpl);?>
|
|
" class="<?php if (!$_smarty_tpl->tpl_vars['objElement']->value->GetPublication()) {?>nonactive <?php }
|
|
if ($_smarty_tpl->tpl_vars['idStucture']->value == $_smarty_tpl->tpl_vars['objElement']->value->GetId()) {?>active<?php }?>"><?php echo $_smarty_tpl->tpl_vars['objElement']->value->GetElementName();?>
|
|
</a>
|
|
|
|
|
|
<?php if ($_smarty_tpl->tpl_vars['objElement']->value->GetHaveChildren()) {?>
|
|
<ul>
|
|
<?php
|
|
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['objElement']->value->arrayChildren, 'objElementSub', false, 'idElementSub');
|
|
if ($_from !== null) {
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['idElementSub']->value => $_smarty_tpl->tpl_vars['objElementSub']->value) {
|
|
?>
|
|
<?php $_smarty_tpl->_assignInScope('idParentSub', $_smarty_tpl->tpl_vars['objElementSub']->value->GetId());
|
|
?>
|
|
<li id="node<?php echo $_smarty_tpl->tpl_vars['objElementSub']->value->GetId();?>
|
|
" ><a href="<?php echo smarty_function_url(array('label'=>'editStructure','id'=>$_smarty_tpl->tpl_vars['objElementSub']->value->GetId()),$_smarty_tpl);?>
|
|
" class="<?php if (!$_smarty_tpl->tpl_vars['objElementSub']->value->GetPublication()) {?>nonactive <?php }
|
|
if ($_smarty_tpl->tpl_vars['idStucture']->value == $_smarty_tpl->tpl_vars['objElementSub']->value->GetId()) {?>active<?php }?>"><?php echo $_smarty_tpl->tpl_vars['objElementSub']->value->GetElementName();?>
|
|
</a>
|
|
|
|
|
|
<?php if ($_smarty_tpl->tpl_vars['objElementSub']->value->GetHaveChildren()) {?>
|
|
<ul>
|
|
<?php
|
|
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['objElementSub']->value->arrayChildren, 'objElementSubSub', false, 'idElementSubSub');
|
|
if ($_from !== null) {
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['idElementSubSub']->value => $_smarty_tpl->tpl_vars['objElementSubSub']->value) {
|
|
?>
|
|
<li id="node<?php echo $_smarty_tpl->tpl_vars['objElementSubSub']->value->GetId();?>
|
|
" ><a href="<?php echo smarty_function_url(array('label'=>'editStructure','id'=>$_smarty_tpl->tpl_vars['objElementSubSub']->value->GetId()),$_smarty_tpl);?>
|
|
" class="<?php if (!$_smarty_tpl->tpl_vars['objElementSubSub']->value->GetPublication()) {?>nonactive <?php }
|
|
if ($_smarty_tpl->tpl_vars['idStucture']->value == $_smarty_tpl->tpl_vars['objElementSubSub']->value->GetId()) {?>active<?php }?>"><?php echo $_smarty_tpl->tpl_vars['objElementSubSub']->value->GetElementName();?>
|
|
</a>
|
|
|
|
|
|
</li>
|
|
<?php
|
|
}
|
|
}
|
|
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
|
|
?>
|
|
|
|
</ul>
|
|
<?php }?>
|
|
</li>
|
|
<?php
|
|
}
|
|
}
|
|
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
|
|
?>
|
|
|
|
</ul>
|
|
<?php }?>
|
|
</li>
|
|
<?php
|
|
}
|
|
}
|
|
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
|
|
?>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clearBoth"></div>
|
|
|
|
|
|
<?php echo '<script'; ?>
|
|
type="text/javascript">
|
|
|
|
var ajaxObjects = new Array();
|
|
|
|
// Use something like this if you want to save data by Ajax.
|
|
function saveMyTree()
|
|
{
|
|
saveString = treeObj.getNodeOrders();
|
|
var ajaxIndex = ajaxObjects.length;
|
|
ajaxObjects[ajaxIndex] = new sack();
|
|
var url = 'saveNodes.php?saveString=' + saveString;
|
|
ajaxObjects[ajaxIndex].requestFile = url; // Specifying which file to get
|
|
ajaxObjects[ajaxIndex].onCompletion = function() { saveComplete(ajaxIndex); } ; // Specify function that will be executed after file has been found
|
|
ajaxObjects[ajaxIndex].runAJAX(); // Execute AJAX function
|
|
|
|
}
|
|
function saveComplete(index)
|
|
{
|
|
alert(ajaxObjects[index].response);
|
|
}
|
|
|
|
|
|
|
|
function initTree() {
|
|
treeObj = new JSDragDropTree();
|
|
|
|
treeObj.imageFolder = '<?php echo $_smarty_tpl->tpl_vars['urlStatic']->value;?>
|
|
/images/';
|
|
|
|
treeObj.setTreeId('dhtmlgoodies_tree2');
|
|
treeObj.setMaximumDepth(3);
|
|
treeObj.setMessageMaximumDepthReached('Próbujesz utowrzyc pozmiom menu poza zakresem'); // If you want to show a message when maximum depth is reached, i.e. on drop.
|
|
treeObj.initTree();
|
|
treeObj.expandAll();
|
|
|
|
|
|
|
|
}
|
|
|
|
window.onload = initTree;
|
|
|
|
|
|
var updateTreeUrl = '<?php echo smarty_function_url(array('Structure'=>'UpdateTree'),$_smarty_tpl);?>
|
|
';
|
|
<?php echo '</script'; ?>
|
|
>
|
|
<?php }
|
|
}
|