66 lines
1.6 KiB
PHP
Raw Normal View History

2013-05-24 10:14:49 -04:00
<?php
use yii\helpers\Html;
2013-08-12 07:17:43 -04:00
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
2013-05-24 10:14:49 -04:00
use yii\widgets\Breadcrumbs;
use app\assets\AppAsset;
2013-05-24 10:14:49 -04:00
/**
2013-11-12 06:24:07 +02:00
* @var \yii\web\View $this
* @var string $content
2013-05-24 10:14:49 -04:00
*/
2013-11-12 06:24:07 +02:00
AppAsset::register($this);
2013-05-24 10:14:49 -04:00
?>
<?php $this->beginPage(); ?>
<!DOCTYPE html>
<html lang="en">
<head>
2013-10-20 00:59:43 +04:00
<meta charset="<?= Yii::$app->charset ?>"/>
<title><?= Html::encode($this->title) ?></title>
2013-05-24 10:14:49 -04:00
<?php $this->head(); ?>
</head>
<body>
<?php $this->beginBody(); ?>
<?php
2013-10-18 12:03:36 +00:00
NavBar::begin([
'brandLabel' => 'My Company',
'brandUrl' => Yii::$app->homeUrl,
2013-10-18 12:03:36 +00:00
'options' => [
'class' => 'navbar-inverse navbar-fixed-top',
2013-10-18 12:03:36 +00:00
],
]);
echo Nav::widget([
2013-11-13 08:31:49 -05:00
'options' => ['class' => 'navbar-nav navbar-right'],
2013-10-18 12:03:36 +00:00
'items' => [
['label' => 'Home', 'url' => ['/site/index']],
['label' => 'About', 'url' => ['/site/about']],
['label' => 'Contact', 'url' => ['/site/contact']],
Yii::$app->user->isGuest ?
2013-10-18 12:03:36 +00:00
['label' => 'Login', 'url' => ['/site/login']] :
2013-11-12 06:24:07 +02:00
['label' => 'Logout (' . Yii::$app->user->identity->username . ')' ,
2013-10-18 12:03:36 +00:00
'url' => ['/site/logout'],
'linkOptions' => ['data-method' => 'post']],
],
]);
NavBar::end();
?>
2013-05-24 10:14:49 -04:00
2013-08-08 21:56:58 -04:00
<div class="container">
2013-11-12 06:24:07 +02:00
<?= Breadcrumbs::widget([
2013-10-18 12:03:36 +00:00
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
2013-11-12 06:24:07 +02:00
]) ?>
2013-10-20 00:59:43 +04:00
<?= $content ?>
2013-05-24 10:14:49 -04:00
</div>
2013-08-08 21:56:58 -04:00
<footer class="footer">
<div class="container">
2013-10-20 00:59:43 +04:00
<p class="pull-left">&copy; My Company <?= date('Y') ?></p>
<p class="pull-right"><?= Yii::powered() ?></p>
2013-08-08 21:56:58 -04:00
</div>
</footer>
2013-05-24 10:14:49 -04:00
<?php $this->endBody(); ?>
2013-05-24 10:14:49 -04:00
</body>
</html>
<?php $this->endPage(); ?>