|
@@ -5,21 +5,20 @@
|
|
|
<div class="row align-items-center">
|
|
<div class="row align-items-center">
|
|
|
<div class="col-xl-5 col-md-12">
|
|
<div class="col-xl-5 col-md-12">
|
|
|
<div class="mb-1">Всего найдено: {{ $products->total() }}</div>
|
|
<div class="mb-1">Всего найдено: {{ $products->total() }}</div>
|
|
|
-{{-- {{ $products->links() }}--}}
|
|
|
|
|
Выбрано: <span id="count_selected">0</span>
|
|
Выбрано: <span id="count_selected">0</span>
|
|
|
- <button class="btn btn-sm btn-primary mx-3" onclick="select_export()">Экспорт</button>
|
|
|
|
|
|
|
+ <button class="btn btn-sm btn-primary mx-3 disabled" id="export-button" onclick="select_export()">Экспорт</button>
|
|
|
<button class="btn btn-sm btn-primary" onclick="reset_selected()">Сбросить выбор</button>
|
|
<button class="btn btn-sm btn-primary" onclick="reset_selected()">Сбросить выбор</button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-xl-7 col-md-12">
|
|
<div class="col-xl-7 col-md-12">
|
|
|
<form class="" action="" method="get">
|
|
<form class="" action="" method="get">
|
|
|
<div class="row my-2 justify-content-center">
|
|
<div class="row my-2 justify-content-center">
|
|
|
- <div class="col">
|
|
|
|
|
|
|
+ <div class="col-6 col-sm-6 col-md-auto">
|
|
|
<label class="form-label" for="s">Поиск</label>
|
|
<label class="form-label" for="s">Поиск</label>
|
|
|
<input class="form-control form-control-sm"
|
|
<input class="form-control form-control-sm"
|
|
|
value="{{ $s ?? '' }}"
|
|
value="{{ $s ?? '' }}"
|
|
|
type="text" id="s" name="s" placeholder="Поиск">
|
|
type="text" id="s" name="s" placeholder="Поиск">
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="col">
|
|
|
|
|
|
|
+ <div class="col-6 col-sm-6 col-md-auto">
|
|
|
<label class="form-label " for="series">Серия</label>
|
|
<label class="form-label " for="series">Серия</label>
|
|
|
<select class="form-select form-select-sm" name="s_series" id="series">
|
|
<select class="form-select form-select-sm" name="s_series" id="series">
|
|
|
<option value="">Все</option>
|
|
<option value="">Все</option>
|
|
@@ -28,19 +27,19 @@
|
|
|
@endforeach
|
|
@endforeach
|
|
|
</select>
|
|
</select>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="col">
|
|
|
|
|
|
|
+ <div class="col-6 col-sm-6 col-md-auto mt-3 mt-md-0"">
|
|
|
<label class="form-label " for="price_min">Цена от</label>
|
|
<label class="form-label " for="price_min">Цена от</label>
|
|
|
<input class="form-control form-control-sm"
|
|
<input class="form-control form-control-sm"
|
|
|
value="{{ $s_price_min ?? '' }}"
|
|
value="{{ $s_price_min ?? '' }}"
|
|
|
type="number" id="price_min" name="s_price_min">
|
|
type="number" id="price_min" name="s_price_min">
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="col">
|
|
|
|
|
- <label class="form-label " for="price_max">Цена до</label>
|
|
|
|
|
|
|
+ <div class="col-6 col-sm-6 col-md-auto mt-3 mt-md-0">
|
|
|
|
|
+ <label class="form-label" for="price_max">Цена до</label>
|
|
|
<input class="form-control form-control-sm"
|
|
<input class="form-control form-control-sm"
|
|
|
value="{{ $s_price_max ?? '' }}"
|
|
value="{{ $s_price_max ?? '' }}"
|
|
|
type="number" id="price_max" name="s_price_max">
|
|
type="number" id="price_max" name="s_price_max">
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="col-auto">
|
|
|
|
|
|
|
+ <div class="col-6 col-sm-6 col-md-auto mt-3 mt-md-0"">
|
|
|
<label class="form-label" for="perpage">На странице</label>
|
|
<label class="form-label" for="perpage">На странице</label>
|
|
|
<select class="form-select form-select-sm" id="perpage" name="perpage">
|
|
<select class="form-select form-select-sm" id="perpage" name="perpage">
|
|
|
<option {{ (isset($perpage) && ($perpage == 20)) ? 'selected' : '' }} value="20">20
|
|
<option {{ (isset($perpage) && ($perpage == 20)) ? 'selected' : '' }} value="20">20
|
|
@@ -52,7 +51,7 @@
|
|
|
</option>
|
|
</option>
|
|
|
</select>
|
|
</select>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="col-auto">
|
|
|
|
|
|
|
+ <div class="col-6 col-sm-6 col-md-auto mt-3 mt-md-0"">
|
|
|
<button id="sb" class="btn btn-primary mt-4" type="submit">Поиск</button>
|
|
<button id="sb" class="btn btn-primary mt-4" type="submit">Поиск</button>
|
|
|
<a href="{{ route('index') }}" class="btn btn-light mt-4 ms-1">Сброс</a>
|
|
<a href="{{ route('index') }}" class="btn btn-light mt-4 ms-1">Сброс</a>
|
|
|
</div>
|
|
</div>
|
|
@@ -70,12 +69,12 @@
|
|
|
<label>Все<br><input type="checkbox" class="check_all" onchange="toggle(this)"></label>
|
|
<label>Все<br><input type="checkbox" class="check_all" onchange="toggle(this)"></label>
|
|
|
</th>
|
|
</th>
|
|
|
<th class="text-center">Артикул</th>
|
|
<th class="text-center">Артикул</th>
|
|
|
-{{-- <th>Группа <br> Наименование <br> Наименование под образец формы</th>--}}
|
|
|
|
|
- <th>Цена, руб.</th>
|
|
|
|
|
- <th>Характеристики</th>
|
|
|
|
|
- <th>Техническое описание</th>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <th class="d-none d-md-table-cell">Цена, руб.</th>
|
|
|
|
|
+ <th class="d-none d-md-table-cell">Характеристики</th>
|
|
|
|
|
+ <th class="d-none d-md-table-cell">Техническое описание</th>
|
|
|
<th class="text-center ">Изображение</th>
|
|
<th class="text-center ">Изображение</th>
|
|
|
- <th>Создан / Изменён</th>
|
|
|
|
|
|
|
+ <th class="d-none d-md-table-cell">Создан / Изменён</th>
|
|
|
</thead>
|
|
</thead>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tbody>
|
|
<tbody>
|
|
@@ -90,20 +89,13 @@
|
|
|
</label>
|
|
</label>
|
|
|
</td>
|
|
</td>
|
|
|
|
|
|
|
|
-{{-- <td>--}}
|
|
|
|
|
-{{-- <a href="{{ route('view_product', $product->id) }}">--}}
|
|
|
|
|
-{{-- <strong>Группа:</strong> {{ $product->product_group }}<br>--}}
|
|
|
|
|
-{{-- <strong>Наименование:</strong> {{ $product->name }}<br>--}}
|
|
|
|
|
-{{-- <strong>Наименование под образец формы:</strong> {{ $product->name_for_form }}--}}
|
|
|
|
|
-{{-- </a>--}}
|
|
|
|
|
-{{-- </td>--}}
|
|
|
|
|
- <td>{!! number_format($product->price, 2, ',', ' ') !!}</td>
|
|
|
|
|
- <td>
|
|
|
|
|
|
|
+ <td class="d-none d-md-table-cell">{!! number_format($product->price, 2, ',', ' ') !!}</td>
|
|
|
|
|
+ <td class="d-none d-md-table-cell">
|
|
|
<a href="{{ route('view_product', $product->id) }}">
|
|
<a href="{{ route('view_product', $product->id) }}">
|
|
|
{!! nl2br($product->characteristics) !!}
|
|
{!! nl2br($product->characteristics) !!}
|
|
|
</a>
|
|
</a>
|
|
|
</td>
|
|
</td>
|
|
|
- <td title="{{ $product->tech_description }}" style="font-size: small">{!! Str::words(nl2br($product->tech_description), 22) !!}</td>
|
|
|
|
|
|
|
+ <td class="d-none d-md-table-cell" title="{{ $product->tech_description }}" style="font-size: small">{!! Str::words(nl2br($product->tech_description), 22) !!}</td>
|
|
|
<td class="text-center align-middle">
|
|
<td class="text-center align-middle">
|
|
|
@empty($product->image_path)
|
|
@empty($product->image_path)
|
|
|
Нет изображения
|
|
Нет изображения
|
|
@@ -113,14 +105,19 @@
|
|
|
alt="{{ $product->article }}">
|
|
alt="{{ $product->article }}">
|
|
|
@endempty
|
|
@endempty
|
|
|
</td>
|
|
</td>
|
|
|
- <td>{!! date('d.m.Y_H:i', strtotime($product->created_at)) . '<br>' .date('d.m.Y_H:i', strtotime($product->updated_at)) !!}</td>
|
|
|
|
|
|
|
+ <td class="d-none d-md-table-cell">{!! date('d.m.Y_H:i', strtotime($product->created_at)) . '<br>' .date('d.m.Y_H:i', strtotime($product->updated_at)) !!}</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
@endforeach
|
|
@endforeach
|
|
|
</tbody>
|
|
</tbody>
|
|
|
</table>
|
|
</table>
|
|
|
- <div class="d-flex">
|
|
|
|
|
- {{ $products->links() }}
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <div class="col-12">
|
|
|
|
|
+ <div class="pagination pagination-sm justify-content-center">
|
|
|
|
|
+ {{ $products->onEachSide(0)->links() }}
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -182,6 +179,14 @@
|
|
|
checkboxes[i].checked = true;
|
|
checkboxes[i].checked = true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if(selected_products.length > 0){
|
|
|
|
|
+ document.getElementById('export-button').classList.remove('disabled');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ document.getElementById('export-button').classList.add('disabled');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// reset all selected (flush localstorage var)
|
|
// reset all selected (flush localstorage var)
|