2013-05-24 22:14:49 +08:00
|
|
|
<?php
|
|
|
|
use yii\helpers\Html;
|
2013-08-12 19:17:43 +08:00
|
|
|
use yii\bootstrap\Nav;
|
|
|
|
use yii\bootstrap\NavBar;
|
2013-05-24 22:14:49 +08:00
|
|
|
use yii\widgets\Breadcrumbs;
|
2013-11-14 00:17:05 +08:00
|
|
|
use app\assets\AppAsset;
|
2013-05-24 22:14:49 +08:00
|
|
|
|
|
|
|
/**
|
2013-11-12 12:24:07 +08:00
|
|
|
* @var \yii\web\View $this
|
|
|
|
* @var string $content
|
2013-05-24 22:14:49 +08:00
|
|
|
*/
|
2013-11-12 12:24:07 +08:00
|
|
|
AppAsset::register($this);
|
2013-05-24 22:14:49 +08:00
|
|
|
?>
|
2013-11-28 05:19:43 +08:00
|
|
|
<?php $this->beginPage() ?>
|
2013-05-24 22:14:49 +08:00
|
|
|
<!DOCTYPE html>
|
2013-11-20 05:33:52 +08:00
|
|
|
<html lang="<?= Yii::$app->language ?>">
|
2013-05-24 22:14:49 +08:00
|
|
|
<head>
|
2013-10-20 04:59:43 +08:00
|
|
|
<meta charset="<?= Yii::$app->charset ?>"/>
|
2013-12-30 04:31:35 +08:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2013-10-20 04:59:43 +08:00
|
|
|
<title><?= Html::encode($this->title) ?></title>
|
2013-11-28 05:19:43 +08:00
|
|
|
<?php $this->head() ?>
|
2013-05-24 22:14:49 +08:00
|
|
|
</head>
|
|
|
|
<body>
|
2014-01-11 23:41:39 +08:00
|
|
|
|
2013-11-28 05:19:43 +08:00
|
|
|
<?php $this->beginBody() ?>
|
2014-01-11 23:41:39 +08:00
|
|
|
<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' => 'Home', 'url' => ['/site/index']],
|
|
|
|
['label' => 'About', 'url' => ['/site/about']],
|
|
|
|
['label' => 'Contact', 'url' => ['/site/contact']],
|
|
|
|
Yii::$app->user->isGuest ?
|
|
|
|
['label' => 'Login', 'url' => ['/site/login']] :
|
2014-02-25 00:17:38 +08:00
|
|
|
['label' => 'Logout (' . Yii::$app->user->identity->username . ')',
|
2014-01-11 23:41:39 +08:00
|
|
|
'url' => ['/site/logout'],
|
|
|
|
'linkOptions' => ['data-method' => 'post']],
|
|
|
|
],
|
|
|
|
]);
|
|
|
|
NavBar::end();
|
|
|
|
?>
|
2013-05-24 22:14:49 +08:00
|
|
|
|
2014-01-11 23:41:39 +08:00
|
|
|
<div class="container">
|
|
|
|
<?= Breadcrumbs::widget([
|
|
|
|
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
|
|
|
|
]) ?>
|
|
|
|
<?= $content ?>
|
|
|
|
</div>
|
2013-05-24 22:14:49 +08:00
|
|
|
</div>
|
|
|
|
|
2013-08-09 09:56:58 +08:00
|
|
|
<footer class="footer">
|
|
|
|
<div class="container">
|
2013-10-20 04:59:43 +08:00
|
|
|
<p class="pull-left">© My Company <?= date('Y') ?></p>
|
|
|
|
<p class="pull-right"><?= Yii::powered() ?></p>
|
2013-08-09 09:56:58 +08:00
|
|
|
</div>
|
|
|
|
</footer>
|
2013-05-24 22:14:49 +08:00
|
|
|
|
2013-11-28 05:19:43 +08:00
|
|
|
<?php $this->endBody() ?>
|
2013-05-24 22:14:49 +08:00
|
|
|
</body>
|
|
|
|
</html>
|
2013-11-28 05:19:43 +08:00
|
|
|
<?php $this->endPage() ?>
|