main-sidebar.php 3.08 KB
<?php
use yii\widgets\Menu;
?>
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <!-- Sidebar user panel -->
        <div class="user-panel" style="min-height: 60px;">
            <div class="pull-left image">
                <!--img src="dist/img/user2-160x160.jpg" class="img-circle" alt="User Image"-->
            </div>
            <div class="pull-left info">
                <p>Alexander Pierce</p>
                <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
            </div>
        </div>
        <!-- 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' => "Блог", 'options'=>['class'=>'treeview'], 'url' => ['#'],
                    'template'=>'<a href="{url}"> <i class="fa fa-dashboard"></i> <span>{label}</span> <i class="fa fa-angle-left pull-right"></i></a>',
                    'items' => [
                        ['label' => 'Просмотр', 'url' => ['blog/index']],
                        ['label' => 'Создать', 'url' => ['blog/create']],
                    ],
                ],
                ['label' => 'Заказы', 'url' => ['cart/index'], 'template'=>'<a href="{url}"> <i class="fa fa-dashboard"></i> <span>{label}</span></a>'],
                [
                    'label' => 'Products',
                    'url' => ['/product/manage'],
                    'items' => [
                        ['label' => 'Товары', 'url' => ['/product/manage']],
                        ['label' => 'Категории', 'url' => ['/category']],
                        ['label' => 'Бренды', 'url' => ['/brand']],
                    ]
                ],
                [
                    'label' => 'Характеристики',
                    'url' => ['/rubrication/tax-group'],
                    'items' => [
                        ['label' => 'Характеристики', 'url' => ['/rubrication/tax-group']],
                        ['label' => 'Зависимости', 'url' => ['/relation/manage']]
                    ]
                ],
//                ['label' => 'Rubrication', 'url' => ['/rubrication/tax-group']],
//                ['label' => 'Relation', 'url' => ['/relation/manage']],
            ],

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

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