Beispiel #1
0
echo Nav::widget(['encodeLabels' => false, 'options' => ['class' => 'navbar-nav navbar-right'], 'items' => $menuItems]);
echo LanguageSelector::widget(['display' => 'label', 'view' => 'pills']);
NavBar::end();
?>

    <div class="container">
        <div class="row">
            <div class="col-md-3">
                <div class="hidden-xs">
                    <?php 
$menuItemsKey = '__mainMenuItems' . Yii::$app->language;
if (!($menuItems = Yii::$app->cache->get($menuItemsKey))) {
    $menuItems = Menu::getMenuItems('main-menu');
    Yii::$app->cache->set($menuItemsKey, $menuItems, 3600);
}
echo Navigation::widget(['encodeLabels' => false, 'items' => $menuItems, 'options' => [['class' => 'nav nav-pills nav-stacked'], ['class' => 'nav nav-second-level'], ['class' => 'nav nav-third-level']]]);
?>
                </div>
                
                <div>
                    <?php 
echo RecentComments::widget();
?>
                </div>
            </div>
            <div class="col-md-9">
                <?php 
echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
                <?php 
echo Alert::widget();
Beispiel #2
0
NavBar::begin(['brandLabel' => Html::img($logo, ['class' => 'yee-logo', 'alt' => 'YeeCMS']) . '<b>Yee</b> ' . Yii::t('yee', 'Control Panel'), 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-static-top', 'style' => 'margin-bottom: 0'], 'innerContainerOptions' => ['class' => 'container-fluid']]);
$menuItems = [['label' => str_replace('http://', '', Yii::$app->urlManager->hostInfo), 'url' => Yii::$app->urlManager->hostInfo]];
if (Yii::$app->user->isGuest) {
    $menuItems[] = ['label' => Yii::t('yee', 'Login'), 'url' => ['/auth/login']];
} else {
    $menuItems[] = ['label' => Yii::t('yee', 'Logout {username}', ['username' => Yii::$app->user->identity->username]), 'url' => Yii::$app->urlManager->hostInfo . '/auth/logout', 'linkOptions' => ['data-method' => 'post']];
}
echo Nav::widget(['encodeLabels' => false, 'options' => ['class' => 'navbar-nav navbar-right'], 'items' => $menuItems]);
echo LanguageSelector::widget(['display' => 'label', 'view' => 'pills']);
NavBar::end();
?>

        <!-- SIDEBAR NAV -->
        <div class="navbar-default sidebar metismenu" role="navigation">
            <?php 
echo Nav::widget(['encodeLabels' => false, 'dropDownCaret' => '<span class="arrow"></span>', 'options' => [['class' => 'nav side-menu'], ['class' => 'nav nav-second-level'], ['class' => 'nav nav-third-level']], 'items' => Menu::getMenuItems('admin-menu')]);
?>
        </div>
        <!-- !SIDEBAR NAV -->
    </nav>

    <div id="page-wrapper">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-12">
                    <?php 
echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>

                    <?php 
if (Yii::$app->session->hasFlash('crudMessage')) {