17 nov 2018
This commit is contained in:
parent
0c9a118281
commit
765d6a2f6b
52 changed files with 3200 additions and 229 deletions
|
|
@ -4,9 +4,80 @@
|
|||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Vorlage verwalten
|
||||
<span class="float-right">
|
||||
<button class="btn btn-sm btn-warning" data-toggle="modal" data-target="#exampleNotice"><i class="fa">?</i> </button>
|
||||
</span>
|
||||
</h4>
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleNotice" tabindex="-1" role="dialog" aria-labelledby="exampleNoticeTitle" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleNoticeTitle">Hinweise</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
Hinweise zu Platzhaltern im den Vorlagen:
|
||||
</p>
|
||||
<style>
|
||||
ul.exampleModal {
|
||||
padding-left: 15px;
|
||||
}
|
||||
ul.exampleModal li {
|
||||
border-bottom: 1px solid #cfcfcf;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
</style>
|
||||
<ul class="exampleModal">
|
||||
|
||||
<li><strong>#Name#</strong> (in jedem Textfeld)<br>
|
||||
Name der Reise - Jordanien ..
|
||||
|
||||
</li>
|
||||
<li><strong>#Nummer#</strong> (in jedem Textfeld)<br>
|
||||
Reisenummer - JORD-INT..
|
||||
|
||||
</li>
|
||||
<li><strong>#Zimmer#</strong> (in jedem Textfeld)<br>
|
||||
Anzahl x Beichnung der gebuchten Zimmer mit Komma getrennt - 2 x Doppel..,
|
||||
</li>
|
||||
<li><strong>#Flughafen#</strong> (in jedem Textfeld)<br>
|
||||
Name es Abflughafens - Düssel..
|
||||
</li>
|
||||
<li><strong>#Raumname#</strong> (wird bei Grundpreis Reise ausgewertet)<br>
|
||||
Name des gebuchten Raums - Doppel..
|
||||
|
||||
</li>
|
||||
<li><strong>#Kategorie#</strong> (wird bei Aufpreis Kategorie ausgewertet)<br>
|
||||
Name der zusätzlichen Kategorie - Komfort (4 Sterne)
|
||||
|
||||
</li>
|
||||
<li><strong>#Option#</strong> (wird bei Aufpreis Option (derzeit nur Verpflegung) ausgewertet)<br>
|
||||
Name der zusätzlichen Optionen - Halbpension
|
||||
</li>
|
||||
</ul>
|
||||
@if(Auth::user()->isSuperAdmin())
|
||||
<br>
|
||||
<p><strong>Anpassung der Textbausteine für die Preisen <a href="{{ url('admin/translation/file/_vorlagen/de/de/all') }}">Inhalte -> Vorlagen</a></strong></p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{!! Form::open(['url' => route('draft_detail', [$id]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
|
||||
|
||||
<input type="hidden" name="id" id="id" value="{{$id}}">
|
||||
|
|
@ -27,57 +98,76 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@if(count($draft->draft_items))
|
||||
@php($i = 1)
|
||||
<div class="text-right mb-2">
|
||||
<button type="submit" name="action" value="addItem" class="btn btn-sm btn-primary"><i class="far fa-plus"></i> Neue Leistung hinzufügen</button>
|
||||
<div class="text-left mt-3 mb-2">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>
|
||||
<a href="{{route('drafts')}}" class="btn btn-default">{{ __('back') }}</a>
|
||||
<div class="float-right">
|
||||
<button type="submit" name="action" value="addItem" class="btn btn-sm btn-primary"><i class="far fa-plus"></i> Neue Leistung hinzufügen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="dragula-drag-handles">
|
||||
|
||||
@foreach($draft->draft_items as $draft_item)
|
||||
<!-- item -->
|
||||
<div class="card mb-2">
|
||||
<div class="card mb-2" @if($draft_item->draft_type) style="background-color: {{ $draft_item->draft_type->color }}" @endif>
|
||||
|
||||
|
||||
<div class="card-body row">
|
||||
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="form-group col-md-3 col-12">
|
||||
<select class="selectpicker" data-style="btn-light" name="draft_item[{{$draft_item->id}}][draft_type_id]" id="draft_item_{{$draft_item->id }}_draft_type_id" data-live-search="true" required>
|
||||
<option value="" disabled>Vorlagen-Typ*</option>
|
||||
{!! HTMLHelper::getDraftTypes($draft_item->draft_type_id) !!}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3 col-6">
|
||||
<div class="form-group col-md-3 col-4">
|
||||
<select class="selectpicker" data-style="btn-light" name="draft_item[{{$draft_item->id}}][days_start]]" id="draft_item_{{$draft_item->id }}_days_start">
|
||||
<option value="">(Datum) Start + Tage</option>
|
||||
{!! HTMLHelper::getRangeOptions($draft_item->days_start, 30, ' Tag(e)') !!}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3 col-6">
|
||||
<div class="form-group col-md-3 col-4">
|
||||
<select class="selectpicker" data-style="btn-light" name="draft_item[{{$draft_item->id}}][days_duration]" id="draft_item_{{$draft_item->id }}_days_duration">
|
||||
<option value="">(Datum) Dauer + Tage</option>
|
||||
{!! HTMLHelper::getRangeOptions($draft_item->days_duration, 30, ' Tag(e)') !!}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-sm-2 text-right">
|
||||
<div class="form-group col-md-3 col-4 text-right">
|
||||
<h5 class="float-right mt-1">#{{ $i++ }} </h5>
|
||||
<span class=" handle ion ion-ios-move d-inline-block bg-primary text-white p-2 mr-2 mb-1"></span>
|
||||
<button type="submit" name="action" value="up_{{$draft_item->id}}" class="btn btn-xs btn-default"><i class="fa fa-arrow-up"></i> </button>
|
||||
<button type="submit" name="action" value="down_{{$draft_item->id}}" class="btn btn-xs btn-default mr-2"><i class="fa fa-arrow-down"></i> </button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
{{ Form::textarea('draft_item['.$draft_item->id.'][service]', $draft_item->service, array('placeholder'=>__('Leistungen'), 'class'=>'form-control', 'id'=>'draft_item_'.$draft_item->id.'_service', 'rows'=>'1')) }}
|
||||
<div class="form-group col-sm-10 col-8">
|
||||
{{ Form::textarea('draft_item['.$draft_item->id.'][service]', $draft_item->service, array('placeholder'=>__('Leistungen'), 'class'=>'form-control autoExpand', 'id'=>'draft_item_'.$draft_item->id.'_service', 'rows'=>'1', 'data-min-rows'=>'1')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-2 col-3">
|
||||
<div class="form-group col-sm-2 col-4">
|
||||
<div class="text-right mt-2 float-right">
|
||||
<a class="text-danger" href="{{ route('draft_item_delete', [$draft_item->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="far fa-trash-alt"></i></a>
|
||||
</div>
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('draft_item['.$draft_item->id.'][in_pdf]', 1, $draft_item->in_pdf, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('in PDF')}}</span>
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-3">
|
||||
<select class="selectpicker" data-style="btn-light" name="draft_item[{{$draft_item->id}}][adult]" id="draft_item_{{$draft_item->id }}_adult">
|
||||
<option value="">Teilnehmer</option>
|
||||
{!! HTMLHelper::getRangeOptions($draft_item->adult, 10, ' T.') !!}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-2 col-3">
|
||||
<div class="form-group col-3">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">€</span>
|
||||
|
|
@ -87,14 +177,14 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-sm-2 col-3">
|
||||
<div class="form-group col-3">
|
||||
<select class="selectpicker" data-style="btn-light" name="draft_item[{{$draft_item->id}}][children]" id="draft_item_{{$draft_item->id}}_children">
|
||||
<option value="">Kinder</option>
|
||||
{!! HTMLHelper::getRangeOptions($draft_item->children, 10, ' K.') !!}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-2 col-3">
|
||||
<div class="form-group col-3">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">€</span>
|
||||
|
|
@ -103,22 +193,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-2 col-3">
|
||||
<label class="custom-control custom-checkbox mt-2">
|
||||
{!! Form::checkbox('draft_item['.$draft_item->id.'][in_pdf]', 1, $draft_item->in_pdf, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('in PDF')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-2 col-6">
|
||||
<div class="text-right mt-3">
|
||||
<a class="text-danger" href="{{ route('draft_item_delete', [$draft_item->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="far fa-trash-alt"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($draft_items))
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@
|
|||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('Farbe')}}</th>
|
||||
<th>{{__('sichtbar')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
|
@ -93,11 +94,20 @@
|
|||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-type"
|
||||
data-id="{{ $value->id }}"
|
||||
data-name="{{ $value->name }}"
|
||||
data-color="{{ $value->color }}"
|
||||
data-active="{{ $value->active }}">
|
||||
<span class="far fa-edit"></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>{{ $value->name }}</td>
|
||||
|
||||
<td>@if($value->color)
|
||||
<div style="display:inline-block; width: 20px; height: 20px; border: 1px solid #888a85; background-color: {{$value->color}}"></div>
|
||||
{{ $value->color }}
|
||||
@else
|
||||
<div style="display:inline-block; width: 20px; height: 20px; border: 1px solid #888a85; background-color: #fff"></div>
|
||||
@endif
|
||||
</td>
|
||||
<td data-sort="{{ $value->active }}">
|
||||
@if($value->active)
|
||||
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
|
||||
|
|
@ -140,6 +150,15 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="name" class="form-label">Farbe*</label>
|
||||
<input type="text" name="color" id="minicolors-hue" class="form-control" value="#fff">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input" name="active" checked>
|
||||
|
|
@ -158,11 +177,23 @@
|
|||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
$('#minicolors-hue').minicolors({
|
||||
control: 'hue',
|
||||
position: 'bottom ' + 'left',
|
||||
});
|
||||
|
||||
$('#modals-type').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'));
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
color = '#fff';
|
||||
if(button.data('color') != ""){
|
||||
color = button.data('color');
|
||||
}
|
||||
$('#minicolors-hue').minicolors('value', color);
|
||||
|
||||
// $('.selectpicker').selectpicker('refresh');
|
||||
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue