Archived
1
0
Fork 0

resources/views/livewire/datatable.blade.php: show restore action if $trashed is set.

This commit is contained in:
Henrik Hautakoski 2022-01-23 12:52:56 +01:00
parent b4c46d447b
commit 0110e8e8e7

View file

@ -34,7 +34,7 @@
<td class="border px-4 py-2">{{ Arr::get($item, $key) }}</td>
@endforeach
@if ($route_edit || $route_delete)
@if (!$trashed && ($route_edit || $route_delete))
<td class="border px-4 py-2">
@if($route_edit)
<a href="{{ route($route_edit, [ $item ]) }}">
@ -50,6 +50,12 @@
</x-ignite-form>
@endif
</td>
@elseif ($trashed && $route_restore)
<td class="border px-4 py-2">
<a href="{{ route($route_restore, [ $item ]) }}">
<x-icon name="heroicon-o-refresh" class="inline-block w-6 text-blue-500"/>
</a>
</td>
@endif
</tr>
@endforeach