<header class="main-header">
    <a href="<?=$this->url('home');?>" class="logo">
        <span class="logo-mini"><b>E</b>RP</span>
        <span class="logo-lg"><b>DB</b>Erp</span>
    </a>
    <nav class="navbar navbar-static-top">
        <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
            <span class="sr-only">Toggle navigation</span>
        </a>

        <div class="collapse navbar-collapse pull-left" id="navbar-collapse">
            <ul class="nav navbar-nav">
                <li <?=($moduleName == 'Admin' && $controllerName != 'HomeController') ? 'class="active"' : '' ?>>
                    <a href="<?=$this->url('admin-system', ['action'=> 'index']);?>"><?=$this->translate('系统')?></a>
                </li>
                <li <?=($moduleName == 'Store' ? 'class="active"' : '') ?>>
                    <a href="<?=$this->url('goods');?>"><?=$this->translate('基础数据')?></a>
                </li>
                <li <?=($moduleName == 'Purchase' ? 'class="active"' : '')?>>
                    <a href="<?=$this->url('p-order');?>"><?=$this->translate('采购')?></a>
                </li>
                <li <?=($moduleName== 'Sales' ? 'class="active"' : '') ?>>
                    <a href="<?=$this->url('sales-order');?>"><?=$this->translate('销售')?></a>
                </li>
                <li <?=($moduleName== 'Stock' ? 'class="active"' : '') ?>>
                    <a href="<?=$this->url('erp-stock');?>"><?=$this->translate('库存')?></a>
                </li>
                <li <?=($moduleName== 'Shop' ? 'class="active"' : '') ?>>
                    <a href="<?=$this->url('app-shop');?>"><?=$this->translate('商城')?></a>
                </li>
                <li <?=($moduleName== 'Customer' ? 'class="active"' : '') ?>>
                    <a href="<?=$this->url('customer');?>"><?=$this->translate('客户')?></a>
                </li>
                <li <?=($moduleName == 'Finance' ? 'class="active"' : '') ?>>
                    <a href="<?=$this->url('finance-payable');?>"><?=$this->translate('资金')?></a>
                </li>
                <!--li <?=($moduleName == 'Report' ? 'class="active"' : '') ?>>
                    <a href="<?=$this->url('report');?>"><?=$this->translate('报表')?></a>
                </li-->
                <li <?=(($moduleName == 'Admin' && $controllerName == 'HomeController') ? 'class="active"' : '') ?>>
                    <a href="<?=$this->url('home');?>"><?=$this->translate('首页')?></a>
                </li>
            </ul>
        </div>

        <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
                <li class="dropdown messages-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="fa fa-envelope-o"></i>
                        <!--span class="label label-success">4</span-->
                    </a>
                    <ul class="dropdown-menu">
                        <li class="header"><?=$this->translate('您有')?> 0 <?=$this->translate('条信息未读')?></li>
                        <li>
                            <ul class="menu">

                                <!--li>
                                    <a href="#">
                                        <h4>
                                            Support Team
                                            <small><i class="fa fa-clock-o"></i> 5 mins</small>
                                        </h4>
                                        <p>Why not buy a new awesome theme?</p>
                                    </a>
                                </li-->

                            </ul>
                        </li>
                        <li class="footer"><a href="#"><?=$this->translate('全部消息')?></a></li>
                    </ul>
                </li>

                <li class="dropdown notifications-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="fa fa-bell-o"></i>
                        <!--span class="label label-warning">10</span-->
                    </a>
                    <ul class="dropdown-menu">
                        <li class="header"><?=$this->translate('您有')?> 0 <?=$this->translate('条通知未读')?></li>
                        <li>
                            <ul class="menu">
                                <!--li>
                                    <a href="#">
                                        <i class="fa fa-users text-aqua"></i> 5 new members joined today
                                    </a>
                                </li-->

                            </ul>
                        </li>
                        <li class="footer"><a href="#"><?=$this->translate('全部通知')?></a></li>
                    </ul>
                </li>
                <li class="dropdown tasks-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="fa fa-flag-o"></i>
                        <!--span class="label label-danger">9</span-->
                    </a>
                    <ul class="dropdown-menu">
                        <li class="header"><?=$this->translate('您有')?> 0 <?=$this->translate('个任务未处理')?></li>
                        <li>
                            <ul class="menu">
                                <!--li>
                                    <a href="#">
                                        <h3>
                                            Design some buttons
                                            <small class="pull-right">20%</small>
                                        </h3>
                                        <div class="progress xs">
                                            <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar"
                                                 aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                <span class="sr-only">20% Complete</span>
                                            </div>
                                        </div>
                                    </a>
                                </li-->
                            </ul>
                        </li>
                        <li class="footer">
                            <a href="#"><?=$this->translate('全部任务')?></a>
                        </li>
                    </ul>
                </li>

                <li class="dropdown user user-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <img alt="" src="<?php echo $this->basePath('css/admin/img/avatar.png'); ?>" class="user-image">
                        <span class="hidden-xs"><?=$this->currentAdmin('admin_name')?></span>
                    </a>
                    <ul class="dropdown-menu">

                        <li class="user-header">
                            <img src="<?php echo $this->basePath('css/admin/img/avatar.png'); ?>" class="img-circle" alt="User Image">
                            <p>
                                <?= $this->currentAdmin('admin_name')?> - <?=$this->currentAdmin('admin_group_name')?>
                                <small><?=date("Y-m-d") ?></small>
                            </p>
                        </li>

                        <li class="user-body">
                            <div class="row">
                                <div class="col-xs-4 text-center">
                                    <a href="https://www.dberp.com.cn/" target="_blank"><?=$this->translate('官方网站')?></a>
                                </div>
                                <div class="col-xs-4 text-center">
                                    <a href="https://bbs.dbshop.net/" target="_blank"><?=$this->translate('交流论坛')?></a>
                                </div>
                                <div class="col-xs-4 text-center">
                                    <a href="https://doc.loongdom.cn/index.php?title=DBERP_%E7%B3%BB%E7%BB%9F" target="_blank"><?=$this->translate('在线文档')?></a>
                                </div>
                            </div>
                        </li>

                        <li class="user-footer">
                            <div class="pull-left">
                                <a href="<?= $this->url('admin', ['action'=>'edit', 'id'=>$this->currentAdmin('admin_id')]); ?>" class="btn btn-info"><i class="fa fa-user"></i> <?=$this->translate('个人资料')?></a>
                            </div>
                            <div class="pull-right">
                                <a href="<?=$this->url('logout');?>" class="btn btn-danger"><i class="fa fa-sign-out"></i> <?=$this->translate('退出')?></a>
                            </div>
                        </li>
                    </ul>
                </li>

            </ul>
        </div>
    </nav>
</header>