17 Nov - Static Sites to laravel
This commit is contained in:
parent
610aa1e202
commit
5ff57a21a7
3661 changed files with 569001 additions and 771 deletions
148
resources/views/admin/attribute/index.blade.php
Executable file
148
resources/views/admin/attribute/index.blade.php
Executable file
|
|
@ -0,0 +1,148 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<h6 class="card-header">
|
||||
{{__('Attribute')}}
|
||||
</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>{{__('Description')}}</th>
|
||||
<th>{{__('Translate') }}</th>
|
||||
<th>{{__('Status')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($values as $value)
|
||||
<tr>
|
||||
<td>
|
||||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
|
||||
data-id="{{ $value->id }}"
|
||||
data-pos="{{ $value->pos }}"
|
||||
data-name="{{ $value->name }}"
|
||||
data-trans_name="{{ json_encode($value->trans_name) }}"
|
||||
data-active="{{ $value->active }}">
|
||||
<span class="far fa-edit"></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>{{ $value->pos }}</td>
|
||||
<td>{{ $value->name }}</td>
|
||||
<td>{{ $value->getTranNames() }}</td>
|
||||
<td data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>@endif</td>
|
||||
<td><a class="text-danger" href="{{ route('admin_product_attribute_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">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
|
||||
data-id="new"
|
||||
data-pos=""
|
||||
data-name=""
|
||||
data-parent_id=""
|
||||
data-active="1"
|
||||
|
||||
>{{__('Neues Attribute erstellen')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Modal template -->
|
||||
<div class="modal fade" id="modals-default">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('admin_product_attribute_store') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="id">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"> {{__('Attribute')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="name" class="form-label">{{__('Name')}}</label>
|
||||
<input type="text" class="form-control" name="name" placeholder="{{__('Bezeichnung')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-6">
|
||||
<label class="custom-control custom-checkbox m-2">
|
||||
<input type="checkbox" class="custom-control-input" name="active" checked>
|
||||
<span class="custom-control-label">{{__('active')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group col-6">
|
||||
<input type="text" class="form-control" name="pos" placeholder="{{__('Number to move the position if necessary')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@foreach($trans as $tran)
|
||||
@if($tran != 'de')
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="name" class="form-label">{{__('Translate')}} <strong style="text-transform: uppercase">{{$tran}}</strong></label>
|
||||
<input type="text" class="form-control" name="trans[{{$tran}}]" id="trans_{{$tran}}" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$('#modals-default').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget);
|
||||
$(this).find(".modal-content input[name='id']").val(button.data('id'));
|
||||
$(this).find(".modal-body input[name='name']").val(button.data('name'));
|
||||
$(this).find(".modal-body input[name='pos']").val(button.data('pos'));
|
||||
$(this).find(".modal-body select[name='parent_id']").val(button.data('parent_id'));
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
|
||||
|
||||
$.each(button.data('trans_name'), function (i, item) {
|
||||
var name = '#trans_'+i;
|
||||
$(name).val(item);
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('.datatables-style').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"aoColumns": [
|
||||
{ "sWidth": "8%" },
|
||||
{ "sWidth": "8%" },
|
||||
{ "sWidth": "19%" },
|
||||
{ "sWidth": "19%" },
|
||||
{ "sWidth": "30%" },
|
||||
{ "sWidth": "10%" },
|
||||
{ "sWidth": "8%" },
|
||||
],
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
158
resources/views/admin/category/index.blade.php
Executable file
158
resources/views/admin/category/index.blade.php
Executable file
|
|
@ -0,0 +1,158 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<h6 class="card-header">
|
||||
{{__('Kategorien')}}
|
||||
</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>{{__('Hauptkategorie')}}</th>
|
||||
<th>{{__('Unterkategorie')}}</th>
|
||||
<th>{{__('Translate') }}</th>
|
||||
<th>{{__('Status')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($values as $value)
|
||||
<tr>
|
||||
<td>
|
||||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
|
||||
data-id="{{ $value->id }}"
|
||||
data-pos="{{ $value->pos }}"
|
||||
data-parent_id="{{ $value->parent_id }}"
|
||||
data-name="{{ $value->name }}"
|
||||
data-trans_name="{{ json_encode($value->trans_name) }}"
|
||||
data-active="{{ $value->active }}">
|
||||
<span class="far fa-edit"></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>{{ $value->pos }}</td>
|
||||
<td>@if($value->parent) {{ $value->parent->name }} @else {{ $value->name }} @endif</td>
|
||||
<td>@if($value->parent) {{ $value->name }} @else - @endif</td>
|
||||
<td>{{ $value->getTranNames() }}</td>
|
||||
<td data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>@endif</td>
|
||||
<td><a class="text-danger" href="{{ route('admin_product_category_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">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
|
||||
data-id="new"
|
||||
data-pos=""
|
||||
data-name=""
|
||||
data-parent_id=""
|
||||
data-active="1"
|
||||
|
||||
>{{__('Neue Kategorie erstellen')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Modal template -->
|
||||
<div class="modal fade" id="modals-default">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('admin_product_category_store') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="id">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"> {{__('Kategorie')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="parent_id" class="form-label">{{__('Main Attribute')}}</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="parent_id">
|
||||
{!! HTMLHelper::getCategoriesWithoutParents() !!}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="name" class="form-label">{{__('Name')}}</label>
|
||||
<input type="text" class="form-control" name="name" placeholder="{{__('Bezeichnung')}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-6">
|
||||
<label class="custom-control custom-checkbox m-2">
|
||||
<input type="checkbox" class="custom-control-input" name="active" checked>
|
||||
<span class="custom-control-label">{{__('active')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group col-6">
|
||||
<input type="text" class="form-control" name="pos" placeholder="{{__('Number to move the position if necessary')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@foreach($trans as $tran)
|
||||
@if($tran != 'de')
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="name" class="form-label">{{__('Translate')}} <strong style="text-transform: uppercase">{{$tran}}</strong></label>
|
||||
<input type="text" class="form-control" name="trans[{{$tran}}]" id="trans_{{$tran}}" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$('#modals-default').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget);
|
||||
$(this).find(".modal-content input[name='id']").val(button.data('id'));
|
||||
$(this).find(".modal-body input[name='name']").val(button.data('name'));
|
||||
$(this).find(".modal-body input[name='pos']").val(button.data('pos'));
|
||||
$(this).find(".modal-body select[name='parent_id']").val(button.data('parent_id'));
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
|
||||
|
||||
$.each(button.data('trans_name'), function (i, item) {
|
||||
var name = '#trans_'+i;
|
||||
$(name).val(item);
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('.datatables-style').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"aoColumns": [
|
||||
{ "sWidth": "8%" },
|
||||
{ "sWidth": "8%" },
|
||||
{ "sWidth": "19%" },
|
||||
{ "sWidth": "19%" },
|
||||
{ "sWidth": "30%" },
|
||||
{ "sWidth": "10%" },
|
||||
{ "sWidth": "8%" },
|
||||
],
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
45
resources/views/admin/product/edit.blade.php
Executable file
45
resources/views/admin/product/edit.blade.php
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-0">
|
||||
{{ __('Create/Edit Produkt') }}
|
||||
</h4>
|
||||
|
||||
{!! Form::open(['url' => route('admin_product_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
|
||||
<input type="hidden" name="id" id="id" value="@if($product->id>0){{$product->id}}@else new @endif">
|
||||
|
||||
<div class="text-left mt-0 mb-2">
|
||||
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>
|
||||
<a href="{{ route('admin_product_show') }}" class="btn btn-default">{{ __('back') }}</a>
|
||||
</div>
|
||||
|
||||
@include('admin.product.form')
|
||||
|
||||
<div class="text-left mt-0 mb-2">
|
||||
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>
|
||||
<a href="{{ route('admin_product_show') }}" class="btn btn-default">{{ __('back') }}</a>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
@include('admin.product.images')
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
130
resources/views/admin/product/form.blade.php
Executable file
130
resources/views/admin/product/form.blade.php
Executable file
|
|
@ -0,0 +1,130 @@
|
|||
|
||||
<div class="card mb-2">
|
||||
|
||||
<h5 class="card-header">
|
||||
{{ __('Produkt') }}
|
||||
|
||||
</h5>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox float-right">
|
||||
{!! Form::checkbox('active', 1, $product->active, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('aktiv')}}</span>
|
||||
</label>
|
||||
<label class="form-label" for="name">{{ __('Name') }}*</label>
|
||||
{{ Form::text('name', $product->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="title">{{ __('Title') }}</label>
|
||||
{{ Form::text('title', $product->title, array('placeholder'=>__('Title'), 'class'=>'form-control', 'id'=>'title')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-8">
|
||||
<label class="form-label" for="title">{{ __('Kategorie(n)') }}</label>
|
||||
<select class="selectpicker" name="categories[]" id="categories" data-style="btn-light" data-live-search="false" multiple>
|
||||
{!! HTMLHelper::getCategoriesOptions($product->categories()->pluck('category_id')->toArray()) !!}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="pos">{{ __('pos') }}</label>
|
||||
{{ Form::text('pos', $product->pos, array('placeholder'=>__('pos'), 'class'=>'form-control', 'id'=>'pos')) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="copy">{{ __('copy') }}</label>
|
||||
{{ Form::textarea('copy', $product->copy , array('placeholder'=>__('Leistungen'), 'class'=>'form-control summernote', 'id'=>'copy')) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-2">
|
||||
<h5 class="card-header">
|
||||
{{ __('Preise') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="price">{{ __('price') }}</label>
|
||||
{{ Form::text('price', $product->getFormattedPrice(), array('placeholder'=>__('price'), 'class'=>'form-control', 'id'=>'price')) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="price_ek">{{ __('price_ek') }}</label>
|
||||
{{ Form::text('price_ek', $product->getFormattedPriceEk(), array('placeholder'=>__('price_ek'), 'class'=>'form-control', 'id'=>'price_ek')) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="tax">{{ __('tax') }}</label>
|
||||
{{ Form::text('tax', $product->getFormattedTax(), array('placeholder'=>__('tax'), 'class'=>'form-control', 'id'=>'tax')) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="price_old">{{ __('price_old') }}</label>
|
||||
{{ Form::text('price_old', $product->getFormattedPriceOld(), array('placeholder'=>__('price_old'), 'class'=>'form-control', 'id'=>'price_old')) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="amount">{{ __('amount') }}</label>
|
||||
{{ Form::text('amount', $product->amount, array('placeholder'=>__('amount'), 'class'=>'form-control', 'id'=>'amount')) }}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card mb-2">
|
||||
<h5 class="card-header">
|
||||
{{ __('Inhalte') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="contents">{{ __('contents') }}</label>
|
||||
{{ Form::text('contents', $product->contents, array('placeholder'=>__('contents'), 'class'=>'form-control', 'id'=>'contents')) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="number">{{ __('number') }}</label>
|
||||
{{ Form::text('number', $product->number, array('placeholder'=>__('number'), 'class'=>'form-control', 'id'=>'number')) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="icons">{{ __('icons') }}</label>
|
||||
{{ Form::text('icons', $product->icons, array('placeholder'=>__('icons'), 'class'=>'form-control', 'id'=>'icons')) }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="title">{{ __('Attribute') }}</label>
|
||||
<select class="selectpicker" name="attributes[]" id="attributes" data-style="btn-light" data-live-search="false" multiple>
|
||||
{!! HTMLHelper::getAttributesOptions($product->attributes()->pluck('attribute_id')->toArray()) !!}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="description">{{ __('description') }}</label>
|
||||
{{ Form::textarea('description', $product->description , array('placeholder'=>__('description'), 'class'=>'form-control summernote', 'id'=>'description')) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="usage">{{ __('usage') }}</label>
|
||||
{{ Form::textarea('usage', $product->usage , array('placeholder'=>__('usage'), 'class'=>'form-control summernote', 'id'=>'usage')) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="ingredients">{{ __('ingredients') }}</label>
|
||||
{{ Form::textarea('ingredients', $product->ingredients , array('placeholder'=>__('ingredients'), 'class'=>'form-control summernote', 'id'=>'ingredients')) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
80
resources/views/admin/product/images.blade.php
Executable file
80
resources/views/admin/product/images.blade.php
Executable file
|
|
@ -0,0 +1,80 @@
|
|||
|
||||
|
||||
|
||||
|
||||
<div class="card mb-2">
|
||||
|
||||
<h5 class="card-header">
|
||||
{{ __('Bilder') }}
|
||||
|
||||
</h5>
|
||||
|
||||
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
@if($product->id>0)
|
||||
<style>
|
||||
.dz-message {
|
||||
margin: 2rem 0;
|
||||
}
|
||||
.default-style .dz-message {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-sm-6">
|
||||
|
||||
<div class="row">
|
||||
@foreach($product->images as $image)
|
||||
<div class="col-6 col-md-4 text-center" style="border: 1px solid #eee;">
|
||||
<img class="img-fluid" alt="" src="{{ route('product_image', [$image->slug]) }}">
|
||||
<br>
|
||||
<a href="{{ route('admin_product_delete_image', [$image->id, $product->id]) }}" class="btn btn-sm btn-primary mt-2 mb-2" onclick="return confirm('Bild wirklich löschen?');">Bild löschen</a>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ route('admin_product_upload_image') }}" accept-charset="UTF-8" class="avatar" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<input type="hidden" name="product_id" value="{{$product->id}}">
|
||||
<div class="slim_holder text-center">
|
||||
<div class="slim" style="margin:20px auto;"
|
||||
data-label='<span class="text-green">Foto-Upload</span><br>(Datei suchen oder Drag & Drop)'
|
||||
data-fetcher="fetch.php"
|
||||
data-size="600,800"
|
||||
data-min-size="200,200"
|
||||
data-max-file-size="10"
|
||||
data-status-image-too-small="Bild zu klein<br>min. $0 Pixel"
|
||||
data-status-file-type="Ungültige Datei<br>bitte nur: $0"
|
||||
data-status-file-size="Die Datei ist zu groß<br>max. $0 MB"
|
||||
data-button-confirm-label="bestätigen"
|
||||
data-button-cancel-label="abbrechen"
|
||||
data-button-confirm-title="bestätigen"
|
||||
data-button-cancel-title="abbrechen"
|
||||
data-button-rotate-title="drehen"
|
||||
data-ratio="3:4">
|
||||
<input type="file" name="images[]" required />
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<button class="btn btn-primary" type="submit">Bild speichern</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<p>Produkt erst speichern</p>
|
||||
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
78
resources/views/admin/product/index.blade.php
Executable file
78
resources/views/admin/product/index.blade.php
Executable file
|
|
@ -0,0 +1,78 @@
|
|||
@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>{{__('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 data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>@endif</td>
|
||||
<td><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": "8%" },
|
||||
{ "sWidth": "8%" },
|
||||
{ "sWidth": "19%" },
|
||||
{ "sWidth": "19%" },
|
||||
{ "sWidth": "30%" },
|
||||
{ "sWidth": "10%" },
|
||||
{ "sWidth": "8%" },
|
||||
],
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Loading…
Add table
Add a link
Reference in a new issue