Travel Guide Frontend Backend
This commit is contained in:
parent
e6cc042aee
commit
0857a34766
681 changed files with 6680 additions and 1689 deletions
115
resources/views/cms/answer_question/detail.blade.php
Executable file
115
resources/views/cms/answer_question/detail.blade.php
Executable file
|
|
@ -0,0 +1,115 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
{!! Form::open(['url' => route('cms_answer_question_detail', [$id]), 'class' => 'form-horizontal']) !!}
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Frage & Anwort @if($id === "new") <span class="text-primary">anlegen</span> @else {{"(ID: ".$id.")"}} verwalten @endif
|
||||
<div class="float-right">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-submit btn-sm">{{ __('save changes') }}</button>
|
||||
<a href="{{route('cms_answer_question')}}" class="btn btn-default btn-sm">{{ __('back') }}</a>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<input type="hidden" name="id" id="id" value="{{$id}}">
|
||||
|
||||
<!-- draft -->
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
<label for="i_q_content_category_id" class="form-label">Kategorie*</label>
|
||||
{{ Form::select('i_q_content_category_id', $identifier_options , $model->i_q_content_category_id, array('class'=>'custom-select', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="custom-control custom-checkbox float-right">
|
||||
{!! Form::checkbox('active', 1, $model->active, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('aktiv')}}</span>
|
||||
</label>
|
||||
|
||||
<label class="form-label" for="question">{{ __('Frage Titel') }} (Text)*</label>
|
||||
{{ Form::text('question', $model->question, array('placeholder'=>__('max 255 Zeichen'), 'class'=>'form-control', 'id'=>'question', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{-- <div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="question_text">{{ __('Frage Text') }} (Nur Text)</label>
|
||||
{{ Form::textarea('question_text', $model->question_text , ['class' => 'form-control', 'id'=>'question_text']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="answer">{{ __('Antwort Titel') }}*</label>
|
||||
{{ Form::text('answer', $model->answer, array('placeholder'=>__('Antwort'), 'class'=>'form-control', 'id'=>'answer')) }}
|
||||
</div>
|
||||
</div>
|
||||
--}}
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="answer_text">{{ __('Antwort') }} (HTML)*</label>
|
||||
{{ Form::textarea('answer_text', $model->answer_text , ['class' => 'form-control summernote', 'id'=>'answer_text']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>
|
||||
<a href="{{route('cms_answer_question')}}" class="btn btn-default">{{ __('back') }}</a>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
@endsection
|
||||
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.summernote').summernote({
|
||||
height: 300,
|
||||
tabsize: 2,
|
||||
followingToolbar: true,
|
||||
imageTitle: {
|
||||
specificAltField: true,
|
||||
},
|
||||
lang: 'de-DE',
|
||||
toolbar: [
|
||||
['style', ['style']],
|
||||
['font', ['bold', 'italic', 'clear']],
|
||||
['para', ['ul', 'ol']],
|
||||
['insert', ['link', 'hr']],
|
||||
['view', ['fullscreen', 'codeview']],
|
||||
['help', ['help']]
|
||||
],
|
||||
styleTags: ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
|
||||
|
||||
cleaner:{
|
||||
action: 'both', // both|button|paste 'button' only cleans via toolbar button, 'paste' only clean when pasting content, both does both options.
|
||||
newline: '<br>', // Summernote's default is to use '<p><br></p>'
|
||||
notStyle: 'position:absolute;top:0;left:0;right:0', // Position of Notification
|
||||
icon: '<i class="note-icon">[Your Button]</i>',
|
||||
keepHtml: false, // Remove all Html formats
|
||||
keepOnlyTags: ['<p>', '<br>', '<ul>', '<li>', '<b>', '<strong>','<i>', '<a>'], // If keepHtml is true, remove all tags except these
|
||||
keepClasses: false, // Remove Classes
|
||||
badTags: ['style', 'script', 'applet', 'embed', 'noframes', 'noscript', 'html'], // Remove full tags with contents
|
||||
badAttributes: ['style', 'start'], // Remove attributes from remaining tags
|
||||
limitChars: false, // 0/false|# 0/false disables option
|
||||
limitDisplay: 'both', // text|html|both
|
||||
limitStop: false // true/false
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
84
resources/views/cms/answer_question/index.blade.php
Executable file
84
resources/views/cms/answer_question/index.blade.php
Executable file
|
|
@ -0,0 +1,84 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
{{ __('Fragen & Antworten') }}
|
||||
</h4>
|
||||
|
||||
<div class="card">
|
||||
<div class="ui-bordered px-4 pt-3 mb-0">
|
||||
<div class="form-row align-items-center">
|
||||
<div class="form-group col-12 col-sm-6">
|
||||
<select class="custom-select" name="filter_identifier_options" id="filter_identifier_options" style="">
|
||||
<option value="">Alle Kategorien</option>
|
||||
@foreach($identifier_options as $id=>$name)
|
||||
<option value="{{$id}}" >{{$name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class=" mb-2 text-right">
|
||||
<a href="{{ route('cms_answer_question_detail', ['new']) }}" class="btn btn-sm btn-primary">Neuen Eintrag anlegen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-datatable table-responsive py-2">
|
||||
|
||||
<table class="datatables-faq table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Frage')}}</th>
|
||||
<th>{{__('Kategorie')}}</th>
|
||||
<th>{{__('Date')}}</th>
|
||||
<th>{{__('sichtbar')}}</th>
|
||||
<th>#</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mt-4 col">
|
||||
<a href="{{ route('cms_answer_question_detail', ['new']) }}" class="btn btn-sm btn-primary">Neuen Eintrag anlegen</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
var oTable = $('.datatables-faq').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
ajax: {
|
||||
url: '{!! route( 'cms_answer_question_datatable' ) !!}',
|
||||
data: function(d) {
|
||||
d.filter_identifier_options = $('select[name=filter_identifier_options]').val();
|
||||
}
|
||||
},
|
||||
"order": [[ 0, "desc" ]],
|
||||
"columns": [
|
||||
{ data: 'action_edit', orderable: false, searchable: false},
|
||||
{ data: 'question', name: 'question' },
|
||||
{ data: 'category', name: 'category'},
|
||||
{ data: 'created_at', name: 'created_at' },
|
||||
{ data: 'active', name: 'active' },
|
||||
{ data: 'delete', name: 'delete' },
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 100,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
|
||||
$('#filter_identifier_options').on('change', function(){
|
||||
oTable.draw();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
Loading…
Add table
Add a link
Reference in a new issue