|
|
@ -27,17 +27,24 @@ AppAsset::register($this); |
|
|
|
<div class="navbar"> |
|
|
|
<div class="navbar"> |
|
|
|
<div class="navbar-inner"> |
|
|
|
<div class="navbar-inner"> |
|
|
|
<div class="container"> |
|
|
|
<div class="container"> |
|
|
|
<?php echo Menu::widget(array( |
|
|
|
<?php |
|
|
|
'options' => array('class' => 'nav'), |
|
|
|
$menuItems = array( |
|
|
|
'items' => array( |
|
|
|
|
|
|
|
array('label' => 'Home', 'url' => array('/site/index')), |
|
|
|
array('label' => 'Home', 'url' => array('/site/index')), |
|
|
|
array('label' => 'About', 'url' => array('/site/about')), |
|
|
|
array('label' => 'About', 'url' => array('/site/about')), |
|
|
|
array('label' => 'Contact', 'url' => array('/site/contact')), |
|
|
|
array('label' => 'Contact', 'url' => array('/site/contact')), |
|
|
|
Yii::$app->user->isGuest ? |
|
|
|
); |
|
|
|
array('label' => 'Login', 'url' => array('/site/login')) : |
|
|
|
if (Yii::$app->user->isGuest) { |
|
|
|
array('label' => 'Logout (' . Yii::$app->user->identity->username .')' , 'url' => array('/site/logout')), |
|
|
|
$menuItems[] = array('label' => 'Signup', 'url' => array('/site/signup')); |
|
|
|
), |
|
|
|
$menuItems[] = array('label' => 'Login', 'url' => array('/site/login')); |
|
|
|
)); ?> |
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
$menuItems[] = array('label' => 'Logout (' . Yii::$app->user->identity->username .')' , 'url' => array('/site/logout')); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
echo Menu::widget(array( |
|
|
|
|
|
|
|
'options' => array('class' => 'nav'), |
|
|
|
|
|
|
|
'items' => $menuItems, |
|
|
|
|
|
|
|
)); |
|
|
|
|
|
|
|
?> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|