<?php
use yii\widgets\Menu;
?>
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <!-- Sidebar user panel -->
        <!-- search form -->
        <form action="#" method="get" class="sidebar-form">
            <div class="input-group">
                <input type="text" name="q" class="form-control" placeholder="Search...">
              <span class="input-group-btn">
                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
              </span>
            </div>
        </form>
        <!-- /.search form  -->
        <?=
        Menu::widget([
            'options' => ['class' => 'sidebar-menu'],
            'submenuTemplate' => "\n<ul class='treeview-menu'>\n{items}\n</ul>\n",

            'items' => [
                ['label' => 'MAIN NAVIGATION', 'options'=>['class'=>'header']],
                ['label' => 'Заказы', 'url' => ['/orders/index'], 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-shopping-cart"></i> <span>{label}</span></a>'],
                [
                    'label' => 'eCommerce',
                    'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-barcode"></i> <span>{label}</span></a>',
                    'url' => ['/product/manage'],
                    'items' => [
                        ['label' => 'Товары', 'url' => ['/product/manage']],
                        ['label' => 'Категории', 'url' => ['/category']],
                        ['label' => 'Бренды', 'url' => ['/brand']],
                        ['label' => 'Характеристики', 'url' => ['/rubrication/tax-group']],
                        ['label' => 'Единицы измерения', 'url' => ['/product/product-unit']],
                        ['label' => 'Статистика импорта', 'url' => ['/product/manage/import-stat']],
                    ]
                ],
                [
                    'label' => 'Слайдер/Банеры',
                    'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-barcode"></i> <span>{label}</span></a>',
                    'items' => [
                        ['label' => 'Слайдер', 'url' => ['/slider/index']],
                        ['label' => 'Банер', 'url' => ['/banner/index']],
                    ]
                ],

                ['label' => 'Статические страницы', 'url' => ['/page/index'],
                    'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-file"></i> <span>{label}</span></a>',],
                ['label' => 'Акции',
                    'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-piggy-bank"></i> <span>{label}</span></a>',
                    'url' => ['/event/index']],
                ['label' => 'Услуги',
                    'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-briefcase"></i> <span>{label}</span></a>',
                    'url' => ['/service/index']],
                [
                    'label' => 'SEO',
                    'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-search"></i> <span>{label}</span></a>',
                    'items' => [
                        ['label' => 'URL', 'url' => ['/seo/index']],
                        ['label' => 'Шаблоны', 'url' => ['/seo-category/index']]
                    ]
                ],
//                ['label' => 'Rubrication', 'url' => ['/rubrication/tax-group']],
//                ['label' => 'Relation', 'url' => ['/relation/manage']],
            ],

        ]);
        ?>
        <!-- sidebar menu: : style can be found in sidebar.less -->

    </section>
    <!-- /.sidebar -->
</aside>