Created
December 25, 2015 13:46
-
-
Save des1roer/b90c599a4a62adac9096 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* @var $this \yii\web\View */ | |
/* @var $content string */ | |
use yii\helpers\Html; | |
use yii\bootstrap\Nav; | |
use yii\bootstrap\NavBar; | |
use yii\widgets\Breadcrumbs; | |
use app\assets\AppAsset; | |
AppAsset::register($this); | |
?> | |
<?php $this->beginPage() ?> | |
<!DOCTYPE html> | |
<html lang="<?= Yii::$app->language ?>"> | |
<head> | |
<meta charset="<?= Yii::$app->charset ?>"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<?= Html::csrfMetaTags() ?> | |
<title><?= Html::encode($this->title) ?></title> | |
<?php $this->head() ?> | |
</head> | |
<body> | |
<?php $this->beginBody() ?> | |
<div class="wrap"> | |
<?php | |
NavBar::begin([ | |
'brandLabel' => 'My Company', | |
'brandUrl' => Yii::$app->homeUrl, | |
'options' => [ | |
'class' => 'navbar-inverse navbar-fixed-top', | |
], | |
]); | |
echo Nav::widget([ | |
'options' => ['class' => 'navbar-nav navbar-right'], | |
'items' => [ | |
//['label' => 'gii', 'url' => ['/gii'], 'visible' => Yii::$app->user->identity->isAdmin && !Yii::$app->user->isGuest], | |
['label' => 'Gii', 'url' => ['/gii']], | |
['label' => 'lesson', | |
'items' => [ | |
['label' => 'worker', 'url' => '/lesson/worker'], | |
['label' => 'dep', 'url' => '/lesson/dep'], | |
['label' => 'perk', 'url' => '/lesson/perk'], | |
], | |
], | |
['label' => 'tree', | |
'items' => [ | |
['label' => 'product', 'url' => '/tree/product'], | |
], | |
], | |
['label' => 'Home', 'url' => ['/site/index']], | |
['label' => 'About', 'url' => ['/site/about']], | |
['label' => 'Contact', 'url' => ['/site/contact']], | |
Yii::$app->user->isGuest ? | |
['label' => 'Sign in', 'url' => ['/user/security/login']] : | |
['label' => 'Sign out (' . Yii::$app->user->identity->username . ')', | |
'url' => ['/user/security/logout'], | |
'linkOptions' => ['data-method' => 'post']], | |
['label' => 'Register', 'url' => ['/user/registration/register'], 'visible' => Yii::$app->user->isGuest] | |
], | |
]); | |
NavBar::end(); | |
?> | |
<div class="container"> | |
<?= | |
Breadcrumbs::widget([ | |
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], | |
]) | |
?> | |
<?= $content ?> | |
</div> | |
</div> | |
<footer class="footer"> | |
<div class="container"> | |
<p class="pull-left">© My Company <?= date('Y') ?></p> | |
<p class="pull-right"><?= Yii::powered() ?></p> | |
</div> | |
</footer> | |
<?php $this->endBody() ?> | |
</body> | |
</html> | |
<?php $this->endPage() ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment