6cc97b30
Mihail
add details descr...
|
1
2
3
4
|
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
|
4044fc30
Mihail
add details crite...
|
5
|
use yii\bootstrap\ActiveForm;
|
1c34c1b5
Mihail
work on details desc
|
6
|
use yii\grid\GridView;
|
4044fc30
Mihail
add details crite...
|
7
|
use yii\widgets\Pjax;
|
1c34c1b5
Mihail
work on details desc
|
8
|
|
6cc97b30
Mihail
add details descr...
|
9
10
11
12
|
/* @var $this yii\web\View */
/* @var $model common\models\DetailsDescription */
|
40acb401
Mihail
add delete price ...
|
13
|
$this->title = 'Карточка товара - ' . $model->name;
|
6cc97b30
Mihail
add details descr...
|
14
15
16
17
18
19
20
|
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Details Descriptions'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="details-description-view">
<h1><?= Html::encode($this->title) ?></h1>
|
6cc97b30
Mihail
add details descr...
|
21
22
23
24
|
<?= DetailView::widget([
'model' => $model,
'attributes' => [
|
6cc97b30
Mihail
add details descr...
|
25
26
|
'name',
'brand',
|
4044fc30
Mihail
add details crite...
|
27
28
|
// 'tecdoc_id',
// 'tecdoc_article',
|
6cc97b30
Mihail
add details descr...
|
29
|
'description',
|
4044fc30
Mihail
add details crite...
|
30
31
32
33
|
// 'tecdoc_description',
// 'supplier_description',
// 'article',
// 'image',
|
6cc97b30
Mihail
add details descr...
|
34
|
'tecdoc_image',
|
4044fc30
Mihail
add details crite...
|
35
|
// 'category_id',
|
6cc97b30
Mihail
add details descr...
|
36
37
38
|
],
]) ?>
|
512cc271
Mihail
add delete price ...
|
39
|
<?php
|
4044fc30
Mihail
add details crite...
|
40
41
42
43
|
echo Html::tag('hr');
echo Html::tag('h4','Xарактеристики товара');
if($count){
Pjax::begin();
|
512cc271
Mihail
add delete price ...
|
44
|
echo GridView::widget([
|
4044fc30
Mihail
add details crite...
|
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
'dataProvider' => $dataProvider,
'showHeader' => false,
'showOnEmpty' => false,
'columns' => [
'key',
'value',
['class' => \yii\grid\ActionColumn::className(),
'template'=>'{delete}',
'buttons' => [
'delete' => function ($url, $model, $key) {
$url = \yii\helpers\Url::to(['details-description/delete-criteria', 'name' => $model->name, 'brand' => $model->brand, 'key' => $model->key]);
return Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [
'title' => Yii::t('yii', 'Удалить характеристики'),
'data-confirm' => 'Вы уверены что хотите удалить эти характеристики?',
'data-method' => 'post',
'data-pjax' => '1',
]);
},
],
],
],
]);
Pjax::end();
}
?>
|
1c34c1b5
Mihail
work on details desc
|
71
72
73
|
<div class="details-criteria-form">
|
512cc271
Mihail
add delete price ...
|
74
75
|
<?php $form = ActiveForm::begin(['action' =>['details-description/create-criteria'],]); ?>
|
4044fc30
Mihail
add details crite...
|
76
77
78
79
|
<?= $form->field( $criteria_model, 'key', [
'horizontalCssClasses' => [
'input' => 'col-sm-1',
]] )->textInput() ?>
|
1c34c1b5
Mihail
work on details desc
|
80
|
|
4044fc30
Mihail
add details crite...
|
81
82
83
84
|
<?= $form->field( $criteria_model, 'value', [
'horizontalCssClasses' => [
'input' => 'col-sm-1',
]] )->textInput() ?>
|
1c34c1b5
Mihail
work on details desc
|
85
|
|
512cc271
Mihail
add delete price ...
|
86
87
|
<?= $form->field( $criteria_model, 'name' )->hiddenInput(['value' => $model->name])->label(false)?>
<?= $form->field( $criteria_model, 'brand' )->hiddenInput(['value' => $model->brand])->label(false) ?>
|
1c34c1b5
Mihail
work on details desc
|
88
89
90
|
<div class="form-group">
|
4044fc30
Mihail
add details crite...
|
91
|
<?= Html::submitButton(Yii::t('app', 'Добавить характеристику'), ['class' => 'btn btn-success']) ?>
|
1c34c1b5
Mihail
work on details desc
|
92
93
94
95
|
</div>
<?php ActiveForm::end(); ?>
</div>
|
4044fc30
Mihail
add details crite...
|
96
97
|
<hr>
|
6cc97b30
Mihail
add details descr...
|
98
|
</div>
|