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