예제 #1
0
            <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='seach' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
            </span>
        </div>
    </form>-->
    <!-- /.search form -->
    <!-- sidebar menu: : style can be found in sidebar.less -->
    <?php 
echo SideMenu::widget(['items' => [['label' => 'Dashboard', 'url' => ['/site/index'], 'icon' => 'fa fa-dashboard'], ['label' => 'Admin Manager', 'icon' => 'fa fa-wrench', 'items' => [['label' => 'Users', 'icon' => 'fa fa-angle-double-right'], ['label' => 'Access Control', 'icon' => 'fa fa-angle-double-right']]], ['label' => 'Master', 'icon' => 'fa fa-gears', 'items' => [['label' => 'Organizaion', 'url' => ['/master/orgn'], 'icon' => 'fa fa-angle-double-right'], ['label' => 'Branch', 'url' => ['/master/branch'], 'icon' => 'fa fa-angle-double-right'], ['label' => 'Warehouse', 'url' => ['/master/warehouse'], 'icon' => 'fa fa-angle-double-right'], ['label' => 'Product', 'url' => ['/master/product'], 'icon' => 'fa fa-angle-double-right'], ['label' => 'Customer', 'url' => ['/master/customer'], 'icon' => 'fa fa-angle-double-right'], ['label' => 'Supplier', 'url' => ['/master/supplier'], 'icon' => 'fa fa-angle-double-right']]], ['label' => 'Purchase', 'icon' => 'fa fa-shopping-cart', 'items' => [['label' => 'Purchase Order', 'url' => ['/purchase/purchase'], 'icon' => 'fa fa-angle-double-right'], ['label' => 'Product Pricing', 'icon' => 'fa fa-angle-double-right'], ['label' => 'Cogs Management', 'icon' => 'fa fa-angle-double-right']]], ['label' => 'Inventory', 'url' => ['/site/about'], 'icon' => 'fa fa-th-large', 'items' => [['label' => 'Transfer', 'url' => ['/inventory/transfer'], 'icon' => 'fa fa-angle-double-right'], ['label' => 'Receipt', 'url' => ['/inventory/receive'], 'icon' => 'fa fa-angle-double-right'], ['label' => 'Transfer Notes', 'url' => ['/inventory/notice'], 'icon' => 'fa fa-angle-double-right']]], ['label' => 'Sales', 'url' => ['/site/about'], 'icon' => 'fa fa-barcode', 'items' => [['label' => 'Retail', 'icon' => 'fa fa-angle-double-right'], ['label' => 'Grosir', 'icon' => 'fa fa-angle-double-right']]], ['label' => 'Accounting', 'url' => ['/site/about'], 'icon' => 'fa fa-money', 'items' => [['label' => 'Periode', 'url' => ['/accounting/acc-periode'], 'icon' => 'fa fa-angle-double-right'], ['label' => 'COA', 'url' => ['/accounting/coa'], 'icon' => 'fa fa-angle-double-right'], ['label' => 'Entry Sheet', 'url' => ['/accounting/entri-sheet'], 'icon' => 'fa fa-angle-double-right'], ['label' => 'GL Entry', 'url' => ['/accounting/entri-gl'], 'icon' => 'fa fa-angle-double-right'], ['label' => 'Cash In', 'url' => ['/accounting/about'], 'icon' => 'fa fa-angle-double-right'], ['label' => 'Cash Out', 'url' => ['/accounting/about'], 'icon' => 'fa fa-angle-double-right'], ['label' => 'Bank In', 'url' => ['/accounting/about'], 'icon' => 'fa fa-angle-double-right'], ['label' => 'Bank Out', 'url' => ['/accounting/about'], 'icon' => 'fa fa-angle-double-right']]], ['label' => 'Reports', 'url' => ['/site/about'], 'icon' => 'fa fa-files-o', 'items' => [['label' => 'test', 'icon' => 'fa fa-angle-double-right'], ['label' => 'test2', 'icon' => 'fa fa-angle-double-right'], ['label' => 'test3', 'icon' => 'fa fa-angle-double-right']]]]]);
?>
    
    <!--    <ul class="sidebar-menu">
            <li class="active">
                <a href="index.html">
                    <i class="fa fa-dashboard"></i> <span>Dashboard</span>
                </a>
            </li>
            <li>
                <a href="pages/widgets.html">
                    <i class="fa fa-th"></i> <span>Widgets</span> <small class="badge pull-right bg-green">new</small>
                </a>
            </li>
            <li class="treeview">
                <a href="#">
예제 #2
0
//                ['label' => 'Cash In', 'url' => ['/accounting/about'], 'icon' => 'fa fa-angle-double-right'],
//                ['label' => 'Cash Out', 'url' => ['#'], 'icon' => 'fa fa-angle-double-right'],
//                ['label' => 'Bank In', 'url' => ['/accounting/about'], 'icon' => 'fa fa-angle-double-right'],
//                ['label' => 'Bank Out', 'url' => ['/accounting/about'], 'icon' => 'fa fa-angle-double-right'],
//            ]],
//        ['label' => 'Reports', 'url' => ['#'], 'icon' => 'fa fa-files-o',
//            'items' => [
//                ['label' => 'test', 'icon' => 'fa fa-angle-double-right'],
//                ['label' => 'test2', 'icon' => 'fa fa-angle-double-right'],
//                ['label' => 'test3', 'icon' => 'fa fa-angle-double-right'],
//            ]],
//    ];
$menuCallback = function ($menu) {
    $item = ['label' => $menu['name'], 'url' => MenuHelper::parseRoute($menu['route'])];
    if (!empty($menu['data'])) {
        $item['icon'] = 'fa ' . $menu['data'];
    } else {
        $item['icon'] = 'fa fa-angle-double-right';
    }
    if ($menu['children'] != []) {
        $item['items'] = $menu['children'];
    }
    return $item;
};
$items = MenuHelper::getAssignedMenu(Yii::$app->user->id, null, $menuCallback);
echo SideMenu::widget(['items' => $items]);
?>

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