ldc-supportweb/resources/views/bo/modules/change-model-order.blade.php
2025-04-11 18:30:04 +02:00

40 lines
1.8 KiB
PHP

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