Ejemplo n.º 1
0
echo '<a href="javascript:;" class="menu-toggler responsive-toggler" data-toggle="collapse" data-target=".navbar-collapse"></a>';
echo '<div class="top-menu">';
echo Nav::widget(['position' => Nav::POS_RIGHT, 'items' => [['icon' => 'fa icon-bell', 'badge' => Badge::widget(['label' => '0', 'type' => Badge::TYPE_DANGER, 'options' => ['id' => 'notify-all']]), 'label' => \Yii::t('common', 'Home'), 'dropdownType' => Nav::TYPE_NOTIFICATION, 'url' => ['/site/index'], 'items' => [['label' => '提醒', 'url' => ['#'], 'badge' => Badge::widget(['label' => '0', 'type' => Badge::TYPE_DANGER, 'options' => ['id' => 'notify-min5']])]]], ['label' => Nav::userItem(\Yii::$app->user->identity->username, Metronic::getAssetsUrl($this) . '/img/avatar.png'), 'icon' => 'fa fa-angle-down', 'url' => '#', 'dropdownType' => Nav::TYPE_USER, 'items' => [['icon' => 'icon-user', 'label' => '个人资料', 'url' => ['/account/index']], ['icon' => 'fa fa-edit ', 'label' => '修改资料', 'url' => ['/account/edit']], ['divider'], ['icon' => 'icon-logout', 'label' => '退出登陆', 'url' => ['/account/logout']]]]]]);
echo '</div>';
NavBar::end();
?>
    <!-- END NAV BAR -->
    <?php 
echo Metronic::getComponent()->layoutOption == Metronic::LAYOUT_BOXED ? Html::beginTag('div', ['class' => 'container']) : '';
?>
    <div class="clearfix"></div>
    <!-- BEGIN CONTAINER -->
    <div class="page-container">
        <!-- BEGIN SIDEBAR -->
        <?php 
echo Menu::widget(['visible' => true, 'items' => [['icon' => 'fa fa-home', 'label' => \Yii::t('common', 'Home'), 'url' => ['site/index'], 'childUrls' => ['account/index', 'account/edit']], ['icon' => 'fa fa-user', 'label' => '用户管理', 'url' => ['customer/index'], 'items' => [['label' => '用户列表', 'url' => ['customer/index'], 'childUrls' => ['customer/view', 'customer/order']], ['label' => '用户统计', 'url' => ['customer/statistic']]]], ['icon' => 'icon-docs', 'label' => '内容管理', 'url' => ['article/index'], 'items' => [['label' => '资讯列表', 'url' => ['article/index'], 'childUrls' => ['article/view']], ['label' => '资讯分类管理', 'url' => ['article/category']], ['label' => '发布资讯', 'url' => ['article/create']], ['label' => '租房列表', 'url' => ['zufang/index']], ['label' => '黄页商户管理', 'url' => ['huangye/index'], 'childUrls' => ['huangye/view', 'huangye/create', 'huangye/update']]]], ['icon' => 'icon-settings', 'label' => '系统设置', 'items' => [['label' => '基本设置', 'url' => ['config/index']], ['label' => 'UCenter设置', 'url' => ['config/operation']], ['label' => '微信设置', 'url' => ['weixin/index'], 'childUrls' => ['weixin/create', 'weixin/update', 'weixin/view']]]], ['icon' => 'fa fa-bookmark-o', 'label' => '权限管理', 'items' => [['label' => '角色管理', 'url' => ['access/role/index'], 'childUrls' => ['role/create', 'role/update', 'role/view']], ['label' => '路由管理', 'url' => ['access/route/index'], 'childUrls' => ['route/create', 'route/update', 'route/view']], ['label' => '权限管理', 'url' => ['access/permission/index'], 'childUrls' => ['permission/create', 'permission/update', 'permission/view']], ['label' => '权限分配', 'url' => ['access/assignment/index'], 'childUrls' => ['assignment/create', 'assignment/update', 'assignment/view']]]]]]);
?>
        <!-- END SIDEBAR -->
        <!-- BEGIN CONTENT -->
        <div class="page-content-wrapper">
            <div class="page-content">
                <!-- BEGIN PAGE HEADER-->
                <!-- BEGIN PAGE TITLE -->
                <!--<h3 class="page-title">
                    <? /*= Html::encode($this->title) */ ?>
                    <small><? /*= Html::encode(@$this->params['subTitle']) */ ?></small>
                </h3>-->
                <!-- END PAGE TITLE -->
                <div class="page-bar">
                    <!-- BEGIN BREADCRUMB-->
                    <?php 
Ejemplo n.º 2
0
<header class="main-header">

    <?php 
echo Html::a('<span class="logo-mini">halo</span><span class="logo-lg">' . Yii::$app->name . '</span>', Yii::$app->homeUrl, ['class' => 'logo']);
?>

    <nav class="navbar navbar-static-top" role="navigation">

        <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">Toggle navigation</span>
        </a>

        <div class="navbar-custom-menu">

            <?php 
echo Menu::widget(['menuKey' => 'header', 'options' => ['class' => 'nav navbar-nav']]);
?>
            
            <ul class="nav navbar-nav">

                <!-- Messages: style can be found in dropdown.less-->
                <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">You have 4 messages</li>
                        <li>
                            <!-- inner menu: contains the actual data -->
                            <ul class="menu">