mein-sterntours/resources/views/cms/booking/content/index.blade.php
2021-11-09 18:38:44 +01:00

98 lines
No EOL
4.3 KiB
PHP
Executable file

@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-3 mb-1">
Buchnungen PDF Inhalte
</h4>
@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
<div class="card">
<div class="card-datatable table-responsive">
<table class="datatables-feedbacks table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Name')}}</th>
<th>{{__('Vorlage')}}</th>
<th>{{__('Länder')}}</th>
<th>{{__('auto')}}</th>
<th>{{__('aktiv')}}</th>
<th>{{__('')}}</th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td data-sort="{{ $value->id }}">
<a href="{{ route('cms_booking_content_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
<span class="fa fa-edit"></span>
</a>
</td>
<td>
<button type="button" class="btn icon-btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-load-content"
data-id="{{$value->id}}"
data-model="CMSContent"
data-action="modal-cms_booking_content_edit"
data-back="{{route('cms_booking_content')}}"
data-url="{{ route('cms_booking_content_detail', [$value->id]) }}"
data-identifier="{{ $identifier_general_name }}"
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span></button> &nbsp;{{ $value->name }}
</td>
<td>{{ \App\Services\Model::getCMSContentGeneralNameById($value->getObjectBy('general_id')) }}</td>
<td>x</td>
<td>x</td>
<td>x</td>
<td>
<a class="text-danger" href="{{ route('cms_booking_content_delete', [$value->id, 'name']) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="ml-3 mb-2">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
data-id="new"
data-model="CMSContent"
data-action="modal-cms_booking_content_edit"
data-back="{{route('cms_booking_content')}}"
data-url="{{ route('cms_booking_content_detail', [$value->id]) }}"
data-identifier="{{ $identifier_general_name }}"
data-route="{{ route('modal_load') }}">Neue PDF Vorlage anlegen</button>
</div>
<script>
$('#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 select[name='general_id']").val(button.data('general_id'));
$('.selectpicker').selectpicker('refresh');
});
$( document ).ready(function() {
$('.datatables-feedbacks').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
},
});
});
</script>
</div>
@endsection