79 lines
3.1 KiB
PHP
79 lines
3.1 KiB
PHP
<div class="table-responsive">
|
|
<table class="fix-action table">
|
|
<thead>
|
|
<tr class="visually-hidden">
|
|
<th scope="col"></th>
|
|
</tr>
|
|
@php
|
|
$cols = [
|
|
'name' => Str::ucfirst(__('validation.attributes.title')),
|
|
'picture' => Str::ucfirst(__('validation.attributes.image')),
|
|
'order' => Str::ucfirst(__('validation.custom.attributes.order')),
|
|
'status' => Str::ucfirst(__('validation.custom.attributes.status'))
|
|
];
|
|
@endphp
|
|
@include('bo.modules.tableColSorter', ['cols' => $cols, 'mobileHide' => ['picture']])
|
|
</thead>
|
|
<tbody>
|
|
@forelse ($ranges as $range)
|
|
<tr>
|
|
<td>{{ $range->name }}</td>
|
|
<td class="d-none d-md-table-cell">
|
|
<img class="img-fluid mw-5" src="{{ $range->picture }}" title="{{ $range->picture_title }}" alt="{{ $range->picture_alt }}">
|
|
</td>
|
|
@include('bo.modules.change-order', [
|
|
'route' => 'bo.ranges.change-order',
|
|
'model' => $range,
|
|
'first' => $loop->first,
|
|
'last' => $loop->last,
|
|
'isFirstPage' => $ranges->onFirstPage(),
|
|
'isLastPage' => !$ranges->hasMorePages(),
|
|
])
|
|
<td>
|
|
@include('bo.modules.toggle-status', [
|
|
'route' => 'bo.ranges.toggle-status',
|
|
'model' => $range,
|
|
])
|
|
</td>
|
|
<td>
|
|
<div class="btn-group">
|
|
@can('viewAny', \App\Models\Product::class)
|
|
<a class="btn btn-sm btn-warning"
|
|
href="{{ route('bo.products.index', [
|
|
'search' => '',
|
|
'brand' => '',
|
|
'tag' => '',
|
|
'range' => $range->id,
|
|
]) }}"
|
|
title="{{ Str::ucfirst(
|
|
__('crud.helpers.view_associated', [
|
|
'model' => trans_choice('models.classes.products', \INF),
|
|
]),
|
|
) }}"><i
|
|
class="fa-solid fa-box"></i></a>
|
|
@endcan
|
|
@can('update', $range)
|
|
<a class="btn btn-sm btn-primary" href="{{ route('bo.ranges.edit', $range) }}"
|
|
title="{{ Str::ucfirst(__('crud.actions.update')) }}"><i class="fa-solid fa-pen"></i></a>
|
|
@endcan
|
|
@can('delete', $range)
|
|
<form class="d-inline confirmDeleteJS" action="{{ route('bo.ranges.destroy', $range) }}" method="POST">
|
|
@method('DELETE')
|
|
@csrf
|
|
<button class="btn btn-sm btn-danger rounded-start-0" title="{{ Str::ucfirst(__('crud.actions.delete')) }}"><i
|
|
class="fa-solid fa-trash"></i></button>
|
|
</form>
|
|
@endcan
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td class="text-center" colspan="20">
|
|
<span class="h3">{{ __('crud.helpers.no_results') }}</span>
|
|
</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|