diff --git a/apps/advanced/backend/config/AppAsset.php b/apps/advanced/backend/config/AppAsset.php index 90a850d..267e48c 100644 --- a/apps/advanced/backend/config/AppAsset.php +++ b/apps/advanced/backend/config/AppAsset.php @@ -6,6 +6,7 @@ */ namespace backend\config; + use yii\web\AssetBundle; /** diff --git a/apps/advanced/backend/views/layouts/main.php b/apps/advanced/backend/views/layouts/main.php index 9f66a11..5915efb 100644 --- a/apps/advanced/backend/views/layouts/main.php +++ b/apps/advanced/backend/views/layouts/main.php @@ -1,7 +1,8 @@ head(); ?> -
beginBody(); ?> -
-

My Company

- - - -
+ 'My Company', + 'brandUrl' => Yii::$app->homeUrl, + 'options' => array( + 'class' => 'navbar-inverse navbar-fixed-top', + ), + )); + $menuItems = array( + array('label' => 'Home', 'url' => array('/site/index')), + ); + if (Yii::$app->user->isGuest) { + $menuItems[] = array('label' => 'Login', 'url' => array('/site/login')); + } + else { + $menuItems[] = array('label' => 'Logout (' . Yii::$app->user->identity->username .')' , 'url' => array('/site/logout')); + } + echo Nav::widget(array( + 'options' => array('class' => 'navbar-nav pull-right'), + 'items' => $menuItems, + )); + NavBar::end(); + ?> +
isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : array(), )); ?> +
-
+ - endBody(); ?>
diff --git a/apps/advanced/backend/views/site/index.php b/apps/advanced/backend/views/site/index.php index 158b61c..bc084da 100644 --- a/apps/advanced/backend/views/site/index.php +++ b/apps/advanced/backend/views/site/index.php @@ -2,46 +2,52 @@ /** * @var yii\base\View $this */ -$this->title = 'Welcome'; +$this->title = 'My Yii Application'; ?> -
-

Welcome!

+
-

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus - commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

- Get started with Yii -
+
+

Congratulations!

-
+

You have successfully created your Yii-powered application.

- -
-
-

Heading

+

Get started with Yii

+
-

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris - condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. - Donec sed odio dui.

+ -
-

Heading

+
+
+

Heading

-

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris - condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. - Donec sed odio dui.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur.

-

View details »

-
-
-

Heading

+

Yii Documentation »

+
+
+

Heading

-

Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta - felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum - massa.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur.

+ +

Yii Forum »

+
+
+

Heading

+ +

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur.

+ +

Yii Extensions »

+
+
-

View details »

- diff --git a/apps/advanced/backend/views/site/login.php b/apps/advanced/backend/views/site/login.php index ea9f456..991d096 100644 --- a/apps/advanced/backend/views/site/login.php +++ b/apps/advanced/backend/views/site/login.php @@ -10,15 +10,21 @@ use yii\widgets\ActiveForm; $this->title = 'Login'; $this->params['breadcrumbs'][] = $this->title; ?> -

title); ?>

+