add user CRUD
This commit is contained in:
@@ -9,8 +9,12 @@ use yii\bootstrap\Nav;
|
||||
use yii\bootstrap\NavBar;
|
||||
use yii\widgets\Breadcrumbs;
|
||||
use common\widgets\Alert;
|
||||
use backend\components\AdminMenuStructure;
|
||||
|
||||
AppAsset::register($this);
|
||||
|
||||
$adminMenu = new AdminMenuStructure();
|
||||
$items = $adminMenu->run();
|
||||
?>
|
||||
<?php $this->beginPage() ?>
|
||||
<!DOCTYPE html>
|
||||
@@ -28,27 +32,15 @@ AppAsset::register($this);
|
||||
<div class="wrap">
|
||||
<?php
|
||||
NavBar::begin([
|
||||
'brandLabel' => 'My Company',
|
||||
'brandLabel' => 'Botond Fitness WebAdmin',
|
||||
'brandUrl' => Yii::$app->homeUrl,
|
||||
'options' => [
|
||||
'class' => 'navbar-inverse navbar-fixed-top',
|
||||
],
|
||||
]);
|
||||
$menuItems = [
|
||||
['label' => 'Home', 'url' => ['/site/index']],
|
||||
];
|
||||
if (Yii::$app->user->isGuest) {
|
||||
$menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
|
||||
} else {
|
||||
$menuItems[] = [
|
||||
'label' => 'Logout (' . Yii::$app->user->identity->username . ')',
|
||||
'url' => ['/site/logout'],
|
||||
'linkOptions' => ['data-method' => 'post']
|
||||
];
|
||||
}
|
||||
echo Nav::widget([
|
||||
'options' => ['class' => 'navbar-nav navbar-right'],
|
||||
'items' => $menuItems,
|
||||
'items' => $items,
|
||||
]);
|
||||
NavBar::end();
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user