Skip to content

Instantly share code, notes, and snippets.

@jacmoe
Created November 5, 2015 09:47
Show Gist options
  • Save jacmoe/fd3c23c44907dbaa4605 to your computer and use it in GitHub Desktop.
Save jacmoe/fd3c23c44907dbaa4605 to your computer and use it in GitHub Desktop.
-use yii\helpers\Html
-use yii\bootstrap\Nav
-use yii\bootstrap\NavBar
-use frontend\assets\AppAsset
-use frontend\widgets\Alert
-use yii\widgets\Breadcrumbs
-AppAsset::register($view)
-$view->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 #{$view->title} | Bugitor
-$view->head()
body
-$view->beginBody()
.wrap
-NavBar::begin(['brandLabel' => 'Bugitor',
'brandUrl' => Yii::$app->homeUrl,
'options' => ['class' => 'navbar-inverse navbar-fixed-top',],])
-$menuItems[] = ['label' => 'Home', 'url' => ['/site/index']]
-$menuItems[] = ['label' => 'Projects', 'url' => ['/project/index']]
-$menuItems[] = ['label' => 'Issues', 'url' => ['/issue/index']]
if (Yii::$app->user->isGuest)
-$menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']]
-$menuItems[] = ['label' => 'Login', 'url' => ['/site/login']]
else
-$menuItems[] = ['label' => 'Users', 'url' => ['/user/index']]
-$menuItems[] = ['label' => 'Gii', 'url' => ['/gii']]
-$menuItems[] = ['label' => 'Logout (' . Yii::$app->user->identity->username . ')','url' => ['/site/logout'],'linkOptions' =>['data-method' => 'post']]
!=Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'],'items' => $menuItems,])
-NavBar::end()
.container
!=Breadcrumbs::widget(['links' => isset($view->params['breadcrumbs']) ? $view->params['breadcrumbs'] : [],])
!=$content
footer.footer
.container
p.pull-left © My Company 
=date('Y')
p.pull-right
!=Yii::powered()
-$view->endBody()
-$view->endPage()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment