gruene-seele/resources/views/admin/inventory/locations/index.blade.php

60 lines
2.6 KiB
PHP

@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header d-flex justify-content-between align-items-center">
<span>{{ __('Lagerorte') }}</span>
<a href="{{ route('admin.inventory.locations.create') }}" class="btn btn-sm btn-primary">{{ __('Neu anlegen') }}</a>
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{ __('Name') }}</th>
<th>{{ __('Status') }}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td>
<a href="{{ route('admin.inventory.locations.edit', $value) }}" class="btn icon-btn btn-sm btn-primary">
<span class="far fa-edit"></span>
</a>
</td>
<td>{{ $value->name }}</td>
<td data-sort="{{ $value->active ? 1 : 0 }}">
@if($value->active)
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
@else
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
@endif
</td>
<td>
<form action="{{ route('admin.inventory.locations.destroy', $value) }}" method="post" class="d-inline"
onsubmit="return confirm('{{ __('Really delete entry?') }}');">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-link text-danger p-0" title="{{ __('Delete') }}"><i class="far fa-trash-alt"></i></button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<script>
$(document).ready(function () {
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 100,
"order": [[1, "asc"]],
"language": {"url": "/js/German.json"}
});
});
</script>
@endsection