Commit 5baec053ee8a80441b2e048bd96fe11963031ab0

Authored by Anastasia
1 parent 7def290f

stock

messages/ru/stock.php
... ... @@ -27,5 +27,6 @@
27 27 'Count' => 'Количество',
28 28 'Add Product' => 'Добавить товар',
29 29 'Update Count' => 'Обновить количество',
  30 + 'Shop' => 'Магазин (показывать на сайте)'
30 31 ]
31 32 ?>
32 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 13 'sort' => $this->integer(),
14 14 'status' => $this->boolean()
15 15 ->defaultValue(true),
  16 + 'shop' => $this->boolean()
  17 + ->defaultValue(true),
16 18 'coords' => $this->string(),
17 19 ]);
18 20  
... ...
models/Shop.php
... ... @@ -60,6 +60,10 @@
60 60 'boolean',
61 61 ],
62 62 [
  63 + [ 'shop' ],
  64 + 'boolean',
  65 + ],
  66 + [
63 67 [
64 68 'mode',
65 69 'modeStr',
... ... @@ -94,6 +98,8 @@
94 98 'city_id' => 'City ID',
95 99 'sort' => \Yii::t('stock', 'Sort'),
96 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 127  
128 128 <?= $form->field($model, 'status')
129 129 ->checkbox() ?>
  130 + <?= $form->field($model, 'shop')
  131 + ->checkbox() ?>
130 132  
131 133 <div class="form-group">
132 134 <?= Html::submitButton(
... ...