user shops + shipping

This commit is contained in:
Kevin Adametz 2019-01-06 01:40:44 +01:00
parent ccc2af4bf7
commit d4f6a774d0
53 changed files with 2326 additions and 814 deletions

View file

@ -0,0 +1,72 @@
@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-2 mb-2">
{{ __('Create/Edit Versandkosten') }}
</h4>
{!! Form::open(['url' => route('admin_shipping_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
<input type="hidden" name="id" id="id" value="@if($value->id>0){{$value->id}}@else new @endif">
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>&nbsp;
<a href="{{ route('admin_shippings') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{ __('Versandkosten') }}
</h5>
<div class="card-body">
<div class="form-group">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $value->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
<label class="form-label" for="name">{{ __('Name') }}*</label>
{{ Form::text('name', $value->name, array('placeholder'=>__('Name'), 'class'=>'form-control'.($errors->has('name') ? ' is-invalid' : ''), 'id'=>'name', 'required')) }}
</div>
@if ($errors->has('name'))
<span class="invalid-feedback" style="display: inline-block;">
<strong>{{ $errors->first('name') }}</strong>
</span>
@endif
<div class="form-group">
<label class="form-label" for="title">{{ __('Free') }}</label>
{{ Form::text('free', $value->getFormattedFree(), array('placeholder'=>__('Free'), 'class'=>'form-control', 'id'=>'free')) }}
</div>
</div>
</div>
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>&nbsp;
<a href="{{ route('admin_shippings') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
{!! Form::close() !!}
@endsection

View file

@ -0,0 +1,59 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">
{{__('Versandkosten')}}
</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_shipping_edit', [$value->id])}}" 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 }}">@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_shipping_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_shipping_edit', ['new'])}}" class="btn btn-sm btn-primary">
{{__('Neue Versandkosten erstellen')}}
</a>
</div>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"aoColumns": [
{ "sWidth": "10%" },
{ "sWidth": "80%" },
{ "sWidth": "10%" },
],
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection