<?php $this->head(); ?> </head> <body> <?php $this->beginBody(); ?> <div class="wrap"> <header> <?php $homeUrlSetting = Config::setting('application.home.url'); NavBar::begin(['brandLabel' => Yii::$app->name, 'brandUrl' => $homeUrlSetting ? $homeUrlSetting : Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]); $items = []; foreach (Config::externalLinks() as $item) { $items[] = $item; } if (trim(Config::setting('page.about.content'))) { $items[] = ['label' => 'About', 'url' => ['/site/about']]; } if (trim(Config::setting('page.contact.content'))) { $items[] = ['label' => 'Contact', 'url' => ['/site/contact']]; } if (Yii::$app->user->isGuest) { $items[] = ['label' => 'Register', 'url' => ['/user/registration/register']]; $items[] = ['label' => 'Login', 'url' => ['/user/security/login']]; } else { if (Yii::$app->user->identity->isAdmin) { $items[] = ['label' => 'Admin', 'items' => [['label' => 'Settings', 'url' => ['/admin/settings']], ['label' => 'OAuth Servers', 'url' => ['/admin/oauth-servers']], ['label' => 'Users', 'url' => ['/user/admin']], ['label' => 'OAuth 2 Clients', 'url' => ['/oauth2-client']]]]; }