Commit 5baec053ee8a80441b2e048bd96fe11963031ab0
1 parent
7def290f
stock
Showing
4 changed files
with
11 additions
and
0 deletions
Show diff stats
messages/ru/stock.php
@@ -27,5 +27,6 @@ | @@ -27,5 +27,6 @@ | ||
27 | 'Count' => 'Количество', | 27 | 'Count' => 'Количество', |
28 | 'Add Product' => 'Добавить товар', | 28 | 'Add Product' => 'Добавить товар', |
29 | 'Update Count' => 'Обновить количество', | 29 | 'Update Count' => 'Обновить количество', |
30 | + 'Shop' => 'Магазин (показывать на сайте)' | ||
30 | ] | 31 | ] |
31 | ?> | 32 | ?> |
32 | \ No newline at end of file | 33 | \ No newline at end of file |
migrations/m170721_135629_create_table_shops.php
@@ -13,6 +13,8 @@ class m170721_135629_create_table_shops extends Migration | @@ -13,6 +13,8 @@ class m170721_135629_create_table_shops extends Migration | ||
13 | 'sort' => $this->integer(), | 13 | 'sort' => $this->integer(), |
14 | 'status' => $this->boolean() | 14 | 'status' => $this->boolean() |
15 | ->defaultValue(true), | 15 | ->defaultValue(true), |
16 | + 'shop' => $this->boolean() | ||
17 | + ->defaultValue(true), | ||
16 | 'coords' => $this->string(), | 18 | 'coords' => $this->string(), |
17 | ]); | 19 | ]); |
18 | 20 |
models/Shop.php
@@ -60,6 +60,10 @@ | @@ -60,6 +60,10 @@ | ||
60 | 'boolean', | 60 | 'boolean', |
61 | ], | 61 | ], |
62 | [ | 62 | [ |
63 | + [ 'shop' ], | ||
64 | + 'boolean', | ||
65 | + ], | ||
66 | + [ | ||
63 | [ | 67 | [ |
64 | 'mode', | 68 | 'mode', |
65 | 'modeStr', | 69 | 'modeStr', |
@@ -94,6 +98,8 @@ | @@ -94,6 +98,8 @@ | ||
94 | 'city_id' => 'City ID', | 98 | 'city_id' => 'City ID', |
95 | 'sort' => \Yii::t('stock', 'Sort'), | 99 | 'sort' => \Yii::t('stock', 'Sort'), |
96 | 'status' => \Yii::t('stock', 'Status'), | 100 | 'status' => \Yii::t('stock', 'Status'), |
101 | + 'shop' => \Yii::t('stock', 'Shop'), | ||
102 | + | ||
97 | ]; | 103 | ]; |
98 | } | 104 | } |
99 | 105 |
views/shop/_form.php
@@ -127,6 +127,8 @@ | @@ -127,6 +127,8 @@ | ||
127 | 127 | ||
128 | <?= $form->field($model, 'status') | 128 | <?= $form->field($model, 'status') |
129 | ->checkbox() ?> | 129 | ->checkbox() ?> |
130 | + <?= $form->field($model, 'shop') | ||
131 | + ->checkbox() ?> | ||
130 | 132 | ||
131 | <div class="form-group"> | 133 | <div class="form-group"> |
132 | <?= Html::submitButton( | 134 | <?= Html::submitButton( |