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;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var $this \yii\base\View
|
|
|
|
* @var $content string
|
|
|
|
*/
|
2013-07-16 10:49:22 +08:00
|
|
|
app\config\AppAsset::register($this);
|
2013-05-24 22:14:49 +08:00
|
|
|
?>
|
|
|
|
<?php $this->beginPage(); ?>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
2013-08-15 05:06:17 +08:00
|
|
|
<meta charset="<?php echo Yii::$app->charset; ?>"/>
|
2013-05-24 22:14:49 +08:00
|
|
|
<title><?php echo Html::encode($this->title); ?></title>
|
|
|
|
<?php $this->head(); ?>
|
|
|
|
</head>
|
|
|
|
<body>
|
2013-07-08 08:29:19 +08:00
|
|
|
<?php $this->beginBody(); ?>
|
2013-08-09 22:55:16 +08:00
|
|
|
<?php
|
2013-10-18 20:03:36 +08:00
|
|
|
NavBar::begin([
|
2013-08-09 22:55:16 +08:00
|
|
|
'brandLabel' => 'My Company',
|
|
|
|
'brandUrl' => Yii::$app->homeUrl,
|
2013-10-18 20:03:36 +08:00
|
|
|
'options' => [
|
2013-08-09 22:55:16 +08:00
|
|
|
'class' => 'navbar-inverse navbar-fixed-top',
|
2013-10-18 20:03:36 +08:00
|
|
|
],
|
|
|
|
]);
|
|
|
|
echo Nav::widget([
|
|
|
|
'options' => ['class' => 'navbar-nav pull-right'],
|
|
|
|
'items' => [
|
|
|
|
['label' => 'Home', 'url' => ['/site/index']],
|
|
|
|
['label' => 'About', 'url' => ['/site/about']],
|
|
|
|
['label' => 'Contact', 'url' => ['/site/contact']],
|
2013-08-09 22:55:16 +08:00
|
|
|
Yii::$app->user->isGuest ?
|
2013-10-18 20:03:36 +08:00
|
|
|
['label' => 'Login', 'url' => ['/site/login']] :
|
|
|
|
['label' => 'Logout (' . Yii::$app->user->identity->username .')' ,
|
|
|
|
'url' => ['/site/logout'],
|
|
|
|
'linkOptions' => ['data-method' => 'post']],
|
|
|
|
],
|
|
|
|
]);
|
2013-08-09 22:55:16 +08:00
|
|
|
NavBar::end();
|
|
|
|
?>
|
2013-05-24 22:14:49 +08:00
|
|
|
|
2013-08-09 09:56:58 +08:00
|
|
|
<div class="container">
|
2013-10-18 20:03:36 +08:00
|
|
|
<?php echo Breadcrumbs::widget([
|
|
|
|
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
|
|
|
|
]); ?>
|
2013-08-09 09:56:58 +08:00
|
|
|
<?php echo $content; ?>
|
2013-05-24 22:14:49 +08:00
|
|
|
</div>
|
|
|
|
|
2013-08-09 09:56:58 +08:00
|
|
|
<footer class="footer">
|
|
|
|
<div class="container">
|
|
|
|
<p class="pull-left">© My Company <?php echo date('Y'); ?></p>
|
|
|
|
<p class="pull-right"><?php echo Yii::powered(); ?></p>
|
|
|
|
</div>
|
|
|
|
</footer>
|
2013-05-24 22:14:49 +08:00
|
|
|
|
2013-07-08 08:29:19 +08:00
|
|
|
<?php $this->endBody(); ?>
|
2013-05-24 22:14:49 +08:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
<?php $this->endPage(); ?>
|