Travel Guide Frontend Backend

This commit is contained in:
Kevin Adametz 2020-08-07 16:00:55 +02:00
parent e6cc042aee
commit 0857a34766
681 changed files with 6680 additions and 1689 deletions

View file

@ -131,6 +131,19 @@
<input type="hidden" name="model" value="tree">
<input type="hidden" name="action" value="tree-node">
<input type="hidden" name="tree_id" value="{{$model->id}}">
<h4 class="mb-0 bg-light p-1">Name / Link</h4>
<hr class="mt-0">
<div class="form-row mb-2">
<div class="form-group col">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $tree_node->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
<label for="name" class="form-label">Name (Navigation)*</label>
{{ Form::text('name', $tree_node->name, array('placeholder'=>'', 'class'=>'form-control', 'required'=>'true')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-10 col-sm-11">
<div class="input-group mb-4">
@ -150,16 +163,9 @@
</a>
</div>
</div>
<div class="form-row mb-2">
<div class="form-group col">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $tree_node->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
<label for="name" class="form-label">Name (required)</label>
{{ Form::text('name', $tree_node->name, array('placeholder'=>'', 'class'=>'form-control', 'required'=>'true')) }}
</div>
</div>
<h4 class="mb-0 bg-light p-1">Seiten</h4>
<hr class="mt-0">
<div class="form-row mb-2">
<div class="form-group col">
<button type="button" class="btn btn-primary btn-sm float-right mb-2"
@ -171,14 +177,13 @@
data-route="{{ route('iq_content_modal_load') }}"><i
class="ion ion-ios-add-circle"></i> Seite hinzufügen
</button>
<label for="site_id" class="form-label">Seiten</label>
@if($tree_node->iq_content_sites->count())
<table class="table table-striped border-bottom">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Name')}}</th>
<th>{{__('Zuordnung')}}</th>
<th>{{__('Keyword')}}</th>
<th>{{__('Langer Text')}}</th>
<th>{{__('sichtbar')}}</th>
@ -195,6 +200,16 @@
</a>
</td>
<td>{{$iq_content_site->travel_guide->name}}</td>
<td><button type="button" class="btn btn-xs btn-secondary"
data-toggle="modal" data-target="#modals-load-content"
data-id="{{$iq_content_site->id}}"
data-model="tree"
data-action="site-travel-identifier"
data-request="{!! array_to_json(['tree_id'=>$model->id,'tree_node_id'=>$tree_node->id]) !!}"
data-route="{{ route('iq_content_modal_load') }}">
<i class="fa fa-edit"></i> {{$iq_content_site->getTravelType()}}</button>
</td>
<td>{{$iq_content_site->travel_guide->keyword}}</td>
<td> @if($iq_content_site->travel_guide->scope)
<span class="badge badge-pill badge-success"><i
@ -215,9 +230,10 @@
</td>
<td>
<a class="text-danger"
href="{{ route('iq_content_tree_detail_remove_site', [$model->id, $tree_node->id, $iq_content_site->travel_guide->id, 't']) }}"
onclick="return confirm('{{__('Seite aus Tree entfernen?')}}');"><i
class="fa fa-reply"></i></a>
href="{{ route('iq_content_tree_detail_remove', ['guide', $model->id, $tree_node->id, $iq_content_site->travel_guide->id, 'tree']) }}"
title="entfernen" data-placement="left" rel="tooltip" onclick="return confirm('{{__('Seite aus Tree entfernen?')}}');">
<i class="fa fa-reply"></i>
</a>
</td>
</tr>
@endforeach
@ -232,6 +248,93 @@
</select>--}}
</div>
</div>
<h4 class="mb-0 bg-light p-1">Hauptbild</h4>
<hr class="mt-0">
<div class="media mx-auto pb-3" id="lfm-data-fill">
<img src="{{$tree_node->getImage('thumb_url')}}" alt="" class="img_thumb_url d-block ui-w-100">
<div class="media-body mt-2 ml-2">
<div class="form-row">
<div class="form-group col-10 col-sm-11" >
{{ Form::hidden('image[slug]', $tree_node->getImage('slug')) }}
{{ Form::hidden('image[thumb_url]', $tree_node->getImage('thumb_url')) }}
{{ Form::hidden('image[url]', $tree_node->getImage('url')) }}
{{ Form::text('image[title]', $tree_node->getImage('title'), array('placeholder'=>'Bildtitel', 'class'=>'form-control mb-2')) }}
{{ Form::text('image[alt]', $tree_node->getImage('alt'), array('placeholder'=>'Bild ALT Tag', 'class'=>'form-control')) }}
</div>
<div class="form-group col-2 col-sm-1">
<button type="button" class="btn btn-sm btn-secondary float-right btn-lfm-open-modal"
data-id="#lfm-data-fill"
data-obj="image"
data-set='["url", "slug", "thumb_url"]'
data-img='.img_thumb_url'
data-title="title"
data-alt="alt">
<i class="fa fa-image"></i>
</button>
</div>
</div>
</div>
</div>
<h4 class="mb-0 bg-light p-1">Fragen &amp; Antworten</h4>
<hr class="mt-0">
<div class="form-row mb-2">
<div class="form-group col">
<button type="button" class="btn btn-primary btn-sm float-right mb-2"
data-toggle="modal" data-target="#modals-load-content"
data-id="add"
data-model="tree"
data-action="add-answer-question"
data-request="{!! array_to_json(['tree_id'=>$model->id,'tree_node_id'=>$tree_node->id]) !!}"
data-route="{{ route('iq_content_modal_load') }}"><i
class="ion ion-ios-add-circle"></i> Eintrag hinzufügen
</button>
<table class="table table-striped border-bottom">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Frage')}}</th>
<th>{{__('sichtbar')}}</th>
<th>#</th>
</tr>
</thead>
<tbody>
@foreach($tree_node->iq_content_faqs as $iq_content_faq)
<tr>
<td style="width: 5%;">
<a href="{{ route('cms_answer_question_detail', [$iq_content_faq->answer_question->id]) }}"
class="btn icon-btn btn-sm btn-primary">
<span class="fa fa-edit"></span>
</a>
</td>
<td>{{$iq_content_faq->answer_question->question}}</td>
<td>
@if($iq_content_faq->answer_question->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('iq_content_tree_detail_remove', ['faq', $model->id, $tree_node->id, $iq_content_faq->answer_question->id, 'tree']) }}"
title="entfernen" data-placement="left" rel="tooltip" onclick="return confirm('{{__('Eintrag entfernen?')}}');">
<i class="fa fa-reply"></i>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<h4 class="mb-0 bg-light p-1">Meta</h4>
<hr class="mt-0">
<div class="form-row mb-2">
<div class="form-group col">
<label for="identifier" class="form-label">Slug</label>
@ -303,7 +406,16 @@
</div>
@endif
</div>
</div>
@endsection
@section('scripts')
<script>
$(document).ready(function() {
$('.table [rel="tooltip"]').tooltip({trigger: "hover"});
IqLFileManager.init();
});
</script>
@endsection