This commit is contained in:
Kevin Adametz 2020-01-02 19:22:30 +01:00
parent f03862b523
commit 1a43060996
42 changed files with 1160 additions and 83 deletions

View file

@ -0,0 +1,43 @@
@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 Land') }}
</h4>
{!! Form::open(['url' => route('admin_country_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
<input type="hidden" name="id" id="id" value="@if($country->id>0){{$country->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_countries') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
@include('admin.country.form')
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>&nbsp;
<a href="{{ route('admin_countries') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
{!! Form::close() !!}
@endsection

View file

@ -0,0 +1,102 @@
<div class="card mb-2">
<h5 class="card-header">
{{ __('Land') }}
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $country->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-sm-6">
<label class="form-label" for="de">{{ __('Name DE') }}*</label>
{{ Form::text('name', $country->de, array('placeholder'=>__('Land DE'), 'class'=>'form-control', 'id'=>'de', 'required')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="en">{{ __('Name EN') }}</label>
{{ Form::text('en', $country->en, array('placeholder'=>__('Land EN'), 'class'=>'form-control', 'id'=>'en')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="es">{{ __('Name ES') }}*</label>
{{ Form::text('es', $country->es, array('placeholder'=>__('Land ES'), 'class'=>'form-control', 'id'=>'es')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="fr">{{ __('Name FR') }}</label>
{{ Form::text('fr', $country->fr, array('placeholder'=>__('Land FR'), 'class'=>'form-control', 'id'=>'fr')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="it">{{ __('Name IT') }}</label>
{{ Form::text('it', $country->it, array('placeholder'=>__('Land IT'), 'class'=>'form-control', 'id'=>'it')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="ru">{{ __('Name RU') }}</label>
{{ Form::text('ru', $country->ru, array('placeholder'=>__('Land RU'), 'class'=>'form-control', 'id'=>'ru')) }}
</div>
</div>
<hr>
<div class="form-row">
<div class="form-group col-sm-6">
<label class="form-label" for="code">{{ __('code') }}</label>
{{ Form::text('code', $country->code, array('placeholder'=>__('code'), 'class'=>'form-control', 'id'=>'code')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="phone">{{ __('phone') }}</label>
{{ Form::text('phone', $country->phone, array('placeholder'=>__('phone'), 'class'=>'form-control', 'id'=>'phone')) }}
</div>
</div>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{ __('Pflichtfelder') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-sm-3">
<label class="custom-control custom-checkbox">
{!! Form::checkbox('attr[tax_number]', 1, $country->getAttrByKey('tax_number'), ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('SteuerNr.')}}</span>
</label>
</div>
<div class="form-group col-sm-3">
<label class="custom-control custom-checkbox">
{!! Form::checkbox('attr[tax_id_number]', 1, $country->getAttrByKey('tax_id_number'), ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('UST-ID')}}</span>
</label>
</div>
<div class="form-group col-sm-3">
<label class="custom-control custom-checkbox">
{!! Form::checkbox('attr[taxable_sales]', 1, $country->getAttrByKey('taxable_sales'), ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('Umsatzsteuerpflichtig')}}</span>
</label>
</div>
</div>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{ __('Übersetzungen') }}
</h5>
<div class="card-body">
@foreach($trans as $lang)
@if(!in_array($lang, ['en', 'de', 'es', 'fr', 'it', 'ru']))
<div class="form-row">
<div class="form-group col-12">
<label for="trans_name_{{$lang}}" class="form-label">{{__('Name')}} <strong style="text-transform: uppercase">{{$lang}}</strong></label>
{{ Form::text('trans_name['.$lang.']', $country->getLocated($lang), array('class'=>'form-control', 'id'=>'trans_name_'.$lang)) }}
</div>
</div>
@endif
@endforeach
</div>
</div>

View file

@ -0,0 +1,67 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">
{{__('Länder')}}
</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>{{__('DE')}}</th>
<th>{{__('Code')}}</th>
<th>{{__('Phone')}}</th>
<th>{{__('Status')}}</th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td data-sort="{{ $value->id }}">
<a href="{{route('admin_country_edit', [$value->id])}}" class="btn icon-btn btn-sm btn-primary">
<span class="far fa-edit"></span>
</a>
</td>
<td>{{ $value->de }}</td>
<td>{{ $value->code }}</td>
<td>{{ $value->phone }}</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>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
<!-- <a href="{{route('admin_product_category_edit', ['new'])}}" class="btn btn-sm btn-primary">
{{__('Neue Kategorie erstellen')}}
</a>
-->
</div>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"order": [[ 0, "asc" ]],
"aoColumns": [
{ "sWidth": "8%" },
{ "sWidth": "20%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "8%" },
],
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection