Example #1
0
    <meta name="keywords" content="<?php 
echo \Yii::$app->setting->get('siteKeyword');
?>
"/>
    <?php 
$this->head();
?>
</head>
<body>
<?php 
$this->beginBody();
?>
<div class="wrap">

    <?php 
echo \frontend\widgets\Nav::widget();
?>

    <div class="container">
        <?php 
echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
        <?php 
echo Alert::widget();
?>
        <?php 
echo $content;
?>
    </div>
</div>
Example #2
0
NavBar::begin(['brandLabel' => 'My Company', 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-static-top']]);
$menuItems = [['encode' => false, 'label' => '<i class="fa fa-home"></i>', 'url' => ['/site/index']], ['type' => 'messages', 'label' => '#', 'url' => ['/messages/index'], 'items' => [['label' => 'Support Team', 'url' => ['/messages/view', 'id' => 1], 'image' => Url::to('adminlte/img/user2-160x160.jpg'), 'description' => 'Why not buy a new awesome theme?', 'time' => '5 mins'], ['label' => 'Marketing Team', 'url' => ['/messages/view', 'id' => 2], 'image' => Url::to('adminlte/img/user2-160x160.jpg'), 'description' => 'Why not buy a new awesome server?', 'time' => '2 mins']]], ['type' => 'notifications', 'label' => '#', 'url' => ['/notifications/index'], 'items' => [['label' => 'Support Team', 'url' => ['/notifications/view', 'id' => 1]], ['label' => 'Support Team', 'url' => ['/notifications/view', 'id' => 3]], ['label' => 'Support Team', 'url' => ['/notifications/view', 'id' => 4]], ['label' => 'Support Team', 'url' => ['/notifications/view', 'id' => 2]], ['label' => 'Support Team', 'url' => ['/notifications/view', 'id' => 2]], ['label' => 'Support Team', 'url' => ['/notifications/view', 'id' => 2]], ['label' => 'Support Team', 'url' => ['/notifications/view', 'id' => 2]], ['label' => 'Support Team', 'url' => ['/notifications/view', 'id' => 2]]]], ['type' => 'tasks', 'label' => '#', 'url' => ['/tasks/index'], 'items' => [['label' => 'Migration', 'url' => ['/tasks/view', 'id' => 1], 'color' => 'aqua', 'percent' => '10'], ['label' => 'Backup', 'url' => ['/tasks/view', 'id' => 1], 'color' => 'red', 'percent' => '75'], ['label' => 'Analyze', 'url' => ['/tasks/view', 'id' => 1], 'color' => 'yellow', 'percent' => '25'], ['label' => 'Tutorial', 'url' => ['/tasks/view', 'id' => 1], 'color' => 'lime', 'percent' => '50']]], ['label' => 'Page', 'url' => '#', 'items' => [['label' => 'Contact', 'url' => ['/site/contact']], ['label' => 'About', 'url' => ['/site/about']]]]];
if (Yii::$app->user->isGuest) {
    $menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']];
    $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
} else {
    $menuItems[] = ['type' => 'user', 'label' => '#', 'url' => ['/tasks/index'], 'logoutUrl' => ['/site/logout'], 'profileUrl' => ['/site/profile'], 'image' => Url::to('adminlte/img/user2-160x160.jpg'), 'username' => Yii::$app->user->identity->username, 'position' => 'User', 'join' => 'Member since ' . date('m,Y', Yii::$app->user->identity->created_at), 'items' => []];
    /*
    				$menuItems[] = [
    					'label' => 'Logout (' . Yii::$app->user->identity->username . ')',
    					
    					'linkOptions' => ['data-method' => 'post']
    				];*/
}
$menuItems[] = ['type' => 'control', 'label' => '#', 'url' => '#'];
echo Nav::widget(['options' => ['class' => 'navbar-nav'], 'items' => $menuItems]);
NavBar::end();
?>
        

      <!-- =============================================== -->
	
      <!-- Left side column. contains the sidebar -->
		<?php 
$user = [];
if (!Yii::$app->user->isGuest) {
    $user['image'] = Url::to('adminlte/img/user2-160x160.jpg');
    $user['username'] = Yii::$app->user->identity->username;
}
SideNavBar::begin(['user' => $user, 'search' => ['method' => 'post', 'action' => Url::to(['site/search'])], 'options' => ['class' => 'navbar-static-top']]);
$menuItems = [['label' => 'Dashboard', 'url' => '#', 'icon' => 'fa fa-dashboard'], ['label' => 'Layouts Options', 'url' => '#', 'icon' => 'fa fa-files-o'], ['label' => 'Widgets', 'url' => ['site/widgets'], 'icon' => 'fa fa-th'], ['label' => 'Charts', 'url' => ['site/charts'], 'icon' => 'fa fa-pie-chart'], ['label' => 'UI Elements', 'url' => '#', 'icon' => 'fa fa-laptop'], ['label' => 'Forms', 'url' => '#', 'icon' => 'fa fa-edit'], ['label' => 'Tables', 'url' => '#', 'icon' => 'fa fa-table'], ['label' => 'Calendar', 'url' => '#', 'icon' => 'fa fa-calendar'], ['label' => 'Mailbox', 'url' => '#', 'icon' => 'fa fa-envelope'], ['label' => 'Examples', 'url' => '#', 'icon' => 'fa fa-folder'], ['label' => 'Multilevel', 'url' => '#', 'icon' => 'fa fa-share', 'items' => [['label' => 'Level', 'url' => '#', 'icon' => 'fa fa-angle-right'], ['label' => 'Level', 'url' => '#', 'icon' => 'fa fa-angle-right', 'items' => [['label' => 'Sub Level', 'url' => '#', 'icon' => 'fa fa-angle-right'], ['label' => 'Sub Level', 'url' => '#', 'icon' => 'fa fa-angle-right', 'items' => [['label' => 'Sub Level', 'url' => '#', 'icon' => 'fa fa-angle-right'], ['label' => 'Sub Level', 'url' => '#', 'icon' => 'fa fa-angle-right'], ['label' => 'Sub Level', 'url' => '#', 'icon' => 'fa fa-angle-right']]], ['label' => 'Sub Level', 'url' => '#', 'icon' => 'fa fa-angle-right']]], ['label' => 'Level', 'url' => '#', 'icon' => 'fa fa-angle-right']]], ['label' => 'Documentation', 'url' => '#', 'icon' => 'fa fa-book']];