diff --git a/backend/controllers/BrandsReplaceController.php b/backend/controllers/BrandsReplaceController.php index 23500a3..aeb940b 100644 --- a/backend/controllers/BrandsReplaceController.php +++ b/backend/controllers/BrandsReplaceController.php @@ -14,6 +14,8 @@ use yii\filters\VerbFilter; */ class BrandsReplaceController extends Controller { + + public $layout = "/column"; public function behaviors() { return [ diff --git a/backend/controllers/DetailsController.php b/backend/controllers/DetailsController.php index fcd8a77..fd5e6b2 100644 --- a/backend/controllers/DetailsController.php +++ b/backend/controllers/DetailsController.php @@ -34,7 +34,6 @@ class DetailsController extends Controller { $searchModel = new DetailsSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); - return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, diff --git a/backend/controllers/DetailsCrossesController.php b/backend/controllers/DetailsCrossesController.php index 3202293..b967177 100644 --- a/backend/controllers/DetailsCrossesController.php +++ b/backend/controllers/DetailsCrossesController.php @@ -14,6 +14,7 @@ use yii\filters\VerbFilter; */ class DetailsCrossesController extends Controller { + public $layout = "/column"; public function behaviors() { return [ diff --git a/backend/views/accounts/index.php b/backend/views/accounts/index.php index 5f99fcd..2aa005b 100644 --- a/backend/views/accounts/index.php +++ b/backend/views/accounts/index.php @@ -22,6 +22,7 @@ $this->params['breadcrumbs'][] = $this->title; $dataProvider, 'filterModel' => $searchModel, + 'layout'=>"{pager}\n{items}", 'columns' => [ ['class' => 'yii\grid\SerialColumn'], diff --git a/backend/views/brands-replace/_form.php b/backend/views/brands-replace/_form.php new file mode 100644 index 0000000..b878797 --- /dev/null +++ b/backend/views/brands-replace/_form.php @@ -0,0 +1,29 @@ + + +
+ + + + field($model, 'from_brand')->textInput(['maxlength' => true]) ?> + + field($model, 'to_brand')->textInput(['maxlength' => true]) ?> + + field($model, 'finish')->textInput() ?> + + field($model, 'timestamp')->textInput() ?> + +
+ isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/backend/views/brands-replace/_search.php b/backend/views/brands-replace/_search.php new file mode 100644 index 0000000..2537d37 --- /dev/null +++ b/backend/views/brands-replace/_search.php @@ -0,0 +1,35 @@ + + + diff --git a/backend/views/brands-replace/create.php b/backend/views/brands-replace/create.php new file mode 100644 index 0000000..0966038 --- /dev/null +++ b/backend/views/brands-replace/create.php @@ -0,0 +1,21 @@ +title = 'Create Brands Replace'; +$this->params['breadcrumbs'][] = ['label' => 'Brands Replaces', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/brands-replace/index.php b/backend/views/brands-replace/index.php new file mode 100644 index 0000000..7f7ccec --- /dev/null +++ b/backend/views/brands-replace/index.php @@ -0,0 +1,38 @@ +title = 'Brands Replaces'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ + $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'id', + 'from_brand', + 'to_brand', + 'finish', + 'timestamp', + + ['class' => 'yii\grid\ActionColumn'], + ], + ]); ?> + +
diff --git a/backend/views/brands-replace/update.php b/backend/views/brands-replace/update.php new file mode 100644 index 0000000..7594cfa --- /dev/null +++ b/backend/views/brands-replace/update.php @@ -0,0 +1,21 @@ +title = 'Update Brands Replace: ' . ' ' . $model->from_brand; +$this->params['breadcrumbs'][] = ['label' => 'Brands Replaces', 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->from_brand, 'url' => ['view', 'from_brand' => $model->from_brand, 'to_brand' => $model->to_brand]]; +$this->params['breadcrumbs'][] = 'Update'; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/brands-replace/view.php b/backend/views/brands-replace/view.php new file mode 100644 index 0000000..209e526 --- /dev/null +++ b/backend/views/brands-replace/view.php @@ -0,0 +1,39 @@ +title = $model->from_brand; +$this->params['breadcrumbs'][] = ['label' => 'Brands Replaces', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->from_brand, 'to_brand' => $model->to_brand], ['class' => 'btn btn-primary']) ?> + $model->from_brand, 'to_brand' => $model->to_brand], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => 'Are you sure you want to delete this item?', + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'id', + 'from_brand', + 'to_brand', + 'finish', + 'timestamp', + ], + ]) ?> + +
diff --git a/backend/views/brands_replace/_form.php b/backend/views/brands_replace/_form.php deleted file mode 100644 index b878797..0000000 --- a/backend/views/brands_replace/_form.php +++ /dev/null @@ -1,29 +0,0 @@ - - -
- - - - field($model, 'from_brand')->textInput(['maxlength' => true]) ?> - - field($model, 'to_brand')->textInput(['maxlength' => true]) ?> - - field($model, 'finish')->textInput() ?> - - field($model, 'timestamp')->textInput() ?> - -
- isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> -
- - - -
diff --git a/backend/views/brands_replace/_search.php b/backend/views/brands_replace/_search.php deleted file mode 100644 index 2537d37..0000000 --- a/backend/views/brands_replace/_search.php +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/backend/views/brands_replace/create.php b/backend/views/brands_replace/create.php deleted file mode 100644 index 0966038..0000000 --- a/backend/views/brands_replace/create.php +++ /dev/null @@ -1,21 +0,0 @@ -title = 'Create Brands Replace'; -$this->params['breadcrumbs'][] = ['label' => 'Brands Replaces', 'url' => ['index']]; -$this->params['breadcrumbs'][] = $this->title; -?> -
- -

title) ?>

- - render('_form', [ - 'model' => $model, - ]) ?> - -
diff --git a/backend/views/brands_replace/index.php b/backend/views/brands_replace/index.php deleted file mode 100644 index 7f7ccec..0000000 --- a/backend/views/brands_replace/index.php +++ /dev/null @@ -1,38 +0,0 @@ -title = 'Brands Replaces'; -$this->params['breadcrumbs'][] = $this->title; -?> -
- -

title) ?>

- render('_search', ['model' => $searchModel]); ?> - -

- 'btn btn-success']) ?> -

- - $dataProvider, - 'filterModel' => $searchModel, - 'columns' => [ - ['class' => 'yii\grid\SerialColumn'], - - 'id', - 'from_brand', - 'to_brand', - 'finish', - 'timestamp', - - ['class' => 'yii\grid\ActionColumn'], - ], - ]); ?> - -
diff --git a/backend/views/brands_replace/update.php b/backend/views/brands_replace/update.php deleted file mode 100644 index 7594cfa..0000000 --- a/backend/views/brands_replace/update.php +++ /dev/null @@ -1,21 +0,0 @@ -title = 'Update Brands Replace: ' . ' ' . $model->from_brand; -$this->params['breadcrumbs'][] = ['label' => 'Brands Replaces', 'url' => ['index']]; -$this->params['breadcrumbs'][] = ['label' => $model->from_brand, 'url' => ['view', 'from_brand' => $model->from_brand, 'to_brand' => $model->to_brand]]; -$this->params['breadcrumbs'][] = 'Update'; -?> -
- -

title) ?>

- - render('_form', [ - 'model' => $model, - ]) ?> - -
diff --git a/backend/views/brands_replace/view.php b/backend/views/brands_replace/view.php deleted file mode 100644 index 209e526..0000000 --- a/backend/views/brands_replace/view.php +++ /dev/null @@ -1,39 +0,0 @@ -title = $model->from_brand; -$this->params['breadcrumbs'][] = ['label' => 'Brands Replaces', 'url' => ['index']]; -$this->params['breadcrumbs'][] = $this->title; -?> -
- -

title) ?>

- -

- $model->from_brand, 'to_brand' => $model->to_brand], ['class' => 'btn btn-primary']) ?> - $model->from_brand, 'to_brand' => $model->to_brand], [ - 'class' => 'btn btn-danger', - 'data' => [ - 'confirm' => 'Are you sure you want to delete this item?', - 'method' => 'post', - ], - ]) ?> -

- - $model, - 'attributes' => [ - 'id', - 'from_brand', - 'to_brand', - 'finish', - 'timestamp', - ], - ]) ?> - -
diff --git a/backend/views/details-crosses/_form.php b/backend/views/details-crosses/_form.php new file mode 100644 index 0000000..9ac3123 --- /dev/null +++ b/backend/views/details-crosses/_form.php @@ -0,0 +1,31 @@ + + +
+ + + + field($model, 'ARTICLE')->textInput(['maxlength' => true]) ?> + + field($model, 'BRAND')->textInput(['maxlength' => true]) ?> + + field($model, 'CROSS_BRAND')->textInput(['maxlength' => true]) ?> + + field($model, 'CROSS_ARTICLE')->textInput(['maxlength' => true]) ?> + + field($model, 'timestamp')->textInput() ?> + +
+ isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/backend/views/details-crosses/_search.php b/backend/views/details-crosses/_search.php new file mode 100644 index 0000000..73e7bc5 --- /dev/null +++ b/backend/views/details-crosses/_search.php @@ -0,0 +1,37 @@ + + + diff --git a/backend/views/details-crosses/create.php b/backend/views/details-crosses/create.php new file mode 100644 index 0000000..01f22d1 --- /dev/null +++ b/backend/views/details-crosses/create.php @@ -0,0 +1,21 @@ +title = 'Create Details Crosses'; +$this->params['breadcrumbs'][] = ['label' => 'Details Crosses', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/details-crosses/index.php b/backend/views/details-crosses/index.php new file mode 100644 index 0000000..15ff4ad --- /dev/null +++ b/backend/views/details-crosses/index.php @@ -0,0 +1,39 @@ +title = 'Details Crosses'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ + $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'ID', + 'ARTICLE', + 'BRAND', + 'CROSS_BRAND', + 'CROSS_ARTICLE', + // 'timestamp', + + ['class' => 'yii\grid\ActionColumn'], + ], + ]); ?> + +
diff --git a/backend/views/details-crosses/update.php b/backend/views/details-crosses/update.php new file mode 100644 index 0000000..fb71e6f --- /dev/null +++ b/backend/views/details-crosses/update.php @@ -0,0 +1,21 @@ +title = 'Update Details Crosses: ' . ' ' . $model->ARTICLE; +$this->params['breadcrumbs'][] = ['label' => 'Details Crosses', 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->ARTICLE, 'url' => ['view', 'ARTICLE' => $model->ARTICLE, 'BRAND' => $model->BRAND, 'CROSS_BRAND' => $model->CROSS_BRAND, 'CROSS_ARTICLE' => $model->CROSS_ARTICLE]]; +$this->params['breadcrumbs'][] = 'Update'; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/details-crosses/view.php b/backend/views/details-crosses/view.php new file mode 100644 index 0000000..eb77583 --- /dev/null +++ b/backend/views/details-crosses/view.php @@ -0,0 +1,40 @@ +title = $model->ARTICLE; +$this->params['breadcrumbs'][] = ['label' => 'Details Crosses', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->ARTICLE, 'BRAND' => $model->BRAND, 'CROSS_BRAND' => $model->CROSS_BRAND, 'CROSS_ARTICLE' => $model->CROSS_ARTICLE], ['class' => 'btn btn-primary']) ?> + $model->ARTICLE, 'BRAND' => $model->BRAND, 'CROSS_BRAND' => $model->CROSS_BRAND, 'CROSS_ARTICLE' => $model->CROSS_ARTICLE], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => 'Are you sure you want to delete this item?', + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'ID', + 'ARTICLE', + 'BRAND', + 'CROSS_BRAND', + 'CROSS_ARTICLE', + 'timestamp', + ], + ]) ?> + +
diff --git a/backend/views/details/index.php b/backend/views/details/index.php index ee60635..3f4e61e 100644 --- a/backend/views/details/index.php +++ b/backend/views/details/index.php @@ -22,6 +22,7 @@ $this->params['breadcrumbs'][] = $this->title; $dataProvider, 'filterModel' => $searchModel, + 'layout'=>"{pager}\n{items}", 'columns' => [ ['class' => 'yii\grid\SerialColumn'], diff --git a/backend/views/details_crosses/_form.php b/backend/views/details_crosses/_form.php deleted file mode 100644 index 9ac3123..0000000 --- a/backend/views/details_crosses/_form.php +++ /dev/null @@ -1,31 +0,0 @@ - - -
- - - - field($model, 'ARTICLE')->textInput(['maxlength' => true]) ?> - - field($model, 'BRAND')->textInput(['maxlength' => true]) ?> - - field($model, 'CROSS_BRAND')->textInput(['maxlength' => true]) ?> - - field($model, 'CROSS_ARTICLE')->textInput(['maxlength' => true]) ?> - - field($model, 'timestamp')->textInput() ?> - -
- isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> -
- - - -
diff --git a/backend/views/details_crosses/_search.php b/backend/views/details_crosses/_search.php deleted file mode 100644 index 73e7bc5..0000000 --- a/backend/views/details_crosses/_search.php +++ /dev/null @@ -1,37 +0,0 @@ - - - diff --git a/backend/views/details_crosses/create.php b/backend/views/details_crosses/create.php deleted file mode 100644 index 01f22d1..0000000 --- a/backend/views/details_crosses/create.php +++ /dev/null @@ -1,21 +0,0 @@ -title = 'Create Details Crosses'; -$this->params['breadcrumbs'][] = ['label' => 'Details Crosses', 'url' => ['index']]; -$this->params['breadcrumbs'][] = $this->title; -?> -
- -

title) ?>

- - render('_form', [ - 'model' => $model, - ]) ?> - -
diff --git a/backend/views/details_crosses/index.php b/backend/views/details_crosses/index.php deleted file mode 100644 index 15ff4ad..0000000 --- a/backend/views/details_crosses/index.php +++ /dev/null @@ -1,39 +0,0 @@ -title = 'Details Crosses'; -$this->params['breadcrumbs'][] = $this->title; -?> -
- -

title) ?>

- render('_search', ['model' => $searchModel]); ?> - -

- 'btn btn-success']) ?> -

- - $dataProvider, - 'filterModel' => $searchModel, - 'columns' => [ - ['class' => 'yii\grid\SerialColumn'], - - 'ID', - 'ARTICLE', - 'BRAND', - 'CROSS_BRAND', - 'CROSS_ARTICLE', - // 'timestamp', - - ['class' => 'yii\grid\ActionColumn'], - ], - ]); ?> - -
diff --git a/backend/views/details_crosses/update.php b/backend/views/details_crosses/update.php deleted file mode 100644 index fb71e6f..0000000 --- a/backend/views/details_crosses/update.php +++ /dev/null @@ -1,21 +0,0 @@ -title = 'Update Details Crosses: ' . ' ' . $model->ARTICLE; -$this->params['breadcrumbs'][] = ['label' => 'Details Crosses', 'url' => ['index']]; -$this->params['breadcrumbs'][] = ['label' => $model->ARTICLE, 'url' => ['view', 'ARTICLE' => $model->ARTICLE, 'BRAND' => $model->BRAND, 'CROSS_BRAND' => $model->CROSS_BRAND, 'CROSS_ARTICLE' => $model->CROSS_ARTICLE]]; -$this->params['breadcrumbs'][] = 'Update'; -?> -
- -

title) ?>

- - render('_form', [ - 'model' => $model, - ]) ?> - -
diff --git a/backend/views/details_crosses/view.php b/backend/views/details_crosses/view.php deleted file mode 100644 index eb77583..0000000 --- a/backend/views/details_crosses/view.php +++ /dev/null @@ -1,40 +0,0 @@ -title = $model->ARTICLE; -$this->params['breadcrumbs'][] = ['label' => 'Details Crosses', 'url' => ['index']]; -$this->params['breadcrumbs'][] = $this->title; -?> -
- -

title) ?>

- -

- $model->ARTICLE, 'BRAND' => $model->BRAND, 'CROSS_BRAND' => $model->CROSS_BRAND, 'CROSS_ARTICLE' => $model->CROSS_ARTICLE], ['class' => 'btn btn-primary']) ?> - $model->ARTICLE, 'BRAND' => $model->BRAND, 'CROSS_BRAND' => $model->CROSS_BRAND, 'CROSS_ARTICLE' => $model->CROSS_ARTICLE], [ - 'class' => 'btn btn-danger', - 'data' => [ - 'confirm' => 'Are you sure you want to delete this item?', - 'method' => 'post', - ], - ]) ?> -

- - $model, - 'attributes' => [ - 'ID', - 'ARTICLE', - 'BRAND', - 'CROSS_BRAND', - 'CROSS_ARTICLE', - 'timestamp', - ], - ]) ?> - -
diff --git a/backend/views/layouts/column.php b/backend/views/layouts/column.php index 5eaac08..cab80ad 100644 --- a/backend/views/layouts/column.php +++ b/backend/views/layouts/column.php @@ -305,10 +305,10 @@ $this->beginContent('@app/views/layouts/main.php'); ], ], ['label' => 'Справочник', 'url' => ['#'], 'items' => [ - ['label' => 'Замены брендов', 'url' => ['currency/index']], - ['label' => 'Карточки товаров', 'url' => ['currency/index']], - ['label' => 'Товары поставщиков', 'url' => ['currency/index']], - ['label' => 'Кроссы', 'url' => ['currency/index']], + ['label' => 'Замены брендов', 'url' => ['brands-replace/index']], + ['label' => 'Карточки товаров', 'url' => ['#']], + ['label' => 'Товары поставщиков', 'url' => ['details/index']], + ['label' => 'Кроссы', 'url' => ['details-crosses/index']], ['label' => 'Бренды', 'url' => ['currency/index']], ['label' => 'Марки авто', 'url' => ['currency/index']], ['label' => 'Статусы заказов', 'url' => ['currency/index']], @@ -319,6 +319,10 @@ $this->beginContent('@app/views/layouts/main.php'); ['label' => 'Офисы', 'url' => ['currency/index']], ], ], + ['label' => 'Справочник', 'url' => ['#'], 'items' => [ + ['label' => 'Замены брендов', 'url' => ['currency/index']], + ], + ], ], 'submenuTemplate' => "\n\n", diff --git a/common/models/Currency.php b/common/models/Currency.php index 5352e89..3aeb719 100644 --- a/common/models/Currency.php +++ b/common/models/Currency.php @@ -46,10 +46,10 @@ class Currency extends \yii\db\ActiveRecord { return [ 'id' => 'ID', - 'name' => 'Name', - 'rate' => 'Rate', + 'name' => 'Название', + 'rate' => 'Курс', 'is_default' => 'Is Default', - 'timestamp' => 'Timestamp', + 'timestamp' => 'Дата обновления', ]; } } -- libgit2 0.21.4