diff --git a/backend/controllers/DetailsDescriptionController.php b/backend/controllers/DetailsDescriptionController.php
new file mode 100644
index 0000000..035ad15
--- /dev/null
+++ b/backend/controllers/DetailsDescriptionController.php
@@ -0,0 +1,86 @@
+ [
+ 'class' => VerbFilter::className(),
+ 'actions' => [
+ 'delete' => ['post'],
+ ],
+ ],
+ ];
+ }
+
+ /**
+ * Lists all DetailsDescription models.
+ * @return mixed
+ */
+ public function actionIndex()
+ {
+ $searchModel = new DetailsDescriptionSearch();
+ $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
+
+ return $this->render('index', [
+ 'searchModel' => $searchModel,
+ 'dataProvider' => $dataProvider,
+ ]);
+ }
+
+
+
+ /**
+ * Updates an existing DetailsDescription model.
+ * If update is successful, the browser will be redirected to the 'view' page.
+ * @param string $name
+ * @param string $brand
+ * @return mixed
+ */
+ public function actionUpdate($name, $brand)
+ {
+ $model = $this->findModel($name, $brand);
+
+ if ($model->load(Yii::$app->request->post()) && $model->save()) {
+ return $this->redirect(['view', 'name' => $model->name, 'brand' => $model->brand]);
+ } else {
+ return $this->render('update', [
+ 'model' => $model,
+ ]);
+ }
+ }
+
+
+
+ /**
+ * Finds the DetailsDescription model based on its primary key value.
+ * If the model is not found, a 404 HTTP exception will be thrown.
+ * @param string $name
+ * @param string $brand
+ * @return DetailsDescription the loaded model
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ protected function findModel($name, $brand)
+ {
+ if (($model = DetailsDescription::findOne(['name' => $name, 'brand' => $brand])) !== null) {
+ return $model;
+ } else {
+ throw new NotFoundHttpException('The requested page does not exist.');
+ }
+ }
+}
diff --git a/backend/views/details-description/_form.php b/backend/views/details-description/_form.php
new file mode 100644
index 0000000..d91dbe1
--- /dev/null
+++ b/backend/views/details-description/_form.php
@@ -0,0 +1,45 @@
+
+
+
diff --git a/backend/views/details-description/_search.php b/backend/views/details-description/_search.php
new file mode 100644
index 0000000..21d7ac1
--- /dev/null
+++ b/backend/views/details-description/_search.php
@@ -0,0 +1,51 @@
+
+
+
+
+ ['index'],
+ 'method' => 'get',
+ ]); ?>
+
+ = $form->field($model, 'id') ?>
+
+ = $form->field($model, 'name') ?>
+
+ = $form->field($model, 'brand') ?>
+
+ = $form->field($model, 'tecdoc_id') ?>
+
+ = $form->field($model, 'tecdoc_article') ?>
+
+ field($model, 'description') ?>
+
+ field($model, 'tecdoc_description') ?>
+
+ field($model, 'supplier_description') ?>
+
+ field($model, 'article') ?>
+
+ field($model, 'image') ?>
+
+ field($model, 'tecdoc_image') ?>
+
+ field($model, 'category_id') ?>
+
+ field($model, 'timestamp') ?>
+
+
+ = Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
+ = Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default']) ?>
+
+
+
+
+
diff --git a/backend/views/details-description/index.php b/backend/views/details-description/index.php
new file mode 100644
index 0000000..569d6b4
--- /dev/null
+++ b/backend/views/details-description/index.php
@@ -0,0 +1,46 @@
+title = Yii::t('app', 'Details Descriptions');
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+ render('_search', ['model' => $searchModel]); ?>
+
+
+ = Html::a(Yii::t('app', 'Create Details Description'), ['create'], ['class' => 'btn btn-success']) ?>
+
+
+ = GridView::widget([
+ 'dataProvider' => $dataProvider,
+ 'filterModel' => $searchModel,
+ 'columns' => [
+ ['class' => 'yii\grid\SerialColumn'],
+
+ 'id',
+ 'name',
+ 'brand',
+ 'tecdoc_id',
+ 'tecdoc_article',
+ // 'description',
+ // 'tecdoc_description',
+ // 'supplier_description',
+ // 'article',
+ // 'image',
+ // 'tecdoc_image',
+ // 'category_id',
+ // 'timestamp',
+
+ ['class' => 'yii\grid\ActionColumn'],
+ ],
+ ]); ?>
+
+
diff --git a/backend/views/details-description/update.php b/backend/views/details-description/update.php
new file mode 100644
index 0000000..495f26e
--- /dev/null
+++ b/backend/views/details-description/update.php
@@ -0,0 +1,23 @@
+title = Yii::t('app', 'Update {modelClass}: ', [
+ 'modelClass' => 'Details Description',
+]) . ' ' . $model->name;
+$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Details Descriptions'), 'url' => ['index']];
+$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'name' => $model->name, 'brand' => $model->brand]];
+$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/backend/views/details-description/view.php b/backend/views/details-description/view.php
new file mode 100644
index 0000000..16cc2a2
--- /dev/null
+++ b/backend/views/details-description/view.php
@@ -0,0 +1,47 @@
+title = $model->name;
+$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Details Descriptions'), 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+
+ = Html::a(Yii::t('app', 'Update'), ['update', 'name' => $model->name, 'brand' => $model->brand], ['class' => 'btn btn-primary']) ?>
+ = Html::a(Yii::t('app', 'Delete'), ['delete', 'name' => $model->name, 'brand' => $model->brand], [
+ 'class' => 'btn btn-danger',
+ 'data' => [
+ 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),
+ 'method' => 'post',
+ ],
+ ]) ?>
+
+
+ = DetailView::widget([
+ 'model' => $model,
+ 'attributes' => [
+ 'id',
+ 'name',
+ 'brand',
+ 'tecdoc_id',
+ 'tecdoc_article',
+ 'description',
+ 'tecdoc_description',
+ 'supplier_description',
+ 'article',
+ 'image',
+ 'tecdoc_image',
+ 'category_id',
+ 'timestamp',
+ ],
+ ]) ?>
+
+
diff --git a/common/models/DetailsDescriptionSearch.php b/common/models/DetailsDescriptionSearch.php
new file mode 100644
index 0000000..ad0efba
--- /dev/null
+++ b/common/models/DetailsDescriptionSearch.php
@@ -0,0 +1,83 @@
+ 20,
+ ];
+
+ // удалим пустые параметры
+ if ( isset( $params['DetailsDescriptionSearch'] ) && is_array( $params['DetailsDescriptionSearch'] )) {
+ $params['DetailsDescriptionSearch'] = array_filter( $params['DetailsDescriptionSearch'], function($val){
+ return $val !="";
+ });
+ }
+
+ $this->load($params);
+
+ if (!$this->validate()) {
+
+ $query->where('0=1');
+
+ }
+
+ if ( !$params || !$params['DetailsDescriptionSearch'] ) {
+ // если не переданы параметры - показываем первые 100 записей
+ $pagination = false;
+ $query->limit = 100;
+
+ }
+
+ $query->andFilterWhere([
+ 'name' => $this->name,
+ 'brand' => $this->brand,
+ ]);
+
+ $dataProvider = new ActiveDataProvider([
+ 'query' => $query,
+ 'pagination' => $pagination,
+ ]);
+
+ return $dataProvider;
+ }
+}
--
libgit2 0.21.4