46 lines
2.3 KiB
Smarty
46 lines
2.3 KiB
Smarty
{function menu_item entry="" selected=false}
|
|
<label for="{$entry.uid}">{$entry.title}</label>
|
|
{if $entry.virtual == 'Y'}<a class="help-tip section-virtual badge" data-toggle="tooltip" title="{'virtual_help'|translate:'sections'}">V</a>{/if}
|
|
{if $entry.figure !== 'Y'}<a class="glyphicon help-tip glyphicon-eye-close section-hidden" data-toggle="tooltip" title="{'figureN'|translate:'sections'}"></a>{/if}
|
|
{if $checkbox_off}{else}<input type="checkbox" name="sec[{$entry.id}]" id="{$entry.uid}" {if $selected}checked{/if} {if isset($disabled[$entry.id])}disabled="disabled"{/if}/> {/if}
|
|
{/function}
|
|
|
|
{function menu item="menu_item"}
|
|
{if !isset($checkbox_off)}{$checkbox_off = false}{/if}
|
|
{if !isset($ignored)}{$ignored = false}{/if}
|
|
{if !isset($disabled)}{$disabled = false}{/if}
|
|
{if !isset($category0Display)}{$category0Display = true}{/if}
|
|
|
|
{if $category0 and $category0Display}
|
|
<span class="btn btn-link" style="margin-left: -10px;margin-bottom: -3px;">
|
|
<label for="category0" style="font-weight: bold">{$category0.title}</label><input {if $selected[$category0.id]}checked{/if} type="checkbox" name="sec[{$category0.id}]" id="category0" />
|
|
</span>
|
|
{$category0Display = false}
|
|
{/if}
|
|
|
|
<ul>
|
|
{foreach $data as $entry}
|
|
{if $ignored != $entry.id}
|
|
{if !empty($entry.submenu)}
|
|
<li {if !$opened[$entry.id]}class="collapsed"{/if}>
|
|
<span class="btn btn-link ">
|
|
<i class="btn-primary glyphicon glyphicon-{if !$opened[$entry.id]}plus{else}minus{/if}"></i>
|
|
<span class="has-child">
|
|
{call name=$item entry=$entry selected=$selected[$entry.id] disabled=$disabled}
|
|
</span>
|
|
|
|
</span>
|
|
{menu data=$entry.submenu checkbox_off=$checkbox_off item=$item ignored=$ignored}
|
|
</li>
|
|
{else}
|
|
<li>
|
|
<span class="btn btn-link">
|
|
{call name=$item entry=$entry selected=$selected[$entry.id] disabled=$disabled}
|
|
</span>
|
|
</li>
|
|
{/if}
|
|
{/if}
|
|
{/foreach}
|
|
</ul>
|
|
{/function}
|