Natinality, Country, Agenda, search Request. CMS

Magazine Content
This commit is contained in:
Kevin Adametz 2019-03-19 15:47:23 +01:00
parent 30d5ca3b44
commit aebfb0586a
72 changed files with 4636 additions and 590 deletions

View file

@ -0,0 +1,189 @@
@extends('layouts.layout-2')
@section('content')
<style>
.alert ul {
margin-bottom: 0;
}
</style>
@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
<h4 class="font-weight-bold py-3 mb-1">
Reiseführer verwalten
</h4>
{!! Form::open(['url' => route('cms_travel_magazine_detail', [$id]), 'class' => 'form-horizontal']) !!}
<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-12">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $travel_magazine->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
<label class="form-label" for="travel_magazine_title">{{ __('Titel') }}*</label>
{{ Form::text('name', $travel_magazine->name, array('placeholder'=>__('Title'), 'class'=>'form-control', 'id'=>'travel_magazine_name', 'required'=>true)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-12">
<label class="form-label" for="travel_magazine_slug">{{ __('slug') }} (wird autmatisch aus dem Titel erstellt)</label>
{{ Form::text('slug', $travel_magazine->slug, array('placeholder'=>__('slug'), 'class'=>'form-control', 'id'=>'travel_magazine_slug')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-12">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('scope', 1, $travel_magazine->scope, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('Langer Text')}}</span>
</label>
<label class="form-label" for="travel_magazine_full_text">{{ __('Text') }}*</label>
<br clear="all">
{{ Form::textarea('full_text', $travel_magazine->full_text , ['class' => 'form-control summernote']) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12">
<label class="form-label" for="travel_magazine_meta_title">{{ __('META-Titel (optional)') }}</label>
{{ Form::text('meta_title', $travel_magazine->meta_title, array('placeholder'=>__('meta_title'), 'class'=>'form-control', 'id'=>'travel_magazine_meta_title')) }}
</div>
<div class="form-group col-md-12">
<label class="form-label" for="travel_magazine_meta_description">{{ __('META-Beschreibung (optional)') }}</label>
{{ Form::text('meta_description', $travel_magazine->meta_description, array('placeholder'=>__('meta_description'), 'class'=>'form-control', 'id'=>'travel_magazine_meta_description')) }}
</div>
<div class="form-group col-md-12">
<label class="form-label" for="travel_magazine_meta_keywords">{{ __('META-Keywords (optional)') }}</label>
{{ Form::text('meta_keywords', $travel_magazine->meta_keywords, array('placeholder'=>__('meta_keywords'), 'class'=>'form-control', 'id'=>'feedback_meta_keywords')) }}
</div>
</div>
</div>
</div>
<div class="text-left mt-3">
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>&nbsp;
<a href="{{route('cms_travel_magazine')}}" class="btn btn-default">{{ __('back') }}</a>
</div>
{!! Form::close() !!}
{{--
<!-- Modal template -->
<div class="modal fade" id="modals-class">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('travel_program_class_update') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<input type="hidden" class="form-control" name="program_id" value="{{$feedback->id}}">
<div class="modal-header">
<h5 class="modal-title">Programm Katagorie/Klassen <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 class="custom-control custom-checkbox float-right">
<input type="checkbox" class="custom-control-input" name="standard" checked>
<span class="custom-control-label">{{__('Standard')}}</span>
</label>
<label for="name" class="form-label">Name*</label>
<input type="text" class="form-control" name="name" placeholder="{{__('Description')}}" required>
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="description" class="form-label">Beschreibung</label>
<input type="text" class="form-control" name="description" placeholder="{{__('Description')}}">
</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">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-draft">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('travel_program_draft_update') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<input type="hidden" class="form-control" name="travel_program_id" value="{{$feedback->id}}">
<div class="modal-header">
<h5 class="modal-title">Vorlage Reiseprogramm <span class="font-weight-light">zuordnen</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="draft_id" class="form-label">{{__('Vorlage')}}</label>
<select class="selectpicker" data-style="btn-default" name="draft_id" data-live-search="true" required>
{!! HTMLHelper::getDraftOptions() !!}
</select>
</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">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-class').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 input[name='description']").val(button.data('description'));
$(this).find(".modal-body input[name='standard']").prop( "checked", button.data('standard'));
});
$('#modals-draft').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 select[name='draft_id']").val(button.data('draft_id'));
$(this).find(".modal-body select[name='travel_class_id']").val(button.data('travel_class_id'));
$(this).find(".modal-body select[name='weekdays[]']").val(button.data('weekdays'));
$('.selectpicker').selectpicker('refresh');
});
});
</script>
--}}
@endsection

View file

@ -0,0 +1,78 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-3 mb-1">
{{ __('Reiseführer') }}
</h4>
<div class="card">
<div class="card-datatable table-responsive py-2">
<div class="mr-4 mb-2 text-right">
<a href="{{ route('cms_travel_magazine_detail', ['new']) }}" class="btn btn-sm btn-primary">Neuen Eintrag anlegen</a>
</div>
<table class="datatables-travel_magazine table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Name')}}</th>
<th>{{__('slug')}}</th>
<th>{{__('Langer Text')}}</th>
<th>{{__('sichtbar')}}</th>
<th>#</th>
</tr>
</thead>
<tbody>
@foreach($travel_magazines as $value)
<tr>
<td>
<a href="{{ route('cms_travel_magazine_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
<span class="far fa-edit"></span>
</a>
</td>
<td><a href="{{ route('cms_travel_magazine_detail', [$value->id]) }}">{{ $value->name }}</a></td>
<td>{{ $value->slug }}</td>
<td data-sort="{{ $value->scope }}">
@if($value->scope)
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
@else
<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>
@endif
</td>
<td data-sort="{{ $value->active }}">
@if($value->active)
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
@else
<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>
@endif
</td>
<td>
<a class="text-danger" href="{{ route('cms_travel_magazine_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="far fa-trash-alt"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 col">
<a href="{{ route('cms_travel_magazine_detail', ['new']) }}" class="btn btn-sm btn-primary">Neuen Eintrag anlegen</a>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatables-travel_magazine').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
},
});
});
</script>
</div>
@endsection