1
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
ssww23
2026-03-17 01:59:00 +03:00
parent 93a655235a
commit 0ee9f05416
48 changed files with 1193 additions and 413 deletions

View File

@@ -3,28 +3,28 @@
@section('content')
@include('partials.breadcrumbs', [
'items' => [
['label' => 'Главная', 'url' => route('home')],
['label' => 'Сравнение', 'url' => null],
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Сравнение'), 'url' => null],
],
])
<section class="pc-section">
<div class="pc-section-title">
<h2>Сравнение товаров</h2>
<h2>{{ __('Сравнение товаров') }}</h2>
</div>
@if ($products->isEmpty())
<div class="pc-card">
<h3>Список сравнения пуст</h3>
<p>Добавьте товары в сравнение из карточек каталога.</p>
<a class="pc-btn primary" href="{{ route('catalog.index') }}">Перейти в каталог</a>
<h3>{{ __('Список сравнения пуст') }}</h3>
<p>{{ __('Добавьте товары в сравнение из карточек каталога.') }}</p>
<a class="pc-btn primary" href="{{ route('catalog.index') }}">{{ __('Перейти в каталог') }}</a>
</div>
@else
<div class="pc-compare-actions">
<form method="post" action="{{ route('compare.clear') }}" data-preserve-scroll="true">
@csrf
@method('delete')
<button class="pc-btn ghost" type="submit">Очистить сравнение</button>
<button class="pc-btn ghost" type="submit">{{ __('Очистить сравнение') }}</button>
</form>
</div>
@@ -40,7 +40,7 @@
<table class="pc-compare-table">
<thead>
<tr>
<th>Характеристика</th>
<th>{{ __('Характеристика') }}</th>
@foreach ($products as $product)
<th>{{ $product->name }}</th>
@endforeach
@@ -49,9 +49,9 @@
<tbody>
@foreach ($specKeys as $key)
<tr>
<th>{{ $specLabels[$key] ?? $key }}</th>
<th>{{ __($specLabels[$key] ?? $key) }}</th>
@foreach ($products as $product)
<td>{{ data_get($product->specs, $key, '—') }}</td>
<td>{{ __(strval(data_get($product->specs, $key, '—'))) }}</td>
@endforeach
</tr>
@endforeach