85 lines
3.8 KiB
PHP
Executable file
85 lines
3.8 KiB
PHP
Executable file
@extends('layouts.layout-2')
|
|
|
|
@section('content')
|
|
<div class="card">
|
|
<h6 class="card-header">
|
|
{{__('Produkte')}}
|
|
</h6>
|
|
<div class="card-datatable table-responsive">
|
|
<table class="datatables-style table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th style="max-width: 60px;"> </th>
|
|
<th>{{__('Pos')}}</th>
|
|
<th>{{__('Bild')}}</th>
|
|
<th>{{__('Name')}}</th>
|
|
<th>{{__('Kategorie')}}</th>
|
|
<th>{{__('Preis')}}</th>
|
|
<th>{{__('Inhalt')}}</th>
|
|
<th>{{__('Einheit')}}</th>
|
|
<th>{{__('Grundpreis')}}</th>
|
|
<th>{{__('Status')}}</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($values as $value)
|
|
<tr>
|
|
<td>
|
|
<a href="{{route('admin_product_edit', [$value->id])}}" class="btn icon-btn btn-sm btn-primary">
|
|
<span class="far fa-edit"></span>
|
|
</a>
|
|
</td>
|
|
<td>{{ $value->pos }}</td>
|
|
<td>
|
|
@if(count($value->images))
|
|
<img class="img-fluid" alt="" style="max-height: 80px" src="{{ route('product_image', [$value->images->first()->slug]) }}">
|
|
@endif
|
|
</td>
|
|
<td>{{ $value->name }}</td>
|
|
<td>
|
|
@foreach($value->categories as $category)
|
|
{{ $category->category->name }}
|
|
@endforeach
|
|
</td>
|
|
<td>{{ $value->getFormattedPrice() }}</td>
|
|
<td>{{ $value->contents_total }}</td>
|
|
<td>{{ $value->getUnitType() }}</td>
|
|
<td>{{ $value->getBasePriceFormatted() }}</td>
|
|
<td data-sort="{{ $value->active }}">@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><a class="text-info" href="{{ route('admin_product_copy', [$value->id]) }}" onclick="return confirm('{{__('Eintrag kopieren?')}}');"><i class="far fa-copy"></i></a>
|
|
<a class="text-danger" href="{{ route('admin_product_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
<div class="mt-4 ml-4">
|
|
<a href="{{route('admin_product_edit', ['new'])}}" class="btn btn-sm btn-primary">
|
|
{{__('Neues Produkt erstellen')}}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
$( document ).ready(function() {
|
|
|
|
$('.datatables-style').dataTable({
|
|
"bLengthChange": false,
|
|
"iDisplayLength": 50,
|
|
"aoColumns": [
|
|
{ "sWidth": "6%" },
|
|
{ "sWidth": "8%" },
|
|
{ "sWidth": "19%" },
|
|
{ "sWidth": "19%" },
|
|
{ "sWidth": "30%" },
|
|
{ "sWidth": "10%" },
|
|
{ "sWidth": "10%" },
|
|
],
|
|
"language": {
|
|
"url": "/js/German.json"
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
@endsection
|