Commit 6c2a03b9546cd7f46586241406c2360d910d8d62
Merge remote-tracking branch 'origin/master'
Showing
4 changed files
with
36 additions
and
4 deletions
Show diff stats
frontend/controllers/SiteController.php
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | use artbox\catalog\models\Brand; |
6 | 6 | use artbox\catalog\models\Category; |
7 | 7 | use artbox\catalog\models\Product; |
8 | + use artbox\core\models\DummyAlias; | |
8 | 9 | use artbox\core\models\Feedback; |
9 | 10 | use artbox\weblog\models\Article; |
10 | 11 | use common\models\LoginForm; |
... | ... | @@ -59,6 +60,17 @@ |
59 | 60 | */ |
60 | 61 | public function actionIndex() |
61 | 62 | { |
63 | + /** | |
64 | + * @var \artbox\core\components\SeoComponent $seo | |
65 | + */ | |
66 | + $seo = \Yii::$app->get('seo'); | |
67 | + $seo->setAlias( | |
68 | + new DummyAlias( | |
69 | + [ | |
70 | + 'title' => \Yii::t('app', 'Главная страница'), | |
71 | + ] | |
72 | + ) | |
73 | + ); | |
62 | 74 | $categories = Category::find() |
63 | 75 | ->with('categories.lang', 'lang') |
64 | 76 | ->where([ 'level' => 0 ]) | ... | ... |
frontend/models/Order.php
... | ... | @@ -5,7 +5,8 @@ |
5 | 5 | use artbox\catalog\models\Variant; |
6 | 6 | use artbox\order\models\Delivery; |
7 | 7 | use artbox\order\models\Payment; |
8 | - | |
8 | + use yii\behaviors\BlameableBehavior; | |
9 | + | |
9 | 10 | class Order extends \artbox\order\models\Order |
10 | 11 | { |
11 | 12 | public $variantId; |
... | ... | @@ -47,6 +48,17 @@ |
47 | 48 | ); |
48 | 49 | } |
49 | 50 | |
51 | + public function behaviors() | |
52 | + { | |
53 | + return [ | |
54 | + [ | |
55 | + 'class' => BlameableBehavior::className(), | |
56 | + 'createdByAttribute' => 'user_id', | |
57 | + 'updatedByAttribute' => false, | |
58 | + ], | |
59 | + ]; | |
60 | + } | |
61 | + | |
50 | 62 | /** |
51 | 63 | * @inheritdoc |
52 | 64 | */ | ... | ... |
frontend/views/layouts/main.php
... | ... | @@ -129,6 +129,12 @@ _________________________________________________________ --> |
129 | 129 | ] |
130 | 130 | ); |
131 | 131 | } |
132 | + echo Html::a( | |
133 | + \Yii::t('app', 'Контакты'), | |
134 | + [ | |
135 | + 'site/contact', | |
136 | + ] | |
137 | + ); | |
132 | 138 | ?> |
133 | 139 | </div> |
134 | 140 | <div class="col-xs-6 right-top-nav"> |
... | ... | @@ -179,7 +185,7 @@ _________________________________________________________ --> |
179 | 185 | 'alt' => 'logo', |
180 | 186 | ] |
181 | 187 | ), |
182 | - [ '/site/index' ], | |
188 | + '/ru/', | |
183 | 189 | [ |
184 | 190 | 'class' => 'navbar-brand home', |
185 | 191 | ] |
... | ... | @@ -381,6 +387,8 @@ _________________________________________________________ --> |
381 | 387 | 'placeholder' => $loginForm->getAttributeLabel('password'), |
382 | 388 | ] |
383 | 389 | ); |
390 | + echo $login->field($loginForm, 'rememberMe') | |
391 | + ->checkbox(); | |
384 | 392 | echo Html::submitButton( |
385 | 393 | \Yii::t('app', 'Login'), |
386 | 394 | [ |
... | ... | @@ -455,7 +463,7 @@ _________________________________________________________ --> |
455 | 463 | ?> |
456 | 464 | <div class="modal fade" id="callback-modal" tabindex="-1" role="dialog" aria-labelledby="Login" aria-hidden="true"> |
457 | 465 | <div class="modal-dialog modal-sm"> |
458 | - | |
466 | + | |
459 | 467 | <div class="modal-content"> |
460 | 468 | <div class="modal-header"> |
461 | 469 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ... | ... |
frontend/views/site/index.php
... | ... | @@ -152,7 +152,7 @@ _________________________________________________________ --> |
152 | 152 | if (!empty($topItems)) { |
153 | 153 | ?> |
154 | 154 | <div class="heading text-center"> |
155 | - <h2><?php echo \Yii::t('app', 'Акции'); ?></h2> | |
155 | + <h2><?php echo \Yii::t('app', 'Топ'); ?></h2> | |
156 | 156 | </div> |
157 | 157 | <div class="product-carousel"> |
158 | 158 | <div class="homepage owl-carousel"> | ... | ... |