<?php
/* Smarty version 4.5.3, created on 2025-04-23 09:42:23
  from '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/html/pages.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.3',
  'unifunc' => 'content_68088bcf1e2223_08814273',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'd5a232f40232dd20a62f02a33bdfac6438633fd0' => 
    array (
      0 => '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/html/pages.tpl',
      1 => 1745390541,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_68088bcf1e2223_08814273 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->smarty->ext->_tplFunction->registerTplFunctions($_smarty_tpl, array (
  'pages_tree' => 
  array (
    'compiled_filepath' => '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/compiled/d5a232f40232dd20a62f02a33bdfac6438633fd0_0.file.pages.tpl.php',
    'uid' => 'd5a232f40232dd20a62f02a33bdfac6438633fd0',
    'call_name' => 'smarty_template_function_pages_tree_116608241768088bcf1a08b5_83229579',
  ),
));
$_smarty_tpl->_assignInScope('meta_title', 'Управление разделами сайта' ,false ,8);?>

<div class="container-fluid">

        <div class="nk-block-head nk-block-head-sm">
        <div class="nk-block-between">
            <div class="nk-block-head-content">
                <h3 class="nk-block-title page-title">Разделы</h3>
                <div class="nk-block-des text-soft">
                    <p>Управление разделами сайта.</p>
                </div>
            </div>
            <div class="nk-block-head-content">
                <div class="toggle-wrap nk-block-tools-toggle">

                                        <a href="#" class="btn btn-icon btn-trigger toggle-expand mr-n1" data-target="pageMenu">
                        <em class="icon ti ti-menu"></em>
                    </a>

                                        <div class="toggle-expand-content" data-content="pageMenu">
                        <ul class="nk-block-tools g-3">
                            <li>
                                <a href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>'PageAdmin','return'=>$_SERVER['REQUEST_URI']),$_smarty_tpl ) );?>
" class="btn btn-secondary">
                                    <em class="icon ti ti-circle-plus"></em>
                                    <span>Создать раздел</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>

        <div class="nk-block">
        <div class="card card-bordered card-stretch">
            <div class="card-inner-group">

                <?php if ($_smarty_tpl->tpl_vars['pages']->value) {?>
                <form class="js-list-form" method="post">
                    <div class="p-0">

                                                <div class="nk-tb-list nk-tb-ulist">
                            <div class="nk-tb-item nk-tb-head">

                                                                <div class="nk-tb-col nk-tb-col-check">
                                    <div class="custom-control custom-control-sm custom-checkbox notext">
                                        <input type="checkbox" class="custom-control-input js-check-all" id="checkall">
                                        <label class="custom-control-label" for="checkall"></label>
                                    </div>
                                </div>
                                                                <div class="nk-tb-col w-40">
                                    <div class="user-card">
                                        <div>
                                            <span class="sub-text">Название</span>
                                        </div>
                                        <div class="ml-auto">
                                            <?php if ($_smarty_tpl->tpl_vars['pages']->value) {?>
                                            <button type="button" class="btn btn-icon btn-sm btn-light d-xl-inline-flex js-all-pages-toogle" data-toggle="tooltip" data-placement="top" data-original-title="Развернуть все">
                                                <em class="icon ti ti-chevron-down"></em>
                                            </button>
                                            <?php }?>
                                        </div>
                                    </div>
                                </div>
                                <div class="nk-tb-col tb-col-xxl">
                                    <span class="sub-text">Шаблон</span>
                                </div>
                                <div class="nk-tb-col nk-tb-col-tools text-right">Действие</div>
                            </div>
                        </div>

                                                
                        <?php $_smarty_tpl->smarty->ext->_tplFunction->callTemplateFunction($_smarty_tpl, 'pages_tree', array('pages'=>$_smarty_tpl->tpl_vars['pages']->value), true);?>

                    </div>

                                        <div class="card-inner">
                        <div class="nk-block-between-md g-3">

                                                        <div class="g">
                                <div class="center form-inline flex-nowrap gx-3">
                                    <div class="form-wrap w-200px">
                                        <select name="action" class="form-select form-select-sm" data-placeholder="Массовые действия">
                                            <option value="">Массовые действия</option>
                                            <option value="enable">Сделать активным</option>
                                            <option value="disable">Сделать неактивным</option>
                                            <option value="delete">Удалить</option>
                                        </select>

                                    </div>
                                    <div class="btn-wrap">
                                        <span class="d-none d-md-block">
                                            <button type="submit" class="btn btn-dim btn-outline-light">Применить</button>
                                        </span>
                                        <span class="d-md-none">
                                            <button type="submit" class="btn btn-dim btn-outline-light btn-icon">
                                                <em class="icon ti ti-arrow-right"></em>
                                            </button>
                                        </span>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                </form>
                <?php } else { ?>
                <div class="card-inner">
                    <div class="nk-tb-item">
                        <p>Разделы не найдены.</p>
                    </div>
                </div>
                <?php }?>
            </div>
        </div>
    </div>

</div>
<?php }
/* smarty_template_function_pages_tree_116608241768088bcf1a08b5_83229579 */
if (!function_exists('smarty_template_function_pages_tree_116608241768088bcf1a08b5_83229579')) {
function smarty_template_function_pages_tree_116608241768088bcf1a08b5_83229579(Smarty_Internal_Template $_smarty_tpl,$params) {
$params = array_merge(array('level'=>0), $params);
foreach ($params as $key => $value) {
$_smarty_tpl->tpl_vars[$key] = new Smarty_Variable($value, $_smarty_tpl->isRenderingCache);
}
?>

                        <?php if ($_smarty_tpl->tpl_vars['pages']->value) {?>
                        <div class="nk-tb-list nk-tb-ulist nk-tb-categories is-compact js-list js-list-sortable">

                                                        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['pages']->value, 'page');
$_smarty_tpl->tpl_vars['page']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['page']->value) {
$_smarty_tpl->tpl_vars['page']->do_else = false;
?>
                            <div class="nk-tb-item js-list-item <?php if (!$_smarty_tpl->tpl_vars['page']->value->visible) {?>invisible<?php }?> <?php if ($_smarty_tpl->tpl_vars['page']->value->is_menu) {?>is_menu<?php }?> <?php if ($_smarty_tpl->tpl_vars['page']->value->visible_submenu) {?>visible_submenu<?php }?>">
                                <div class="d-table w-100 table-fixed">

                                                                        <div class="nk-tb-col nk-tb-col-check">
                                        <div class="custom-control custom-control-sm custom-checkbox notext">
                                            <input type="checkbox" name="check[]" value="<?php echo $_smarty_tpl->tpl_vars['page']->value->id;?>
" class="custom-control-input" id="uid_<?php echo $_smarty_tpl->tpl_vars['page']->value->id;?>
">
                                            <label class="custom-control-label" for="uid_<?php echo $_smarty_tpl->tpl_vars['page']->value->id;?>
"></label>
                                        </div>
                                    </div>

                                                                        <div class="nk-tb-col nk-tb-col-name w-40">
                                        <div class="user-card" style="margin-left:<?php echo $_smarty_tpl->tpl_vars['level']->value*25;?>
px">
                                            <div class="user-avatar border bg-white rounded-pill rounded-0">
                                                <a href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>'PageAdmin','id'=>$_smarty_tpl->tpl_vars['page']->value->id,'return'=>$_SERVER['REQUEST_URI']),$_smarty_tpl ) );?>
">
                                                    <?php if (!empty($_smarty_tpl->tpl_vars['page']->value->image)) {?>
                                                    <img src="<?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'resize' ][ 0 ], array( $_smarty_tpl->tpl_vars['page']->value->image,70,70,'auto',true ));?>
" class="rounded-0 p-1">
                                                    <?php } else { ?>
                                                    <img src="<?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'resize' ][ 0 ], array( '/files/no-image.png',70,70 ));?>
" class="rounded-0 p-1">
                                                    <?php }?>
                                                </a>
                                            </div>
                                            <div class="user-info">
                                                <a href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>'PageAdmin','id'=>$_smarty_tpl->tpl_vars['page']->value->id,'return'=>$_SERVER['REQUEST_URI']),$_smarty_tpl ) );?>
">
                                                    <span class="tb-lead"><?php echo $_smarty_tpl->tpl_vars['page']->value->name;?>
</span>
                                                    <span class="sub-text">
                                                        /<?php echo $_smarty_tpl->tpl_vars['page']->value->url;?>

                                                    </span>
                                                </a>
                                            </div>
                                            <div class="ml-auto">
                                                <?php if ($_smarty_tpl->tpl_vars['page']->value->subpages) {?>
                                                <button type="button" class="btn btn-icon btn-sm btn-light d-xl-inline-flex js-pages-toogle" data-toggle="tooltip" data-placement="top" data-original-title="Развернуть">
                                                    <em class="icon ti ti-chevron-down"></em>
                                                </button>
                                                <?php }?>
                                            </div>
                                        </div>
                                    </div>

                                                                        <div class="nk-tb-col nk-tb-col-title tb-col-xxl">
                                        <span class="tb-lead"><?php echo $_smarty_tpl->tpl_vars['page']->value->template;?>
</span>
                                    </div>

                                                                        <div class="nk-tb-col nk-tb-col-tools">
                                        <ul class="nk-tb-actions gx-1">

                                                                                        <input type="hidden" name="positions[<?php echo $_smarty_tpl->tpl_vars['page']->value->id;?>
]" value="<?php echo $_smarty_tpl->tpl_vars['page']->value->position;?>
">

                                                                                        <li class="d-none d-lg-block">
                                                <a href="../<?php echo $_smarty_tpl->tpl_vars['page']->value->url;?>
" target="_blank" class="btn btn-trigger btn-icon" data-toggle="tooltip" data-placement="top" data-original-title="Просмотр">
                                                   <em class="icon ti ti-external-link"></em>
                                                </a>
                                            </li>

                                                                                        <li class="menu d-none d-lg-block">
                                                <button type="button" class="btn btn-trigger btn-icon js-list-mark js-list-mark-state-first" data-mark-object="page" data-mark-type="is_menu" data-mark-toogle-class="is_menu" data-toggle="tooltip" data-placement="top" data-original-title="Выводить в меню">
                                                    <i class="icon ti ti-circle"></i>
                                                </button>
                                            </li>

                                                                                        <li class="submenu d-none d-lg-block">
                                                <button type="button" class="btn btn-trigger btn-icon js-list-mark js-list-mark-state-first" data-mark-object="page" data-mark-type="visible_submenu" data-mark-toogle-class="visible_submenu" data-toggle="tooltip" data-placement="top" data-original-title="Выводить подменю">
                                                    <i class="icon ti ti-circle"></i>
                                                </button>
                                            </li>

                                                                                        <li class="d-none d-lg-block">
                                                <button type="button" class="btn btn-trigger btn-icon js-list-mark" data-mark-object="page" data-mark-type="visible" data-mark-toogle-class="invisible" data-toggle="tooltip" data-placement="top" data-original-title="Активность">
                                                    <em class="icon ti ti-eye"></em>
                                                </button>
                                            </li>

                                                                                        <li class="d-none d-lg-block">
                                                <button type="button" class="btn btn-trigger btn-icon js-list-move" data-toggle="tooltip" data-placement="top" title="" data-original-title="Переместить">
                                                    <em class="icon ti ti-arrows-vertical"></em>
                                                </button>
                                            </li>

                                                                                        <li>
                                                <button type="button" class="btn btn-trigger btn-icon text-danger js-list-delete" data-toggle="tooltip" data-placement="top" title="Удалить">
                                                    <em class="icon ti ti-trash"></em>
                                                </button>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                <?php $_smarty_tpl->smarty->ext->_tplFunction->callTemplateFunction($_smarty_tpl, 'pages_tree', array('pages'=>$_smarty_tpl->tpl_vars['page']->value->subpages,'level'=>$_smarty_tpl->tpl_vars['level']->value+1), true);?>

                            </div>
                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                        </div>
                        <?php }?>
                        <?php
}}
/*/ smarty_template_function_pages_tree_116608241768088bcf1a08b5_83229579 */
}
