diff --git a/backend/config/main.php b/backend/config/main.php
index a6580a0..299ebda 100755
--- a/backend/config/main.php
+++ b/backend/config/main.php
@@ -1,4 +1,6 @@
[
- 'assetManager' => [
+ 'assetManager' => [
'bundles' => [
'yiister\gentelella\assets\ThemeAsset' => [
'sourcePath' => '@backend/assets/',
@@ -46,22 +48,18 @@
],
],
],
- 'filedb' => [
- 'class' => 'yii2tech\filedb\Connection',
- 'path' => '@common/config',
- ],
- 'imagemanager' => [
+ 'imagemanager' => [
'class' => 'noam148\imagemanager\components\ImageManagerGetPath',
'mediaPath' => dirname(dirname(__DIR__)) . '/storage',
'cachePath' => 'assets/images',
'useFilename' => true,
'absoluteUrl' => false,
],
- 'request' => [
+ 'request' => [
'csrfParam' => '_csrf-backend',
'baseUrl' => '/admin',
],
- 'user' => [
+ 'user' => [
'identityClass' => 'artweb\artbox\core\models\User',
'enableAutoLogin' => true,
'identityCookie' => [
@@ -69,11 +67,11 @@
'httpOnly' => true,
],
],
- 'session' => [
+ 'session' => [
// this is the name of the session cookie used for login on the backend
'name' => 'advanced-backend',
],
- 'log' => [
+ 'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
@@ -85,10 +83,17 @@
],
],
],
- 'errorHandler' => [
+ 'errorHandler' => [
'errorAction' => 'site/error',
],
- 'urlManager' => [
+ 'urlManager' => [
+ 'enablePrettyUrl' => true,
+ 'showScriptName' => false,
+ 'rules' => [],
+ ],
+ 'urlManagerFrontend' => [
+ 'class' => UrlManager::className(),
+ 'baseUrl' => '/',
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [],
diff --git a/backend/views/layouts/main.php b/backend/views/layouts/main.php
index 17d0881..ba1948a 100755
--- a/backend/views/layouts/main.php
+++ b/backend/views/layouts/main.php
@@ -9,9 +9,11 @@
use artweb\artbox\core\models\User;
use artweb\artbox\core\widgets\FeedbackWidget;
use artweb\artbox\core\widgets\FlashWidget;
- use yii\helpers\Html;
+ use yii\bootstrap\Html;
+ use yii\web\UrlManager;
use yii\web\View;
use yii\widgets\Breadcrumbs;
+ use yiister\gentelella\widgets\Menu;
yiister\gentelella\assets\Asset::register($this);
ArtboxCoreAsset::register($this);
@@ -19,6 +21,7 @@
* @var User $user
*/
$user = \Yii::$app->user->identity;
+ $userData = $user->ensureExistance();
?>
beginPage(); ?>
@@ -31,11 +34,6 @@
= Html::csrfMetaTags() ?>
= Html::encode($this->title) ?>
head() ?>
-
-
beginBody(); ?>
@@ -47,19 +45,55 @@
@@ -247,10 +239,10 @@
= Breadcrumbs::widget(
[
- 'links' => isset($this->params[ 'breadcrumbs' ]) ? $this->params[ 'breadcrumbs' ] : [],
+ 'links' => isset( $this->params[ 'breadcrumbs' ] ) ? $this->params[ 'breadcrumbs' ] : [],
]
) ?>
-
+
= $content ?>
diff --git a/common/config/main.php b/common/config/main.php
index 58e25bc..e5b44e7 100644
--- a/common/config/main.php
+++ b/common/config/main.php
@@ -1,17 +1,21 @@
dirname(dirname(__DIR__)) . '/vendor',
- 'components' => [
- 'cache' => [
- 'class' => 'yii\caching\FileCache',
- ],
- 'i18n' => [
- 'translations' => [
- 'core' => [
- 'class' => 'yii\i18n\PhpMessageSource',
- 'basePath' => '@artbox-core/messages',
+ return [
+ 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
+ 'components' => [
+ 'cache' => [
+ 'class' => 'yii\caching\FileCache',
+ ],
+ 'i18n' => [
+ 'translations' => [
+ 'core' => [
+ 'class' => 'yii\i18n\PhpMessageSource',
+ 'basePath' => '@artbox-core/messages',
+ ],
],
],
+ 'filedb' => [
+ 'class' => 'yii2tech\filedb\Connection',
+ 'path' => '@common/config',
+ ],
],
- ],
-];
+ ];
diff --git a/common/config/settings.php b/common/config/settings.php
index 49eeb3f..a90b668 100644
--- a/common/config/settings.php
+++ b/common/config/settings.php
@@ -5,5 +5,16 @@ return [
'id' => '1',
'name' => 'Admin321',
'description' => 'Site administrator',
+ 'analytics' => '
+
+',
],
];
\ No newline at end of file
diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php
index 2a799f3..64e566e 100644
--- a/frontend/views/layouts/main.php
+++ b/frontend/views/layouts/main.php
@@ -1,82 +1,111 @@
user->identity;
?>
beginPage() ?>
-
-
-
- = Html::csrfMetaTags() ?>
- = Html::encode($this->title) ?>
- head() ?>
-
-
-beginBody() ?>
-
-
- 'My Company',
- 'brandUrl' => Yii::$app->homeUrl,
- 'options' => [
- 'class' => 'navbar-inverse navbar-fixed-top',
- ],
- ]);
- $menuItems = [
- ['label' => 'Home', 'url' => ['/site/index']],
- ['label' => 'About', 'url' => ['/site/about']],
- ['label' => 'Contact', 'url' => ['/site/contact']],
- ];
- if (Yii::$app->user->isGuest) {
- $menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']];
- $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
- } else {
- $menuItems[] = '
'
- . Html::beginForm(['/site/logout'], 'post')
- . Html::submitButton(
- 'Logout (' . Yii::$app->user->identity->username . ')',
- ['class' => 'btn btn-link logout']
- )
- . Html::endForm()
- . '';
- }
- echo Nav::widget([
- 'options' => ['class' => 'navbar-nav navbar-right'],
- 'items' => $menuItems,
- ]);
- NavBar::end();
- ?>
-
-
- = Breadcrumbs::widget([
- 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
- ]) ?>
- = Alert::widget() ?>
- = $content ?>
-
-
-
-
-
-endBody() ?>
-
+
+
+
+ = Html::csrfMetaTags() ?>
+ = Html::encode($this->title) ?>
+ head() ?>
+
+
+ beginBody() ?>
+
+
+ 'My Company',
+ 'brandUrl' => Yii::$app->homeUrl,
+ 'options' => [
+ 'class' => 'navbar-inverse navbar-fixed-top',
+ ],
+ ]
+ );
+ $menuItems = [
+ [
+ 'label' => 'Home',
+ 'url' => [ '/site/index' ],
+ ],
+ [
+ 'label' => 'About',
+ 'url' => [ '/site/about' ],
+ ],
+ [
+ 'label' => 'Contact',
+ 'url' => [ '/site/contact' ],
+ ],
+ ];
+ if (Yii::$app->user->isGuest) {
+ $menuItems[] = [
+ 'label' => 'Signup',
+ 'url' => [ '/site/signup' ],
+ ];
+ $menuItems[] = [
+ 'label' => 'Login',
+ 'url' => [ '/site/login' ],
+ ];
+ } else {
+ $menuItems[] = '
' . Html::beginForm([ '/site/logout' ], 'post') . Html::submitButton(
+ 'Logout (' . $user->username . ')',
+ [ 'class' => 'btn btn-link logout' ]
+ ) . Html::endForm() . '';
+ }
+ echo Nav::widget(
+ [
+ 'options' => [ 'class' => 'navbar-nav navbar-right' ],
+ 'items' => $menuItems,
+ ]
+ );
+ NavBar::end();
+ ?>
+
+
+ = Breadcrumbs::widget(
+ [
+ 'links' => isset( $this->params[ 'breadcrumbs' ] ) ? $this->params[ 'breadcrumbs' ] : [],
+ ]
+ ) ?>
+ = Alert::widget() ?>
+ = $content ?>
+
+
+
+
+
+ endBody() ?>
+ analytics )) {
+ echo $settings->analytics;
+ }
+ ?>
+
endPage() ?>
--
libgit2 0.21.4