Homparty dev
This commit is contained in:
parent
9252094a04
commit
ac0d5b781e
60 changed files with 3443 additions and 293 deletions
|
|
@ -25,7 +25,7 @@
|
|||
<div class="row">
|
||||
|
||||
<div class="col-12">
|
||||
<p>Bild wird rechts hinter die Headline gesetzt und automatisch auf eine Höhe von 60 Pixel skaliert.</p>
|
||||
<p>Bild wird hinter oder unter die Headline gesetzt und einer Breite von 100% ausgegeben.</p>
|
||||
</div>
|
||||
<div class="col-md-8 col-sm-6">
|
||||
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
<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,400"
|
||||
data-size="1680,640"
|
||||
data-min-size="100,100"
|
||||
data-max-file-size="10"
|
||||
data-status-image-too-small="Bild zu klein<br>min. $0 Pixel"
|
||||
|
|
|
|||
37
resources/views/admin/ingredient/edit.blade.php
Executable file
37
resources/views/admin/ingredient/edit.blade.php
Executable 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>
|
||||
<a href="{{ route('admin_product_ingredients') }}" class="btn btn-default">{{ __('back') }}</a>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
@endsection
|
||||
43
resources/views/admin/ingredient/form.blade.php
Executable file
43
resources/views/admin/ingredient/form.blade.php
Executable 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>
|
||||
72
resources/views/admin/ingredient/index.blade.php
Executable file
72
resources/views/admin/ingredient/index.blade.php
Executable 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;"> </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
|
||||
|
|
@ -242,10 +242,51 @@
|
|||
{{ 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">{{ __('Inhaltsstoffe') }}</label>
|
||||
<label class="form-label" for="ingredients">{{ __('Hinweise') }}</label>
|
||||
{{ Form::textarea('ingredients', $product->ingredients , array('placeholder'=>__('ingredients'), 'class'=>'form-control summernote', 'id'=>'ingredients')) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-2">
|
||||
<h5 class="card-header">
|
||||
{{ __('Inhalte') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
<table class="datatables-style table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('INCI')}}</th>
|
||||
<th>{{__('Wirkung') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($product->p_ingredients as $ingredient)
|
||||
<tr>
|
||||
<td>{{ $ingredient->name }}</td>
|
||||
<td>{{ $ingredient->inci }}</td>
|
||||
<td>{{ $ingredient->effect }}</td>
|
||||
<td><a class="text-danger" href="{{ route('admin_product_delete', [$product->id, 'ingredient', $ingredient->id]) }}" onclick="return confirm('{{__('Eintrag entfernen?')}}');"><i class="far fa-trash-alt"></i></a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-10">
|
||||
<label class="form-label" for="title">{{ __('Inhaltsstoffe hinzufügen (Mehrfachauswahl)') }}</label>
|
||||
<select class="selectpicker" name="product_ingredients[]" id="product_ingredients" data-style="btn-light" data-live-search="false" multiple>
|
||||
{!! HTMLHelper::getProductIngredientsOptions($product->p_ingredients()->pluck('ingredient_id')->toArray()) !!}
|
||||
</select>
|
||||
<a class="btn btn-default btn-xs mt-2" href="{{route('admin_product_ingredients')}}">Inhaltsstoffe anlegen</a>
|
||||
</div>
|
||||
<div class="form-group col-sm-2">
|
||||
<button type="submit" class="btn btn-submit mt-0 mt-sm-4">{{ __('save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
<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="1920,400"
|
||||
data-size="1920,640"
|
||||
data-min-size="100,100"
|
||||
data-max-file-size="10"
|
||||
data-status-image-too-small="Bild zu klein<br>min. $0 Pixel"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue