79 lines
3.3 KiB
PHP
79 lines
3.3 KiB
PHP
<div class="table-responsive">
|
|
<table class="fix-action table">
|
|
<thead>
|
|
<tr class="visually-hidden">
|
|
<th scope="col"></th>
|
|
</tr>
|
|
@php
|
|
$cols = [
|
|
'title' => Str::ucfirst(__('validation.attributes.title')),
|
|
'picture' => Str::ucfirst(__('validation.attributes.image')),
|
|
'link' => Str::ucfirst(__('validation.custom.attributes.link')),
|
|
'visible' => Str::ucfirst(__('Visible')),
|
|
'date_start' => Str::ucfirst(__('validation.custom.attributes.date_start_show')),
|
|
'date_end' => Str::ucfirst(__('validation.custom.attributes.date_end_show')),
|
|
'order' => Str::ucfirst(__('validation.custom.attributes.order')),
|
|
];
|
|
@endphp
|
|
@include('bo.modules.tableColSorter', [
|
|
'cols' => $cols,
|
|
'ignore' => ['visible', 'picture'],
|
|
'mobileHide' => ['description'],
|
|
])
|
|
</thead>
|
|
<tbody>
|
|
@forelse ($slides as $slide)
|
|
<tr>
|
|
<td>{{ $slide->title }}</td>
|
|
<td>
|
|
<img src="{{ $slide->picture }}" alt="{{ $slide->title }}" height="50px">
|
|
</td>
|
|
<td><a href="{{ $slide->link }}" target="_slide">{{ $slide->link_label }}</a></td>
|
|
<td class="text-center align-middle">
|
|
@if ($slide->isVisible())
|
|
<i class="fas fa-check check-green" data-bs-toggle="tooltip" title="{{ __('Visible') }}"></i>
|
|
@if ($slide->connected)
|
|
<br><span class="badge bg-secondary" data-bs-toggle="tooltip" title="{{ __('Connected members only') }}"><i
|
|
class="fa-solid fa-lock"></i> {{ __('Connected') }}</span>
|
|
@endif
|
|
@else
|
|
<i class="fas fa-times cross-red" data-bs-toggle="tooltip" title="{{ __('Not visible') }}"></i>
|
|
@endif
|
|
</td>
|
|
<td>{{ Date::forHumans($slide->date_start) }}</td>
|
|
<td>{{ Date::forHumans($slide->date_end) }}</td>
|
|
@include('bo.modules.change-order', [
|
|
'route' => 'bo.slides.change-order',
|
|
'model' => $slide,
|
|
'first' => $loop->first,
|
|
'last' => $loop->last,
|
|
'isFirstPage' => $slides->onFirstPage(),
|
|
'isLastPage' => !$slides->hasMorePages(),
|
|
])
|
|
<td>
|
|
<div class="btn-group">
|
|
@can('update', $slide)
|
|
<a class="btn btn-sm btn-primary" href="{{ route('bo.slides.edit', $slide) }}"
|
|
title="{{ Str::ucfirst(__('crud.actions.update')) }}"><i class="fa-solid fa-pen"></i></a>
|
|
@endcan
|
|
@can('delete', $slide)
|
|
<form class="d-inline confirmDeleteJS" action="{{ route('bo.slides.destroy', $slide) }}" 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>
|