<!DOCTYPE html>
<html class="js">
    <head>
        <title>{$meta_title}</title>

        <base href="{$config->root_url}/"/>

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta http-equiv="Pragma" content="no-cache">
        <meta http-equiv="Expires" content="-1">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

        {* Favicon *}
        <link rel="shortcut icon" href="admin/design/images/favicon.png">

        {* Stylesheet *}
        <link href="admin/design/css/bundle.css" rel="stylesheet">
        <link href="admin/design/css/color.css" rel="stylesheet">
        <link href="admin/design/css/tabler.css" rel="stylesheet">
        <link href="admin/design/css/system.css" rel="stylesheet">

    </head>
    <body class="nk-body npc-default has-sidebar ui-softy js-module-{$module|replace:'admin':''}">

        {* Preloader *}
        <div class="preloader position-absolute">
            <div class="d-flex justify-content-center position-fixed preloader-block">
                <div class="spinner-border text-primary" role="status">
                    <span class="sr-only">Loading...</span>
                </div>
            </div>
        </div>

        {* App *}
        <div class="nk-app-root">
            {* Sidebar menu *}
            <div class="nk-sidebar nk-sidebar-fixed is-dark" data-content="sidebarMenu">

                <div class="nk-sidebar-element nk-sidebar-head d-none d-xl-block">
                    <div class="nk-header-app-name align-self-stretch">
                        <div class="nk-header-app-logo">
                            <a href="{$config->root_url}" target="_blank">
                                <em class="icon bg-purple-dim">
                                    {literal}
                                    <svg xmlns="http://www.w3.org/2000/svg" id="logo" width="19" viewBox="0 0 30 30">
                                        <path xmlns="http://www.w3.org/2000/svg" class="st1" d="M19.78,0H11.33V6.56h0v9h0c0,.06,0,.13,0,.19a3.84,3.84,0,1,0,1.51-3V6.05a10,10,0,1,1-7.65,9.71c0-.17,0-.33,0-.49h0V0H1.49A1.49,1.49,0,0,0,0,1.49V20.22A10.34,10.34,0,0,0,9.72,30H19.78A10.25,10.25,0,0,0,30,19.78V10.22A10.25,10.25,0,0,0,19.78,0Z"/>
                                    </svg>
                                    {/literal}
                                </em>
                            </a>
                        </div>
                        <div class="nk-header-app-info">
                            <a href="{$config->root_url}" target="_blank">
                                <span class="lead-text text-white">
                                    Buyers CMS corporate
                                </span>
                                <span class="sub-text fw-medium">
                                    {$manager->login}
                                </span>
                            </a>
                        </div>
                    </div>
                </div>

                {* Menu *}
                <div class="nk-sidebar-element">
                    <div class="nk-sidebar-content">
                        <div class="nk-sidebar-inner" data-simplebar>
                            <ul class="nk-menu nk-menu-md">
                                {* Content *}
                                {if
                                    "pages"|in_array:$manager->permissions ||
                                    "banners"|in_array:$manager->permissions ||
                                    "blog"|in_array:$manager->permissions
                                }
                                <li class="nk-menu-heading">
                                    <h6 class="overline-title text-primary-alt">Контент</h6>
                                </li>

                                {if "pages"|in_array:$manager->permissions}
                                <li class="nk-menu-item {if $smarty.get.module=="PagesAdmin" || $smarty.get.module=="PageAdmin"}active{/if}">
                                    <a href="{url module=PagesAdmin}" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-notes"></em></span>
                                        <span class="nk-menu-text">Разделы</span>
                                    </a>
                                </li>
                                {/if}

                                {if "blog"|in_array:$manager->permissions}
                                <li class="nk-menu-item {if $smarty.get.module=="BlogAdmin" || $smarty.get.module=="PostAdmin"}active{/if}">
                                    <a href="{url module=BlogAdmin}" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-edit"></em></span>
                                        <span class="nk-menu-text">Блог</span>
                                    </a>
                                </li>
                                {/if}

                                {if "banners"|in_array:$manager->permissions}
                                <li class="nk-menu-item {if $smarty.get.module=="BannersAdmin" || $smarty.get.module=="BannerAdmin"}active{/if}">
                                    <a href="{url module=BannersAdmin}" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-slideshow"></em></span>
                                        <span class="nk-menu-text">Баннеры</span>
                                    </a>
                                </li>
                                {/if}
                                {/if}

                                {* Feedback *}
                                {if
                                    "comments"|in_array:$manager->permissions ||
                                    "feedbacks"|in_array:$manager->permissions
                                }
                                <li class="nk-menu-heading">
                                    <h6 class="overline-title text-primary-alt">Обратная связь</h6>
                                </li>

                                {if "comments"|in_array:$manager->permissions}
                                <li class="nk-menu-item {if $smarty.get.module=="CommentsAdmin" || $smarty.get.module=="CommentAdmin"}active{/if}">
                                    <a href="{url module=CommentsAdmin}" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-messages"></em></span>
                                        <span class="nk-menu-text">Комментарии</span>
                                    </a>
                                </li>
                                {/if}

                                {if "feedbacks"|in_array:$manager->permissions}
                                <li class="nk-menu-item {if $smarty.get.module=="FeedbacksAdmin"}active{/if}">
                                    <a href="{url module=FeedbacksAdmin}" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-message-2"></em></span>
                                        <span class="nk-menu-text">Запросы</span>
                                    </a>
                                </li>
                                {/if}
                                {/if}

                                {* Design *}
                                {if "design"|in_array:$manager->permissions}
                                <li class="nk-menu-heading">
                                    <h6 class="overline-title text-primary-alt">Дизайн</h6>
                                </li>

                                <li class="nk-menu-item {if $smarty.get.module=="ThemeAdmin"}active{/if}">
                                    <a href="{url module=ThemeAdmin}" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-palette"></em></span>
                                        <span class="nk-menu-text">Тема</span>
                                    </a>
                                </li>

                                <li class="nk-menu-item {if $smarty.get.module==DesignAdmin && $smarty.get.type == html}active{/if}">
                                    <a href="{url module=DesignAdmin type=html}" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-brand-html5"></em></span>
                                        <span class="nk-menu-text">Шаблоны</span>
                                    </a>
                                </li>

                                <li class="nk-menu-item {if $smarty.get.module==DesignAdmin && $smarty.get.type == js}active{/if}">
                                    <a href="{url module=DesignAdmin type=js}" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-code"></em></span>
                                        <span class="nk-menu-text">Javascript</span>
                                    </a>
                                </li>

                                <li class="nk-menu-item {if $smarty.get.module==DesignAdmin && $smarty.get.type == css}active{/if}">
                                    <a href="{url module=DesignAdmin type=css}" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-brand-css3"></em></span>
                                        <span class="nk-menu-text">Стили</span>
                                    </a>
                                </li>

                                <li class="nk-menu-item {if $smarty.get.module=="ImagesAdmin"}active{/if}">
                                    <a href="{url module=ImagesAdmin}" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-photo"></em></span>
                                        <span class="nk-menu-text">Изображения</span>
                                    </a>
                                </li>

                                <li class="nk-menu-item">
                                    <a href="javascript:;" class="nk-menu-link filepicker-btn">
                                        <span class="nk-menu-icon"><em class="icon ti ti-files"></em></span>
                                        <span class="nk-menu-text">Файловый менеджер</span>
                                    </a>
                                </li>
                                {/if}

                                {* Automation *}
                                {if "backup"|in_array:$manager->permissions}
                                <li class="nk-menu-heading">
                                    <h6 class="overline-title text-primary-alt">Автоматизация</h6>
                                </li>
                                <li class="nk-menu-item {if $smarty.get.module=="BackupAdmin"}active{/if}">
                                    <a href="{url module=BackupAdmin}" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-database"></em></span>
                                        <span class="nk-menu-text">Бекап</span>
                                    </a>
                                </li>
                                <li class="nk-menu-item {if $smarty.get.module=="ClearAdmin"}active{/if}">
                                    <a href="{url module=ClearAdmin}" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-trash"></em></span>
                                        <span class="nk-menu-text">Очистка</span>
                                    </a>
                                </li>
                                {/if}

                                {* Settings *}
                                {if
                                    "settings"|in_array:$manager->permissions ||
                                    "managers"|in_array:$manager->permissions
                                }
                                <li class="nk-menu-heading">
                                    <h6 class="overline-title text-primary-alt">Настройки</h6>
                                </li>

                                {if "settings"|in_array:$manager->permissions}
                                <li class="nk-menu-item {if $smarty.get.module=="SettingsAdmin"}active{/if}">
                                    <a href="{url module=SettingsAdmin}" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-settings"></em></span>
                                        <span class="nk-menu-text">Основные настройки</span>
                                    </a>
                                </li>
                                {/if}

                                {if "managers"|in_array:$manager->permissions}
                                <li class="nk-menu-item {if $smarty.get.module=="ManagersAdmin" || $smarty.get.module=="ManagerAdmin"}active{/if}">
                                    <a href="{url module=ManagersAdmin}" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-user-exclamation"></em></span>
                                        <span class="nk-menu-text">Менеджеры</span>
                                    </a>
                                </li>
                                {/if}
                                {/if}

                                {if "license"|in_array:$manager->permissions}
                                <li class="nk-menu-item {if $smarty.get.module=="LicenseAdmin"}active{/if}">
                                    <a href="{url module=LicenseAdmin}" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-license"></em></span>
                                        <span class="nk-menu-text">Лицензия</span>
                                    </a>
                                </li>
                                {/if}

                                {* Logout *}
                                <li class="nk-menu-item">
                                    <a href="{$config->root_url}/admin/?logout=1" target="_blank" class="nk-menu-link">
                                        <span class="nk-menu-icon"><em class="icon ti ti-logout"></em></span>
                                        <span class="nk-menu-text">Выход</span>
                                    </a>
                                </li>

                            </ul>
                        </div>
                    </div>
                </div>

            </div>

            <div class="nk-main ">
                <div class="nk-wrap ">

                    {* Top menu *}
                    <div class="nk-header nk-header-fixed is-light d-xl-none">
                        <div class="container-fluid">
                            <div class="nk-header-wrap">

                                {* Mobile btn *}
                                <div class="nk-menu-trigger d-xl-none ml-n1">
                                    <a href="#" class="nk-nav-toggle nk-quick-nav-icon" data-target="sidebarMenu">
                                        <em class="icon ti ti-menu-2"></em>
                                    </a>
                                </div>

                                {* Logo *}
                                <div class="nk-header-app-name align-self-stretch">
                                    <div class="nk-header-app-logo">
                                        <a href="{$config->root_url}" target="_blank">
                                            <em class="icon bg-purple-dim">
                                                {literal}
                                                <svg xmlns="http://www.w3.org/2000/svg" id="logo" width="19" viewBox="0 0 30 30">
                                                    <path xmlns="http://www.w3.org/2000/svg" class="st1" d="M19.78,0H11.33V6.56h0v9h0c0,.06,0,.13,0,.19a3.84,3.84,0,1,0,1.51-3V6.05a10,10,0,1,1-7.65,9.71c0-.17,0-.33,0-.49h0V0H1.49A1.49,1.49,0,0,0,0,1.49V20.22A10.34,10.34,0,0,0,9.72,30H19.78A10.25,10.25,0,0,0,30,19.78V10.22A10.25,10.25,0,0,0,19.78,0Z"/>
                                                </svg>
                                                {/literal}
                                            </em>
                                        </a>
                                    </div>
                                    <div class="nk-header-app-info">
                                        <a href="{$config->root_url}" target="_blank">
                                            <span class="lead-text">
                                                Buyers CMS corporate
                                            </span>
                                            <span class="sub-text fw-medium">
                                                {$manager->login}
                                            </span>
                                        </a>
                                    </div>
                                </div>

                                {* Tools *}
                                <div class="nk-header-tools">
                                    <ul class="nk-quick-nav">
                                        {* Logout *}
                                        <li>
                                            <a href="{$config->root_url}/admin/?logout=1" target="_blank" class="nk-quick-nav-icon" data-toggle="tooltip" data-placement="top" data-original-title="Выход">
                                                <div class="icon-status icon-status-na"><em class="icon ti ti-logout"></em></div>
                                            </a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>

                    {* Content *}
                    <div class="nk-content">
                        <div class="nk-content-inner">
                            <div class="nk-content-body">
                                <div class="nk-content-wrap">
                                    {$content}
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>

        {* Bundle *}
        <script src="admin/design/js/bundle.js"></script>
        <script src="admin/design/js/scripts.js"></script>

        {* JQuery *}
        <script src="admin/design/js/jquery/jquery-ui.min.js"></script>
        <script src="admin/design/js/jquery/jquery.cookie.js"></script>
        <script src="admin/design/js/jquery/jquery-form.js"></script>

        {* Sortable *}
        <script src="admin/design/js/sortable/sortable.js"></script>

        {* Autocomplete *}
        <script src="admin/design/js/autocomplete/jquery.autocomplete-min.js"></script>
        <link href="admin/design/js/autocomplete/styles.css" rel="stylesheet">

        {* Color picker *}
        <link href="admin/design/js/colorpicker/bootstrap-colorpicker.css" rel="stylesheet">
        <script src="admin/design/js/colorpicker/bootstrap-colorpicker.js"></script>

        {* Date picker *}
        <script src="admin/design/js/datepicker/datepicker-ru.js"></script>

        {* Fancybox *}
        <link rel="stylesheet" href="admin/design/js/fancybox/jquery.fancybox.min.css" />
        <script src="admin/design/js/fancybox/jquery.fancybox.min.js"></script>

        {* Codemirror *}
        <link rel="stylesheet" href="admin/design/js/codemirror/codemirror.main.css">
        <script src="admin/design/js/codemirror/codemirror.main.js"></script>

        {* Highlight JS *}
        <link rel="stylesheet" href="admin/design/js/highlight.js/styles.min.css"/>
        <script src="admin/design/js/highlight.js/highlight.min.js"></script>
        <script src="admin/design/js/highlight.js/xml.min.js"></script>

        {* TINYMCE *}
        <script src="/admin/design/js/tinymce/tinymce.min.js"></script>
        <script src="/admin/design/js/tinymce.js"></script>

        {* TinyDrive (FilePicker) *}
        <script>service_url = "{$config->root_url}";</script>
        <script src="/admin/design/js/tinydrive/tinydrive.min.js"></script>
        <script src="/admin/design/js/filepicker.js"></script>

        {* System *}
        <script src="/admin/design/js/system.js"></script>
    </body>
</html>
