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