Homparty dev

This commit is contained in:
Kevin Adametz 2020-12-16 20:03:51 +01:00
parent 9252094a04
commit ac0d5b781e
60 changed files with 3443 additions and 293 deletions

View file

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

View file

@ -0,0 +1,43 @@
<div class="card mb-2">
<h5 class="card-header">
{{ __('Inhaltsstoff') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $model->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
<label class="form-label" for="name">{{ __('Name') }}*</label>
{{ Form::text('name', $model->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label class="form-label" for="headline">{{ __('INCI') }}</label>
{{ Form::textarea('inci', $model->inci, array('placeholder'=>__('INCI'), 'class'=>'form-control', 'id'=>'inci', 'rows'=>3)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label class="form-label" for="headline">{{ __('Wirkung') }}</label>
{{ Form::textarea('effect', $model->effect, array('placeholder'=>__('Wirkung'), 'class'=>'form-control', 'id'=>'inci', 'rows'=>3)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-2">
<label class="form-label" for="pos">{{ __('pos') }}</label>
{{ Form::text('pos', $model->pos, array('placeholder'=>__('pos'), 'class'=>'form-control', 'id'=>'pos')) }}
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,72 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">
{{__('Inhaltsstoffe')}}
</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>{{__('Pos')}}</th>
<th>{{__('Name')}}</th>
<th>{{__('INCI')}}</th>
<th>{{__('Wirkung') }}</th>
<th>{{__('Status')}}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td>
<a href="{{route('admin_product_ingredient_edit', [$value->id])}}" class="btn icon-btn btn-sm btn-primary">
<span class="far fa-edit"></span>
</a>
</td>
<td>{{ $value->pos }}</td>
<td>{{ $value->name }}</td>
<td>{{ $value->inci }}</td>
<td>{{ $value->effect }}</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-danger" href="{{ route('admin_product_ingredient_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_ingredient_edit', ['new'])}}" class="btn btn-sm btn-primary">
{{__('Neuen Inhaltsstoff erstellen')}}
</a>
</div>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 100,
"order": [[ 1, "asc" ]],
"aoColumns": [
{ "sWidth": "8%" },
{ "sWidth": "8%" },
{ "sWidth": "19%" },
{ "sWidth": "19%" },
{ "sWidth": "30%" },
{ "sWidth": "10%" },
{ "sWidth": "8%" },
],
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection