index.php
8.01 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<?php
use yii\data\Sort;
use \yii\helpers\Html;
use \yii\widgets\Pjax;
$sort = new Sort([
'attributes' => [
'box_or' => ['label' => 'Наличие'],
'delivery_or' => ['label' => 'Срок'],
'price_or' => [
'default' => SORT_DESC,
'label' => 'Цена'],
'box_cross' => ['label' => 'Наличие'],
'delivery_cross' => ['label' => 'Срок'],
'price_cross' => [
'default' => SORT_DESC,
'label' => 'Цена'],
],
]);
$this->registerCssFile('/css/BC2_catalog_zapchasti.css');
$this->registerJsFile('/js/jquery.tablesorter.min.js');
$this->registerJsFile('/js/goods.js');
$this->params['breadcrumbs'][] = $this->title;
// определим направление сортировки, для отображения стрелочек
// для оригинальной таблицы
if( empty($sort_params_or['price']) ){
$price_or_class = '';
}else{
$price_or_class = ($sort_params_or['price'] == 4)? 'arrow_up': 'arrow_downA';
}
if( empty($sort_params_or['delivery']) ){
$delivery_or_class = '';
}else{
$delivery_or_class = ($sort_params_or['delivery'] == 4)? 'arrow_up': 'arrow_downA';
}
if( empty($sort_params_or['box']) ){
$box_or_class = '';
}else{
$box_or_class = ($sort_params_or['box'] == 4)? 'arrow_up': 'arrow_downA';
}
// для кросс таблицы
if( empty($sort_params_cross['price']) ){
$price_cross_class = '';
}else{
$price_cross_class = ($sort_params_cross['price'] == 4)? 'arrow_up': 'arrow_downA';
}
if( empty($sort_params_cross['delivery']) ){
$delivery_cross_class = '';
}else{
$delivery_cross_class = ($sort_params_cross['delivery'] == 4)? 'arrow_up': 'arrow_downA';
}
if( empty($sort_params_cross['box']) ){
$box_cross_class = '';
}else{
$box_cross_class = ($sort_params_cross['box'] == 4)? 'arrow_up': 'arrow_downA';
}
?>
<div class='vin table '>
<a href="" class='navigation'>Италавто</a>
<img src="/images/arrow_dots.png">
<a href="" class='navigation'>Расходные материалы</a>
<img src="/images/arrow_dots.png">
<a href="" class='navigation'>Электрооборудование</a>
<img src="/images/arrow_dots.png">
<a href="" class='navigation'>Акамуляторы(АКБ)</a>
<img src="/images/arrow_dots.png">
<span>Аккумулятор<span class='detail_name'> <?= "{$detailsModel->name}: {$detailsModel->brand}"?></span></span>
<p class="vin_article"><?= "{$detailsModel->name}: {$detailsModel->brand}"?></p>
<div class="tovar_card">
<div class="search_span zapchasti">
<img src="/images/car1.png" id="zapchasti_car">
<p>Укажите свой автомобиль
и мы предложим вам
еще Аккумуляторы (АКБ)</p>
<div class="selectize_item2">
<select class="area">
<option value="" disabled="" selected="">Марка</option>
<option value="2">Выбери меня!</option>
<option value="3">Выбери меня!</option>
<option value="5">Меня!</option>
<option value="4">Меня</option>
</select>
</div>
<button class="purple">Есть еще?</button>
</div>
<div class='note'>
<span id="modal_close_tip"><img src="/images/close_form.png"></span>
<p>
У нас есть еще<br>
45 Аккумуляторы (АКБ)<br>
Возможно что-то вам<br>
подойдет
</p>
</div>
<table class='detail'>
<tr>
<td>
<?php
// <img src="/images/acamulator_big.png">
// <img src="/images/small_plus.png">
?>
</td>
<td>
<p class='bold_line'><?= "{$detailsModel->name}: {$detailsModel->brand}"?></p>
<p class="thin_line"><?= "{$detailsModel->description}"?></p>
</td>
</tr>
<tr class="galery">
<?php
// <td><img src="/images/acamulator_small_gallery.png"><img src="/images/acamulator_small_gallery.png"></td>
?>
</tr>
</table>
<img src="/images/arrow_rounded.png" class='arrow_rounded'>
</div>
</div>
<div class="vin href">
<p class="button_grey" id="button_grey_card">Скрыть карточку товара</p>
</div>
<div class="vin tables">
<div class="first_section">
<p class="bold_line"><?= "{$detailsModel->description} {$detailsModel->brand} {$detailsModel->name}"?></p>
<p class="currency opposite" id="grivna">UAH</p>
<p class="currency active_button_purple1" id="dollars">USD</p>
<p class="currency opposite" id="euro">EUR</p>
<?php Pjax::begin(['id' => 'original']); ?>
<table class="tovar_table" cellspacing="0" cellpadding="0" border="0">
<tbody><tr class="name">
<td class="small_width row_name">Фирма</td>
<td class="medium_width row_name">Номер детали</td>
<td class="large_width row_name">Описание</td>
<td class="row_select1 row_name"></td>
<td class="right_large row_name link_sort <?= $box_or_class ?>"><?= $sort->link('box_or') ?></td>
<td class="right_small row_name link_sort <?= $delivery_or_class ?>"><?= $sort->link('delivery_or') ?></td>
<td class="right_medium row_name link_sort <?= $price_or_class ?>"><?= $sort->link('price_or') ?></td>
</tr>
<?php
echo \yii\widgets\ListView::widget([
'dataProvider' => $goods_data_provider,
'itemView' => 'one_item',
'summary' => '',
'layout' => "{items}"
]);
?>
</tbody></table>
<?php Pjax::end();?>
</div>
<?php Pjax::begin(['id' => 'cross']); ?>
<div class="second_section">
<p class="bold_line">Замены искомого производителя</p>
<p </p>
<table class="tovar_table" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr class="name">
<td class="small_width row_name">Фирма</td>
<td class="medium_width row_name">Номер детали</td>
<td class="large_width row_name">Описание</td>
<td class="row_select1 row_name"></td>
<td class="right_large row_name link_sort <?= $box_cross_class ?>"><?= $sort->link('box_cross') ?></td>
<td class="right_small row_name link_sort <?= $delivery_cross_class ?>"><?= $sort->link('delivery_cross') ?></td>
<td class="right_medium row_name link_sort <?= $price_cross_class ?>"><?= $sort->link('price_cross') ?></td>
</tr>
<?php
echo \yii\widgets\ListView::widget([
'dataProvider' => $crosses_data_provider,
'itemView' => 'one_item',
'summary' => '',
'layout' => "{items}"
]);
?>
</tbody></table>
<div class="yellow_stock">
<img src="/images/yellow_squere.jpg"><p>В наличии на центральном складе ItalAuto, в Киеве</p>
</div>
</div>
<?php Pjax::end();?>
</div>
</div>
<div class="modal fade" id="details_content_block" >
<div class="modal-dialog table_details">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div id="details_content">
</div>
</div>
</div>
</div>