ldc-agis/resources/views/bo/modules/change-model-order.blade.php
2024-02-07 12:15:42 +01:00

30 lines
1.6 KiB
PHP

<td class="text-center align-middle">
@can('changeOrder', $model)
<div class="d-flex justify-content-center align-items-center">
<form class="@if ($loop->first and $models->onFirstPage()) invisible @endif"
action="{{ route('bo.' . $routeName . '.change-order', [Str::singular($routeName) => $model, 'direction' => 'up']) }}"
method="POST">
@csrf
@method('PATCH')
<button class="btn btn-sm btn-outline-secondary @if ($loop->first and $models->onFirstPage()) disabled @endif" data-bs-toggle="tooltip"
type="submit" title="{{ __('crud.other.up') }}">
<i class="fas fa-arrow-up"></i>
</button>
</form>
<form class="@if ($loop->last and $models->currentPage() === $models->lastPage()) invisible @endif"
action="{{ route('bo.' . $routeName . '.change-order', [Str::singular($routeName) => $model, 'direction' => 'down']) }}"
method="POST">
@csrf
@method('PATCH')
<button class="btn btn-sm btn-outline-secondary @if ($loop->last and $models->currentPage() === $models->lastPage()) disabled @endif ms-1" data-bs-toggle="tooltip"
type="submit" title="{{ __('crud.other.down') }}">
<i class="fas fa-arrow-down"></i>
</button>
</form>
</div>
@else
<span class="text-danger" data-bs-toggle="tooltip" title="{{ __('crud.other.right') }}">
<i class="fa-solid fa-ban"></i>
</span>
@endcan
</td>