24 lines
1 KiB
PHP
24 lines
1 KiB
PHP
<td class="text-center align-middle">
|
|
@can('changePublished', $model)
|
|
<form action="{{ route('bo.' . $routeName . '.change-published', $model->getRouteKey()) }}" method="POST">
|
|
@csrf
|
|
@method('PATCH')
|
|
<button data-bs-toggle="tooltip" type="submit"
|
|
title="{{ __($model->published ? __('crud.other.unpublish') : __('crud.other.publish')) }}" @class([
|
|
'btn btn-sm',
|
|
'btn-primary' => $model->published,
|
|
'btn-danger' => !$model->published,
|
|
])>
|
|
<i class="fa-solid fa-circle-check" @class([
|
|
'fa-solid',
|
|
'fa-circle-check' => $model->published,
|
|
'fa-circle-xmark' => !$model->published,
|
|
])></i>
|
|
</button>
|
|
</form>
|
|
@else
|
|
<span class="text-danger" data-bs-toggle="tooltip" title="{{ __('crud.other.right') }}">
|
|
<i class="fa-solid fa-ban"></i>
|
|
</span>
|
|
@endcan
|
|
</td>
|