_variants_table.php
4.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
/**
* @var Variant[] $models
*/
use artbox\catalog\catalog\models\Variant;
use yii\helpers\Html;
?>
<tr id="variants-table">
<td colspan="8" style="padding: 0">
<table style="width: 100%">
<thead>
<tr>
<th><?= Html::button(\Yii::t('app', 'УДАЛИТЬ'),['class' => 'btn_ btn-danger-products-table']) ?></th>
<th><?= Html::checkbox(
'',
false,
[
'class' => 'variant-checkbox',
]
) ?></th>
<th><span><?= \Yii::t('app', 'Ску') ?></span></th>
<th style="text-align: center;"><span><?= \Yii::t('app', 'Цена') ?></span></th>
<th style="text-align: center;"><span><?= \Yii::t('app', 'Цена старая') ?></span></th>
<th style="text-align: center;"><span><?= \Yii::t('app', 'Кол-во') ?></span></th>
<th style="text-align: center;"><span><?= \Yii::t('app', 'Статус') ?></span></th>
<th><span><?= \Yii::t('app', 'Сортировка') ?></span></th>
</tr>
</thead>
<tbody>
<?php
foreach ($models as $model) {
?>
<tr>
<td class="td-button-btn-danger-products-table"></td>
<td class="mass-delete-variant">
<?= Html::checkbox(
'',
false,
[
'class' => 'variant-checkbox',
]
) ?>
</td>
<td class="sku-adm"><?= $model->sku ?></td>
<td class="price-adm"><?= Html::textInput(
'price',
$model->price,
[
'class' => 'variant-active-input',
'data' => [
'field' => 'price',
'id' => $model->id,
],
]
) ?></td>
<td class="price-sale-adm"><?= Html::textInput(
'price',
$model->price_old,
[
'class' => 'variant-active-input',
'data' => [
'field' => 'price_old',
'id' => $model->id,
],
]
) ?></td>
<td class="quantity-goods-adm"><?= Html::textInput(
'price',
$model->stock,
[
'class' => 'variant-active-input',
'data' => [
'field' => 'stock',
'id' => $model->id,
],
]
) ?></td>
<td class="status-adm-2 variant-status"><?= Html::checkbox(
'',
(bool) $model->status,
[
'class' => 'varint-switcher',
'data' => [
'key' => $model->id,
],
]
) ?></td>
<td class="position-adm">
<div class="pos-adm-wr"><span class="pos-minus-adm"></span>
<input id="variant-sort-input-<?= $model->id ?>" value="<?= $model->sort ?>" title="" type="text">
<span class="pos-pluse-adm"></span></div>
<div class="pos-adm-ok">
<div class="variant-sort-save" data-key="<?= $model->id ?>">ok</div>
</div>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</td>
</tr>