first commit
This commit is contained in:
commit
0baac018a2
1011 changed files with 145854 additions and 0 deletions
45
resources/views/admin/category/edit.blade.php
Executable file
45
resources/views/admin/category/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-2 mb-2">
|
||||
{{ __('Create/Edit Kategorien') }}
|
||||
</h4>
|
||||
|
||||
{!! Form::open(['url' => route('admin_product_category_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
|
||||
|
||||
<input type="hidden" name="id" id="id" value="@if($category->id>0){{$category->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_categories') }}" class="btn btn-default">{{ __('back') }}</a>
|
||||
</div>
|
||||
|
||||
@include('admin.category.form')
|
||||
|
||||
<div class="text-left mt-0 mb-2">
|
||||
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>
|
||||
<a href="{{ route('admin_product_categories') }}" class="btn btn-default">{{ __('back') }}</a>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
@include('admin.category.images')
|
||||
|
||||
|
||||
@endsection
|
||||
67
resources/views/admin/category/form.blade.php
Executable file
67
resources/views/admin/category/form.blade.php
Executable file
|
|
@ -0,0 +1,67 @@
|
|||
|
||||
<div class="card mb-2">
|
||||
|
||||
<h5 class="card-header">
|
||||
{{ __('Kategorie') }}
|
||||
|
||||
</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, $category->active, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('aktiv')}}</span>
|
||||
</label>
|
||||
<label class="form-label" for="name">{{ __('Name') }}*</label>
|
||||
{{ Form::text('name', $category->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">{{ __('Headline') }}*</label>
|
||||
{{ Form::text('headline', $category->headline, array('placeholder'=>__('Produktwelt'), 'class'=>'form-control', 'id'=>'name', 'required')) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-8">
|
||||
<label for="parent_id" class="form-label">{{__('Hauptkategorie')}}</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="">
|
||||
{!! HTMLHelper::getCategoriesWithoutParents($category->parent_id) !!}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="pos">{{ __('pos') }}</label>
|
||||
{{ Form::text('pos', $category->pos, array('placeholder'=>__('pos'), 'class'=>'form-control', 'id'=>'pos')) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card mb-2">
|
||||
<h5 class="card-header">
|
||||
{{ __('Übersetzungen') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
@foreach($trans as $lang)
|
||||
@if($lang != 'de')
|
||||
<div class="form-row">
|
||||
<div class="form-group col-6">
|
||||
<label for="trans_name_{{$lang}}" class="form-label">{{__('Name')}} <strong style="text-transform: uppercase">{{$lang}}</strong></label>
|
||||
{{ Form::text('trans_name['.$lang.']', $category->getTrans('name', $lang), array('class'=>'form-control', 'id'=>'trans_name_'.$lang)) }}
|
||||
</div>
|
||||
<div class="form-group col-6">
|
||||
<label for="trans_headline_{{$lang}}" class="form-label">{{__('Headline')}} <strong style="text-transform: uppercase">{{$lang}}</strong></label>
|
||||
{{ Form::text('trans_headline['.$lang.']', $category->getTrans('headline', $lang), array('class'=>'form-control', 'id'=>'trans_headline_'.$lang)) }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
93
resources/views/admin/category/images.blade.php
Executable file
93
resources/views/admin/category/images.blade.php
Executable file
|
|
@ -0,0 +1,93 @@
|
|||
|
||||
|
||||
|
||||
|
||||
<div class="card mb-2">
|
||||
|
||||
<h5 class="card-header">
|
||||
{{ __('Headline Bild') }}
|
||||
|
||||
</h5>
|
||||
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
@if($category->id>0)
|
||||
<style>
|
||||
.dz-message {
|
||||
margin: 2rem 0;
|
||||
}
|
||||
.default-style .dz-message {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-12">
|
||||
<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">
|
||||
|
||||
<div class="row">
|
||||
@if($category->headline_image_id)
|
||||
<div class="col-6 col-md-4 text-center" style="border: 1px solid #eee;">
|
||||
<img class="" height="60" alt="" src="{{ route('iq_image', [$category->iq_image->slug]) }}">
|
||||
<br>
|
||||
<a href="{{ route('admin_product_category_image_delete', [$category->iq_image->id, $category->id]) }}" class="btn btn-sm btn-primary mt-2 mb-2" onclick="return confirm('Bild wirklich löschen?');">Bild löschen</a>
|
||||
@if($category->iq_image->active)
|
||||
<a href="{{ route('admin_product_category_image_attribute', [$category->iq_image->id, 'active', 0]) }}" class="btn btn-sm btn-default mt-2 mb-2"><span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span> <i class="far fa-sync"></i></a>
|
||||
@else
|
||||
<a href="{{ route('admin_product_category_image_attribute', [$category->iq_image->id, 'active', 1]) }}" class="btn btn-sm btn-default mt-2 mb-2"><span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span> <i class="far fa-sync"></i></a>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-6">
|
||||
|
||||
@if(!$category->headline_image_id)
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ route('admin_product_category_image_upload') }}" accept-charset="UTF-8" class="avatar" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<input type="hidden" name="category_id" value="{{$category->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="1680,640"
|
||||
data-min-size="100,100"
|
||||
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="">
|
||||
<input type="file" name="images[]" required />
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<button class="btn btn-primary" type="submit">Bild speichern</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<p> Nur ein Bild möglich, vor neuem Upload Bild löschen </p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<p>Kategorie erst anlegen</p>
|
||||
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
73
resources/views/admin/category/index.blade.php
Executable file
73
resources/views/admin/category/index.blade.php
Executable file
|
|
@ -0,0 +1,73 @@
|
|||
@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>{{__('Headline')}}</th>
|
||||
<th>{{__('Translate') }}</th>
|
||||
<th>{{__('Status')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($values as $value)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{route('admin_product_category_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($value->parent) {{ $value->parent->name }} @else {{ $value->name }} @endif</td>
|
||||
<td>@if($value->parent) {{ $value->name }} @else - @endif</td>
|
||||
<td>{{ $value->headline }}</td>
|
||||
<!-- <td>{{ $value->getTranNames() }}</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_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">
|
||||
<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": [[ 1, "asc" ]],
|
||||
"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