85 lines
3.0 KiB
Smarty
85 lines
3.0 KiB
Smarty
{extends "../list.tpl"}
|
|
|
|
{block css append}
|
|
<link href="./static/js/jquery.tree-drag-drop.css?t={$header.date}" rel="stylesheet" media="screen">
|
|
<style>
|
|
{$sizeSum = 0}
|
|
{foreach $columns.fields as $name => $column}
|
|
{if ($column.wpjAdmin and !isSuperuser()) or $column.visible == 'N'}
|
|
{continue}
|
|
{/if}
|
|
{$sizeSum = $sizeSum + $column.size}
|
|
{/foreach}
|
|
{if $sizeSum > 0}{$singlePartRelSize = 100/$sizeSum}{else}{$singlePartRelSize = 10}{/if}
|
|
{$partCounter = 0}
|
|
{foreach $columns.fields as $name => $column}
|
|
{if ($column.wpjAdmin and !isSuperuser()) or $column.visible == 'N'}
|
|
{continue}
|
|
{/if}
|
|
.tdd-row > .tdd-column-{$column@index + 1} {
|
|
left: {$singlePartRelSize*$partCounter}%;
|
|
width: {$singlePartRelSize*$column.size}%;
|
|
}
|
|
|
|
{$partCounter = $partCounter + $column.size}
|
|
{/foreach}
|
|
</style>
|
|
<link href="./static/js/jquery.tree-drag-drop.css?t={$header.date}" rel="stylesheet" media="screen">
|
|
{/block}
|
|
|
|
{block js append}
|
|
<script src="./static/js/jquery.tree-drag-drop.js?t={$header.date}"></script>
|
|
{/block}
|
|
|
|
{block "list-filter"}{/block}
|
|
|
|
{block bottomPagination}{/block}
|
|
|
|
{block name="list-panel-class"}menu-list{/block}
|
|
|
|
{block listTable}
|
|
<div class="tdd-row thh-row">
|
|
{foreach $columns.fields as $label => $column}
|
|
{if ($column.wpjAdmin and !isSuperuser()) or $column.visible == 'N'}
|
|
{continue}
|
|
{/if}
|
|
<div class="tdd-column tdd-column-{$column@index + 1} {$view->resolveCallable($column.class, $entry) nofilter}">
|
|
<small>{$object->printHeaderLabel($column.title, $column)} </small>
|
|
</div>
|
|
{/foreach}
|
|
</div>
|
|
|
|
{function printTree}
|
|
{foreach $data as $entry}
|
|
{$width = 500 - ($entry.level * 26)}
|
|
<li class="node {$view->resolveCallable($tableDef.class, $entry)}" data-id="{$view->getListRowValue($entry, $tableDef.id)}">
|
|
<div class="nodeWrapper tdd-row">
|
|
{foreach $tableDef.fields as $name => $column}
|
|
<div class="list_item tdd-column tdd-column-{$column@index + 1} {$view->resolveCallable($column.class, $entry) nofilter}">
|
|
{$view->printListRowItem($column, $entry)}
|
|
</div>
|
|
{/foreach}
|
|
</div>
|
|
{if !empty($entry.submenu)}
|
|
<ul class="tdd-tree">
|
|
{printTree data=$entry.submenu tableDef=$tableDef}
|
|
</ul>
|
|
{/if}
|
|
</li>
|
|
{/foreach}
|
|
{/function}
|
|
<div class="treeDragDrop table" id="treeDragDrop_artsections">
|
|
<ul class="tdd-tree nestedSortable nestedSortableRoot">
|
|
{printTree data=$SQL tableDef=$columns}
|
|
</ul>
|
|
</div>
|
|
{/block}
|
|
|
|
{block unsortable}unsortable{/block}
|
|
|
|
<script type="text/javascript">
|
|
{block onready append}
|
|
initListTree('sections', "{$ctrl.currUrl.Rel nofilter}&acn=drag");
|
|
{/block}
|
|
</script>
|