Mehrere Tickets 49, 50, 51, 52, 53
This commit is contained in:
parent
ae70577289
commit
e3495be8b8
61 changed files with 1904 additions and 344 deletions
189
resources/views/cms/booking/all/detail.blade.php
Executable file
189
resources/views/cms/booking/all/detail.blade.php
Executable file
|
|
@ -0,0 +1,189 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<style>
|
||||
/* body {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}*/
|
||||
.btn-xs {
|
||||
line-height: 1.3em;
|
||||
}
|
||||
.table tbody + tbody {
|
||||
border-top: 1px solid #9c9c9c;
|
||||
}
|
||||
.table th, .table td {
|
||||
border-top: none;
|
||||
}
|
||||
.table tr.border-none td, .table tr.border-none th {
|
||||
border-top: none;
|
||||
}
|
||||
.table .thead-dark th {
|
||||
color: #4E5155;
|
||||
background-color: rgba(24, 28, 33, 0.1);
|
||||
border-color: rgba(63, 69, 74, 0.1);
|
||||
}
|
||||
|
||||
.input-group-text {
|
||||
padding: 0.438rem 0.475rem;
|
||||
}
|
||||
|
||||
.note-editing-area {
|
||||
border-radius: 0.25rem;
|
||||
border: 1px solid rgba(24, 28, 33, 0.1);
|
||||
padding: 0.438rem 0.875rem;
|
||||
color: #4E5155;
|
||||
-webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
|
||||
transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
|
||||
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
||||
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.note-editor.note-frame .note-editing-area .note-editable, .note-editor.note-airframe .note-editing-area .note-editable {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.note-editor.note-frame .note-editing-area:focus-within , .note-editor.note-airframe .note-editing-area:focus-within {
|
||||
border-color: #648859;
|
||||
}
|
||||
.note-editing-area .note-editable li {
|
||||
margin-bottom:0.5rem;
|
||||
}
|
||||
.note-editor.note-airframe .note-placeholder {
|
||||
padding: 0;
|
||||
}
|
||||
.draft_item_tbody .form-control {
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Buchnungen PDF Vorlage / {{ $general_name->name }}
|
||||
<div class="float-right">
|
||||
<a href="{{ route('cms_booking_all') }}" class="btn btn-default btn-sm">zurück</a>
|
||||
</div>
|
||||
</h4>
|
||||
|
||||
|
||||
<div class="card">
|
||||
{!! Form::open(['url' => route('cms_booking_all_detail', [$general_name->id]), 'class' => 'form-horizontal']) !!}
|
||||
@if(count($contents))
|
||||
@php($i = 1)
|
||||
<div class="table-responsive mb-4">
|
||||
<table class="table mb-0" id="table_dragula_tbody" style="min-width: 1080px">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th style="width: 1em"></th>
|
||||
<th style="width: 1em">#</th>
|
||||
<th>Abschnitte</th>
|
||||
<th style="width: 8em">#</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach($contents as $content)
|
||||
<tbody class="draft_item_tbody">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="handle ion ion-ios-move d-inline-block bg-primary text-white p-1"></span>
|
||||
</td>
|
||||
<td><span class="item_pos_number">{{ $i++ }}</span></td>
|
||||
<td>
|
||||
{{ Form::text('contents['.$content->id.'][name]', $content->name, array('placeholder'=>__('Abschnitt*'), 'class'=>'form-control', 'id'=>'contents_'.$content->id.'_name', 'required')) }}
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" name="" value="up_{{$content->id}}" class="btn btn-xs btn-default move-up-btn"><i class="fa fa-arrow-up"></i> </button>
|
||||
<button type="button" name="" value="down_{{$content->id}}" class="btn btn-xs btn-default mr-2 move-down-btn"><i class="fa fa-arrow-down"></i> </button>
|
||||
<a class="text-danger" href="{{ route('cms_booking_all_delete', [$content->id, 'item']) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-none">
|
||||
<td colspan="2" style="vertical-align: bottom">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-secondary btn-sm" title="speichern"><i class="ion ion-ios-save"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::textarea('contents['.$content->id.'][full_text]', $content->getContent(), array('class'=>'form-control autoExpand summernote-air', 'id'=>'contents_'.$content->id.'_name', 'rows'=>'1', 'data-min-rows'=>'1')) }}
|
||||
</td>
|
||||
<td>
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('contents['.$content->id.'][in_pdf]', 1, ($content->decimal > 0), ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('in PDF')}}</span>
|
||||
</label>
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('contents['.$content->id.'][page-break]', 1, ($content->getObjectBy('page-break') > 0), ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label" style="white-space: nowrap;">{{__('Neue Seite')}}</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@endforeach
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="text-left mt-3 m-2">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-submit btn-sm">{{ __('save changes') }}</button>
|
||||
<div class="float-right">
|
||||
<button type="submit" name="action" value="addItem" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> Neuen Abschnitt hinzufügen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$.dragYScroll();
|
||||
var sort_item_pos_number = function(){
|
||||
var index = 1;
|
||||
$('#table_dragula_tbody .draft_item_tbody').each(function () {
|
||||
$(this).find('.item_pos_number').html(index);
|
||||
$(this).data('rowPosition', index);
|
||||
index++;
|
||||
});
|
||||
};
|
||||
$(function() {
|
||||
// Drag handle
|
||||
var sortableItems = dragula([$('#table_dragula_tbody')[0]], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('handle');
|
||||
}
|
||||
});
|
||||
sortableItems.on('dragend', function() {
|
||||
//sort new
|
||||
sort_item_pos_number();
|
||||
});
|
||||
});
|
||||
$('table .move-up-btn').on('click', function () {
|
||||
var thisRow = $(this).closest('tbody');
|
||||
var prevRow = thisRow.prev();
|
||||
if (prevRow.length) {
|
||||
prevRow.before(thisRow);
|
||||
sort_item_pos_number()
|
||||
|
||||
}
|
||||
});
|
||||
$('table .move-down-btn').on('click', function () {
|
||||
var thisRow = $(this).closest('tbody');
|
||||
var nextRow = thisRow.next();
|
||||
if (nextRow.length) {
|
||||
nextRow.after(thisRow);
|
||||
sort_item_pos_number()
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
113
resources/views/cms/booking/all/index.blade.php
Executable file
113
resources/views/cms/booking/all/index.blade.php
Executable file
|
|
@ -0,0 +1,113 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Buchnungen PDF Vorlagen
|
||||
</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;"> </th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($values as $value)
|
||||
<tr>
|
||||
<td data-sort="{{ $value->id }}">
|
||||
<a href="{{ route('cms_booking_all_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $value->name }}
|
||||
<a href="#" class="text-primary" data-toggle="modal" data-target="#modals-default"
|
||||
data-id="{{ $value->id }}"
|
||||
data-name="{{ $value->name }}">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a class="text-danger" href="{{ route('cms_booking_all_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-default"
|
||||
data-id="new"
|
||||
data-name=""
|
||||
>Neue PDF Vorlage anlegen</button>
|
||||
</div>
|
||||
|
||||
<!-- Modal template -->
|
||||
<div class="modal fade" id="modals-default">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('cms_booking_all_detail') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="id" value="">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Buchnungen PDF Vorlagen <span class="font-weight-light">anlegen/bearbeiten</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="name" class="form-label">Name*</label>
|
||||
<input type="text" class="form-control" name="name" placeholder="{{__('Name')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary" name="action" value="newOrSaveName" >{{__('save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</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'));
|
||||
});
|
||||
|
||||
$( document ).ready(function() {
|
||||
$('.datatables-feedbacks').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</div>
|
||||
@endsection
|
||||
249
resources/views/cms/booking/content/detail.blade.php
Executable file
249
resources/views/cms/booking/content/detail.blade.php
Executable file
|
|
@ -0,0 +1,249 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<style>
|
||||
/* body {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}*/
|
||||
.btn-xs {
|
||||
line-height: 1.3em;
|
||||
}
|
||||
.table tbody + tbody {
|
||||
border-top: 1px solid #9c9c9c;
|
||||
}
|
||||
.table th, .table td {
|
||||
border-top: none;
|
||||
}
|
||||
.table tr.border-none td, .table tr.border-none th {
|
||||
border-top: none;
|
||||
}
|
||||
.table .thead-dark th {
|
||||
color: #4E5155;
|
||||
background-color: rgba(24, 28, 33, 0.1);
|
||||
border-color: rgba(63, 69, 74, 0.1);
|
||||
}
|
||||
|
||||
.input-group-text {
|
||||
padding: 0.438rem 0.475rem;
|
||||
}
|
||||
|
||||
.note-editing-area {
|
||||
border-radius: 0.25rem;
|
||||
border: 1px solid rgba(24, 28, 33, 0.1);
|
||||
padding: 0.438rem 0.875rem;
|
||||
color: #4E5155;
|
||||
-webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
|
||||
transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
|
||||
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
||||
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.note-editor.note-frame .note-editing-area .note-editable, .note-editor.note-airframe .note-editing-area .note-editable {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.note-editor.note-frame .note-editing-area:focus-within , .note-editor.note-airframe .note-editing-area:focus-within {
|
||||
border-color: #648859;
|
||||
}
|
||||
.note-editing-area .note-editable li {
|
||||
margin-bottom:0.5rem;
|
||||
}
|
||||
.note-editor.note-airframe .note-placeholder {
|
||||
padding: 0;
|
||||
}
|
||||
.draft_item_tbody .form-control {
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Buchnungen PDF Inhalte / {{ $content_name->name }}
|
||||
<div class="float-right">
|
||||
<a href="{{ route('cms_booking_content') }}" class="btn btn-default btn-sm">zurück</a>
|
||||
</div>
|
||||
</h4>
|
||||
|
||||
|
||||
<div class="card">
|
||||
{!! Form::open(['url' => route('cms_booking_content_detail', [$content_name->id]), 'class' => 'form-horizontal', 'id'=>'booking-content-detail-form']) !!}
|
||||
{{ Form::hidden('content_pos_id', '') }}
|
||||
{{ Form::hidden('action', '') }}
|
||||
|
||||
@if(count($contents))
|
||||
@php($i = 1)
|
||||
|
||||
<div class="table-responsive mb-4">
|
||||
<table class="table mb-0" id="table_dragula_tbody" style="min-width: 1080px">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th style="width: 1em"></th>
|
||||
<th style="width: 1em">#</th>
|
||||
<th>Abschnitte</th>
|
||||
<th style="width: 8em">#</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach($contents as $content)
|
||||
@if($content->decimal > 0)
|
||||
<tbody class="draft_item_tbody">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="ion ion-ios-lock d-inline-block bg-dark text-white p-1 px-2"></span>
|
||||
{{-- <span class="handle ion ion-ios-move d-inline-block bg-primary text-white p-1"></span> --}}
|
||||
</td>
|
||||
<td><span class="item_pos_number">{{ $i++ }}</span></td>
|
||||
<td>
|
||||
{{ Form::text('contents['.$content->id.'][name]', $content->name, array('placeholder'=>__('Abschnitt*'), 'class'=>'form-control', 'id'=>'contents_'.$content->id.'_name', 'readonly')) }}
|
||||
{{ Form::hidden('contents['.$content->id.'][identifier]', $identifier_general) }}
|
||||
</td>
|
||||
<td>
|
||||
{{--
|
||||
<button type="button" name="" value="up_{{$content->id}}" class="btn btn-xs btn-default move-up-btn"><i class="fa fa-arrow-up"></i> </button>
|
||||
<button type="button" name="" value="down_{{$content->id}}" class="btn btn-xs btn-default mr-2 move-down-btn"><i class="fa fa-arrow-down"></i> </button>
|
||||
<a class="text-danger" href="{{ route('cms_fewo_all_delete', [$content->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
--}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-none">
|
||||
<td colspan="2" style="vertical-align: bottom">
|
||||
<button type="button" name="action" value="addItem" class="btn btn-xs btn-primary btn-add-item" title="Abschnitt hinzufügen" data-pos-id="{{$content->id}}"><i class="fa fa-plus"></i> <i class="fa fa-arrow-down"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
<div class="note-editing-area readonly">
|
||||
{!! $content->getContent() !!}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{{-- --}}
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('contents['.$content->id.'][in_pdf]', 1, ($content->decimal > 0), ['class'=>'custom-control-input', 'disabled']) !!}
|
||||
<span class="custom-control-label">{{__('in PDF')}}</span>
|
||||
</label>
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('contents['.$content->id.'][page-break]', 1, ($content->getObjectBy('page-break') > 0), ['class'=>'custom-control-input', 'disabled']) !!}
|
||||
<span class="custom-control-label" style="white-space: nowrap;">{{__('Neue Seite')}}</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
@endif
|
||||
@if($booking_contents = \App\Services\Booking::getBookingCMSContent($content, $identifier_content))
|
||||
@foreach($booking_contents as $content)
|
||||
<tbody class="draft_item_tbody">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="handle ion ion-ios-move d-inline-block bg-primary text-white p-1"></span>
|
||||
</td>
|
||||
<td><span class="item_pos_number">{{ $i++ }}</span></td>
|
||||
<td>
|
||||
{{ Form::text('contents['.$content->id.'][name]', $content->name, array('placeholder'=>__('Abschnitt*'), 'class'=>'form-control', 'id'=>'contents_'.$content->id.'_name', 'required')) }}
|
||||
{{ Form::hidden('contents['.$content->id.'][identifier]', $identifier_content) }}
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" name="" value="up_{{$content->id}}" class="btn btn-xs btn-default move-up-btn"><i class="fa fa-arrow-up"></i> </button>
|
||||
<button type="button" name="" value="down_{{$content->id}}" class="btn btn-xs btn-default mr-2 move-down-btn"><i class="fa fa-arrow-down"></i> </button>
|
||||
<a class="text-danger" href="{{ route('cms_booking_content_delete', [$content->id, 'item']) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-none">
|
||||
<td colspan="2" style="vertical-align: bottom">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-secondary btn-sm" title="speichern"><i class="ion ion-ios-save"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::textarea('contents['.$content->id.'][full_text]', $content->getContent(), array('class'=>'form-control autoExpand summernote-air', 'id'=>'contents_'.$content->id.'_name', 'rows'=>'1', 'data-min-rows'=>'1')) }}
|
||||
</td>
|
||||
<td>
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('contents['.$content->id.'][in_pdf]', 1, ($content->decimal > 0), ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('in PDF')}}</span>
|
||||
</label>
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('contents['.$content->id.'][page-break]', 1, ($content->getObjectBy('page-break') > 0), ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label" style="white-space: nowrap;">{{__('Neue Seite')}}</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@endforeach
|
||||
|
||||
@endif
|
||||
@endforeach
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="text-left mt-3 m-2">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-submit btn-sm">{{ __('save changes') }}</button>
|
||||
|
||||
<div class="float-right">
|
||||
<button type="submit" name="action" value="previewPDF" class="btn btn-sm btn-info"><i class="fa fa-file-pdf"></i> Vorschau PDF</button>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.btn-add-item').on('click', function () {
|
||||
$('input[name=content_pos_id]').val($(this).data('pos-id'));
|
||||
$('input[name=action]').val('addItem');
|
||||
$("#booking-content-detail-form").submit();
|
||||
});
|
||||
$.dragYScroll();
|
||||
var sort_item_pos_number = function(){
|
||||
var index = 1;
|
||||
$('#table_dragula_tbody .draft_item_tbody').each(function () {
|
||||
$(this).find('.item_pos_number').html(index);
|
||||
$(this).data('rowPosition', index);
|
||||
index++;
|
||||
});
|
||||
};
|
||||
$(function() {
|
||||
// Drag handle
|
||||
var sortableItems = dragula([$('#table_dragula_tbody')[0]], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('handle');
|
||||
}
|
||||
});
|
||||
sortableItems.on('dragend', function() {
|
||||
//sort new
|
||||
sort_item_pos_number();
|
||||
});
|
||||
});
|
||||
$('table .move-up-btn').on('click', function () {
|
||||
var thisRow = $(this).closest('tbody');
|
||||
var prevRow = thisRow.prev();
|
||||
if (prevRow.length) {
|
||||
prevRow.before(thisRow);
|
||||
sort_item_pos_number()
|
||||
|
||||
}
|
||||
});
|
||||
$('table .move-down-btn').on('click', function () {
|
||||
var thisRow = $(this).closest('tbody');
|
||||
var nextRow = thisRow.next();
|
||||
if (nextRow.length) {
|
||||
nextRow.after(thisRow);
|
||||
sort_item_pos_number()
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
124
resources/views/cms/booking/content/index.blade.php
Executable file
124
resources/views/cms/booking/content/index.blade.php
Executable file
|
|
@ -0,0 +1,124 @@
|
|||
@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;"> </th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('Vorlage')}}</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>
|
||||
{{ $value->name }}
|
||||
<a href="#" class="text-primary" data-toggle="modal" data-target="#modals-default"
|
||||
data-id="{{ $value->id }}"
|
||||
data-name="{{ $value->name }}"
|
||||
data-general_id="{{ $value->getObjectBy('general_id') }}">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ \App\Services\Model::getCMSContentGeneralNameById($value->getObjectBy('general_id')) }}</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-default"
|
||||
data-id="new"
|
||||
data-name=""
|
||||
data-general_id=""
|
||||
>Neue PDF Vorlage anlegen</button>
|
||||
</div>
|
||||
|
||||
<!-- Modal template -->
|
||||
<div class="modal fade" id="modals-default">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('cms_booking_content_detail') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="id" value="">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Buchnungen PDF Inhalte <span class="font-weight-light">anlegen/bearbeiten</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="name" class="form-label">Name*</label>
|
||||
<input type="text" class="form-control" name="name" placeholder="{{__('Name')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="general_id" class="form-label">{{__('Vorlage')}}*</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="general_id" data-live-search="true" required>
|
||||
{!! HTMLHelper::getCMSContentOptions($identifier_general_name, false, false) !!}
|
||||
</select>
|
||||
<i>Ein PDF Inhalt benötigt eine Vorlage mit min einen Eintrag.</i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary" name="action" value="newOrSaveName" >{{__('save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</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
|
||||
|
|
@ -206,7 +206,6 @@
|
|||
<div class="float-right">
|
||||
<button type="submit" name="action" value="previewPDF" class="btn btn-sm btn-info"><i class="fa fa-file-pdf"></i> Vorschau PDF</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
<script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue