82 lines
4.9 KiB
PHP
82 lines
4.9 KiB
PHP
<div class="table-responsive">
|
|
<table class="fix-action m-0 table">
|
|
<thead>
|
|
@include('bo.modules.table-col-sorter', [
|
|
'cols' => [
|
|
'name' => __('validation.attributes.name'),
|
|
'title' => __('validation.attributes.title'),
|
|
'subtitle' => __('validation.attributes.subtitle'),
|
|
'order' => __('validation.attributes.order'),
|
|
'updated_at' => __('validation.attributes.updated_at'),
|
|
],
|
|
'mobileHide' => ['status']
|
|
])
|
|
</thead>
|
|
<tbody>
|
|
@if ($conceptModels->count())
|
|
@foreach ($conceptModels as $conceptModel)
|
|
<tr>
|
|
<td class="align-middle">{{ $conceptModel->name }}</td>
|
|
<td class="align-middle">{{ $conceptModel->title }}</td>
|
|
<td class="align-middle">{{ $conceptModel->subtitle }}</td>
|
|
@php $routeName = request()->route()->getName(); @endphp
|
|
@if (empty(request()->search) and empty($noOrder) and Session::get("$routeName.sort_col") === 'order')
|
|
<td class="d-flex">
|
|
<form class="@if ($loop->first and $conceptModels->onFirstPage()) invisible @endif text-center"
|
|
action="{{ route('bo.concepts.change-order', ['concept' => $conceptModel, 'direction' => 'up']) }}"
|
|
method="POST">
|
|
@csrf
|
|
<button class="btn btn-sm @if ($loop->first and $conceptModels->onFirstPage()) disabled @endif" data-bs-toggle="tooltip"
|
|
type="submit" title="{{ __('Change the order of appearance upwards') }}">
|
|
<i class="fas fa-arrow-alt-circle-up"></i>
|
|
</button>
|
|
</form>
|
|
<form class="@if ($loop->last and $conceptModels->currentPage() === $conceptModels->lastPage()) invisible @endif text-center"
|
|
action="{{ route('bo.concepts.change-order', ['concept' => $conceptModel, 'direction' => 'down']) }}"
|
|
method="POST">
|
|
@csrf
|
|
<button class="btn btn-sm @if ($loop->last and $conceptModels->currentPage() === $conceptModels->lastPage()) disabled @endif" data-bs-toggle="tooltip"
|
|
type="submit" title="{{ __('Change the order of appearance downwards') }}">
|
|
<i class="fas fa-arrow-alt-circle-down"></i>
|
|
</button>
|
|
</form>
|
|
</td>
|
|
@endif
|
|
<td class="align-middle">
|
|
<span class="badge bg-warning text-dark text-wrap">
|
|
{{ $conceptModel->updated_at->isoFormat('LLLL') }}
|
|
</span>
|
|
</td>
|
|
<td class="align-middle">
|
|
<form class="btn-group confirmDeleteJS"
|
|
action="{{ route('bo.concepts.destroy', $conceptModel->id) }}" method="POST"
|
|
novalidate>
|
|
<a class="btn btn-sm btn-primary" data-bs-toggle="tooltip"
|
|
href="{{ route('bo.concepts.edit', $conceptModel->id) }}"
|
|
title="{{ __('crud.helpers.update_model', ['model' => __('models.classes.concept')]) }}">
|
|
<i class="fa-solid fa-pencil"></i>
|
|
</a>
|
|
@method('DELETE')
|
|
@csrf
|
|
<div class="btn-group" role="group">
|
|
<button class="btn btn-sm btn-danger" data-bs-toggle="tooltip"
|
|
title="{{ __('crud.helpers.delete_model', ['model' => __('models.classes.concept')]) }}">
|
|
<i class="fa-solid fa-trash"></i>
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
@else
|
|
<tr>
|
|
<td class="text-center" colspan="6">
|
|
<span class="h3">
|
|
{{ __('crud.helpers.no_results', ['models' => str(__('models.classes.concept'))->plural()]) }}
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
</div>
|