Commit c77aa1283c71f003dd3c77b1e29abe3780e9067e
1 parent
0084d336
Importers CRUD
Showing
19 changed files
with
16 additions
and
8 deletions
 
Show diff stats
backend/controllers/BrandsReplaceController.php
| @@ -14,6 +14,8 @@ use yii\filters\VerbFilter; | @@ -14,6 +14,8 @@ use yii\filters\VerbFilter; | ||
| 14 | */ | 14 | */ | 
| 15 | class BrandsReplaceController extends Controller | 15 | class BrandsReplaceController extends Controller | 
| 16 | { | 16 | { | 
| 17 | + | ||
| 18 | + public $layout = "/column"; | ||
| 17 | public function behaviors() | 19 | public function behaviors() | 
| 18 | { | 20 | { | 
| 19 | return [ | 21 | return [ | 
backend/controllers/DetailsController.php
| @@ -34,7 +34,6 @@ class DetailsController extends Controller | @@ -34,7 +34,6 @@ class DetailsController extends Controller | ||
| 34 | { | 34 | { | 
| 35 | $searchModel = new DetailsSearch(); | 35 | $searchModel = new DetailsSearch(); | 
| 36 | $dataProvider = $searchModel->search(Yii::$app->request->queryParams); | 36 | $dataProvider = $searchModel->search(Yii::$app->request->queryParams); | 
| 37 | - | ||
| 38 | return $this->render('index', [ | 37 | return $this->render('index', [ | 
| 39 | 'searchModel' => $searchModel, | 38 | 'searchModel' => $searchModel, | 
| 40 | 'dataProvider' => $dataProvider, | 39 | 'dataProvider' => $dataProvider, | 
backend/controllers/DetailsCrossesController.php
| @@ -14,6 +14,7 @@ use yii\filters\VerbFilter; | @@ -14,6 +14,7 @@ use yii\filters\VerbFilter; | ||
| 14 | */ | 14 | */ | 
| 15 | class DetailsCrossesController extends Controller | 15 | class DetailsCrossesController extends Controller | 
| 16 | { | 16 | { | 
| 17 | + public $layout = "/column"; | ||
| 17 | public function behaviors() | 18 | public function behaviors() | 
| 18 | { | 19 | { | 
| 19 | return [ | 20 | return [ | 
backend/views/accounts/index.php
| @@ -22,6 +22,7 @@ $this->params['breadcrumbs'][] = $this->title; | @@ -22,6 +22,7 @@ $this->params['breadcrumbs'][] = $this->title; | ||
| 22 | <?= GridView::widget([ | 22 | <?= GridView::widget([ | 
| 23 | 'dataProvider' => $dataProvider, | 23 | 'dataProvider' => $dataProvider, | 
| 24 | 'filterModel' => $searchModel, | 24 | 'filterModel' => $searchModel, | 
| 25 | + 'layout'=>"{pager}\n{items}", | ||
| 25 | 'columns' => [ | 26 | 'columns' => [ | 
| 26 | ['class' => 'yii\grid\SerialColumn'], | 27 | ['class' => 'yii\grid\SerialColumn'], | 
| 27 | 28 | 
backend/views/brands_replace/_form.php renamed to backend/views/brands-replace/_form.php
backend/views/brands_replace/_search.php renamed to backend/views/brands-replace/_search.php
backend/views/brands_replace/create.php renamed to backend/views/brands-replace/create.php
backend/views/brands_replace/index.php renamed to backend/views/brands-replace/index.php
backend/views/brands_replace/update.php renamed to backend/views/brands-replace/update.php
backend/views/brands_replace/view.php renamed to backend/views/brands-replace/view.php
backend/views/details_crosses/_form.php renamed to backend/views/details-crosses/_form.php
backend/views/details_crosses/_search.php renamed to backend/views/details-crosses/_search.php
backend/views/details_crosses/create.php renamed to backend/views/details-crosses/create.php
backend/views/details_crosses/index.php renamed to backend/views/details-crosses/index.php
backend/views/details_crosses/update.php renamed to backend/views/details-crosses/update.php
backend/views/details_crosses/view.php renamed to backend/views/details-crosses/view.php
backend/views/details/index.php
| @@ -22,6 +22,7 @@ $this->params['breadcrumbs'][] = $this->title; | @@ -22,6 +22,7 @@ $this->params['breadcrumbs'][] = $this->title; | ||
| 22 | <?= GridView::widget([ | 22 | <?= GridView::widget([ | 
| 23 | 'dataProvider' => $dataProvider, | 23 | 'dataProvider' => $dataProvider, | 
| 24 | 'filterModel' => $searchModel, | 24 | 'filterModel' => $searchModel, | 
| 25 | + 'layout'=>"{pager}\n{items}", | ||
| 25 | 'columns' => [ | 26 | 'columns' => [ | 
| 26 | ['class' => 'yii\grid\SerialColumn'], | 27 | ['class' => 'yii\grid\SerialColumn'], | 
| 27 | 28 | 
backend/views/layouts/column.php
| @@ -305,10 +305,10 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -305,10 +305,10 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
| 305 | ], | 305 | ], | 
| 306 | ], | 306 | ], | 
| 307 | ['label' => 'Справочник', 'url' => ['#'], 'items' => [ | 307 | ['label' => 'Справочник', 'url' => ['#'], 'items' => [ | 
| 308 | - ['label' => 'Замены брендов', 'url' => ['currency/index']], | ||
| 309 | - ['label' => 'Карточки товаров', 'url' => ['currency/index']], | ||
| 310 | - ['label' => 'Товары поставщиков', 'url' => ['currency/index']], | ||
| 311 | - ['label' => 'Кроссы', 'url' => ['currency/index']], | 308 | + ['label' => 'Замены брендов', 'url' => ['brands-replace/index']], | 
| 309 | + ['label' => 'Карточки товаров', 'url' => ['#']], | ||
| 310 | + ['label' => 'Товары поставщиков', 'url' => ['details/index']], | ||
| 311 | + ['label' => 'Кроссы', 'url' => ['details-crosses/index']], | ||
| 312 | ['label' => 'Бренды', 'url' => ['currency/index']], | 312 | ['label' => 'Бренды', 'url' => ['currency/index']], | 
| 313 | ['label' => 'Марки авто', 'url' => ['currency/index']], | 313 | ['label' => 'Марки авто', 'url' => ['currency/index']], | 
| 314 | ['label' => 'Статусы заказов', 'url' => ['currency/index']], | 314 | ['label' => 'Статусы заказов', 'url' => ['currency/index']], | 
| @@ -319,6 +319,10 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -319,6 +319,10 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
| 319 | ['label' => 'Офисы', 'url' => ['currency/index']], | 319 | ['label' => 'Офисы', 'url' => ['currency/index']], | 
| 320 | ], | 320 | ], | 
| 321 | ], | 321 | ], | 
| 322 | + ['label' => 'Справочник', 'url' => ['#'], 'items' => [ | ||
| 323 | + ['label' => 'Замены брендов', 'url' => ['currency/index']], | ||
| 324 | + ], | ||
| 325 | + ], | ||
| 322 | 326 | ||
| 323 | ], | 327 | ], | 
| 324 | 'submenuTemplate' => "\n<ul class='treeview-menu'>\n{items}\n</ul>\n", | 328 | 'submenuTemplate' => "\n<ul class='treeview-menu'>\n{items}\n</ul>\n", | 
common/models/Currency.php
| @@ -46,10 +46,10 @@ class Currency extends \yii\db\ActiveRecord | @@ -46,10 +46,10 @@ class Currency extends \yii\db\ActiveRecord | ||
| 46 | { | 46 | { | 
| 47 | return [ | 47 | return [ | 
| 48 | 'id' => 'ID', | 48 | 'id' => 'ID', | 
| 49 | - 'name' => 'Name', | ||
| 50 | - 'rate' => 'Rate', | 49 | + 'name' => 'Название', | 
| 50 | + 'rate' => 'Курс', | ||
| 51 | 'is_default' => 'Is Default', | 51 | 'is_default' => 'Is Default', | 
| 52 | - 'timestamp' => 'Timestamp', | 52 | + 'timestamp' => 'Дата обновления', | 
| 53 | ]; | 53 | ]; | 
| 54 | } | 54 | } | 
| 55 | } | 55 | } |