23.11 Upload to live

This commit is contained in:
Kevin Adametz 2019-11-23 15:02:41 +01:00
parent 8cae2f92a4
commit 8ebdacec98
80 changed files with 7320 additions and 3937 deletions

View file

@ -12,7 +12,7 @@
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Pos')}}</th>
<th>{{__('Hauptkategorie')}}</th>
<th>{{__('Unterkategorie')}}</th>
<th>{{__('Headline')}}</th>
<th>{{__('Translate') }}</th>
<th>{{__('Status')}}</th>
<th></th>
@ -22,20 +22,15 @@
@foreach($values as $value)
<tr>
<td>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="{{ $value->id }}"
data-pos="{{ $value->pos }}"
data-parent_id="{{ $value->parent_id }}"
data-name="{{ $value->name }}"
data-trans_name="{{ json_encode($value->trans_name) }}"
data-active="{{ $value->active }}">
<a href="{{route('admin_product_category_edit', [$value->id])}}" class="btn icon-btn btn-sm btn-primary">
<span class="far fa-edit"></span>
</button>
</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->getTranNames() }}</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="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_product_category_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
@ -44,102 +39,22 @@
</tbody>
</table>
<div class="mt-4 ml-4">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="new"
data-pos=""
data-name=""
data-parent_id=""
data-active="1"
>{{__('Neue Kategorie erstellen')}}</button>
<a href="{{route('admin_product_category_edit', ['new'])}}" class="btn btn-sm btn-primary">
{{__('Neue Kategorie erstellen')}}
</a>
</div>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-default">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_product_category_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title"> {{__('Kategorie')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="parent_id" class="form-label">{{__('Main Attribute')}}</label>
<select class="selectpicker" data-style="btn-default" name="parent_id">
{!! HTMLHelper::getCategoriesWithoutParents() !!}
</select>
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Name')}}</label>
<input type="text" class="form-control" name="name" placeholder="{{__('Bezeichnung')}}">
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label class="custom-control custom-checkbox m-2">
<input type="checkbox" class="custom-control-input" name="active" checked>
<span class="custom-control-label">{{__('active')}}</span>
</label>
</div>
<div class="form-group col-6">
<input type="text" class="form-control" name="pos" placeholder="{{__('Number to move the position if necessary')}}">
</div>
</div>
<hr>
@foreach($trans as $tran)
@if($tran != 'de')
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Translate')}} <strong style="text-transform: uppercase">{{$tran}}</strong></label>
<input type="text" class="form-control" name="trans[{{$tran}}]" id="trans_{{$tran}}" placeholder="">
</div>
</div>
@endif
@endforeach
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-default').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='name']").val(button.data('name'));
$(this).find(".modal-body input[name='pos']").val(button.data('pos'));
$(this).find(".modal-body select[name='parent_id']").val(button.data('parent_id'));
$('.selectpicker').selectpicker('refresh');
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
$.each(button.data('trans_name'), function (i, item) {
var name = '#trans_'+i;
$(name).val(item);
});
});
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"order": [[ 1, "asc" ]],
"aoColumns": [
{ "sWidth": "8%" },
{ "sWidth": "8%" },