Commit 51cdef5fc32a9021de13306c734cb6864f78bfff

Authored by Eugeny Galkovskiy
2 parents 8bdabac2 c2b847bb

Merge remote-tracking branch 'origin/master'

backend/controllers/SiteController.php
1 1 <?php
2 2 namespace backend\controllers;
3   -
  3 +
  4 + use artbox\core\models\LoginForm;
4 5 use common\models\Settings;
5 6 use Yii;
6 7 use yii\web\Controller;
7 8 use yii\filters\VerbFilter;
8 9 use yii\filters\AccessControl;
9   - use common\models\LoginForm;
10   -
  10 +
11 11 /**
12 12 * Site controller
13 13 */
... ... @@ -49,7 +49,7 @@
49 49 ],
50 50 ];
51 51 }
52   -
  52 +
53 53 /**
54 54 * @inheritdoc
55 55 */
... ... @@ -61,7 +61,7 @@
61 61 ],
62 62 ];
63 63 }
64   -
  64 +
65 65 /**
66 66 * Displays homepage.
67 67 *
... ... @@ -70,14 +70,14 @@
70 70 public function actionIndex()
71 71 {
72 72 $settings = Settings::getInstance();
73   -
  73 +
74 74 if (empty( $settings->analytics_key )) {
75 75 return $this->render('instruction');
76 76 } else {
77 77 return $this->render('index');
78 78 }
79 79 }
80   -
  80 +
81 81 /**
82 82 * Login action.
83 83 *
... ... @@ -88,7 +88,7 @@
88 88 if (!Yii::$app->user->isGuest) {
89 89 return $this->goHome();
90 90 }
91   -
  91 +
92 92 $model = new LoginForm();
93 93 if ($model->load(Yii::$app->request->post()) && $model->login()) {
94 94 return $this->goBack();
... ... @@ -101,7 +101,7 @@
101 101 );
102 102 }
103 103 }
104   -
  104 +
105 105 /**
106 106 * Logout action.
107 107 *
... ... @@ -110,7 +110,7 @@
110 110 public function actionLogout()
111 111 {
112 112 Yii::$app->user->logout();
113   -
  113 +
114 114 return $this->goHome();
115 115 }
116 116 }
... ...
backend/views/layouts/menu_items.php
... ... @@ -139,12 +139,12 @@
139 139 [
140 140 'label' => \Yii::t('catalog', 'Categories'),
141 141 'url' => [ 'blog-category/index' ],
142   - 'icon' => 'file-text',
  142 + 'icon' => 'book',
143 143 ],
144 144 [
145 145 'label' => \Yii::t('catalog', 'Tags'),
146 146 'url' => [ 'blog-tag/index' ],
147   - 'icon' => 'file-text',
  147 + 'icon' => 'tag',
148 148 ],
149 149 ],
150 150 ],
... ...