Media youtube, title description, CMS Info Content / Header Frontend

This commit is contained in:
Kevin Adametz 2019-12-12 20:01:01 +01:00
parent c9f3d85d4e
commit 7294ccc1d0
49 changed files with 1283 additions and 148 deletions

View file

@ -0,0 +1,208 @@
@extends('layouts.layout-2')
@section('content')
<style>
.switcher-input:checked ~ .switcher-label .switcher-label-yes {
display: inline-block;
}
.switcher-input:checked ~ .switcher-label .switcher-label-no {
display: none;
}
.switcher-input:not(:checked) ~ .switcher-label .switcher-label-yes {
display: none;
}
.switcher-input:not(:checked) ~ .switcher-label .switcher-label-no {
display: inline-block;
}
</style>
{!! Form::open(['url' => route('cms_content_infos'), 'class' => 'form-horizontal']) !!}
<h4 class="font-weight-bold py-3 mb-1">
Inhalte Infos verwalten
<div class="float-right">
<button type="submit" name="action" value="saveAll" class="btn btn-submit btn-sm">{{ __('save changes') }}</button>&nbsp;
</div>
</h4>
<div class="clearfix"></div>
<!-- -->
<div class="card mb-4">
<div class="card-body">
<h4>Lokale Öffnungszeiten</h4>
<p>Die Öffnungszeiten können eine Woche im Voraus geplant werden und wird live im Frontend angezeigt.</p>
@foreach($days as $wday => $day_name)
@php($available = \App\Models\CMSInfoAvailable::getContentBySlug('local', $wday))
<div class="form-row">
{{ Form::hidden('info_availables[local]['.$wday.'][wday]', $wday) }}
<div class="col-sm-2 col-6 py-2"><strong>{!! $day_name !!}</strong></div>
<div class="col-sm-3 col-6 py-2">
<label class="switcher">
{{ Form::hidden('info_availables[local]['.$wday.'][active]', 0) }}
{{ Form::checkbox('info_availables[local]['.$wday.'][active]', 1, $available->active, array('class'=>'switcher-input')) }}
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label"><span class="switcher-label-yes">geöffnet</span> <span class="switcher-label-no">geschlossen</span></span>
</label>
</div>
<div class="form-group col-sm-2 col-6">
<select class="selectpicker" data-style="btn-default" name="info_availables[local][{{$wday}}][from]" data-live-search="true">
{!! \App\Services\HTMLHelper::getTimeInSteps($available->from) !!}
</select>
</div>
<div class="form-group col-sm-2 col-6">
<select class="selectpicker" data-style="btn-default" name="info_availables[local][{{$wday}}][to]" data-live-search="true">
{!! \App\Services\HTMLHelper::getTimeInSteps($available->to) !!}
</select>
</div>
</div>
@endforeach
</div>
</div>
<div class="card mb-4">
<div class="card-body">
<h4>Telefon Erreichbarkeit</h4>
<p>Die Erreichbarkeit per Telefon kann eine Woche im Voraus geplant werden und wird live im Frontend angezeigt.</p>
@foreach($days as $wday => $day_name)
@php($available = \App\Models\CMSInfoAvailable::getContentBySlug('phone', $wday))
<div class="form-row">
{{ Form::hidden('info_availables[phone]['.$wday.'][active]', 0) }}
{{ Form::hidden('info_availables[phone]['.$wday.'][wday]', $wday) }}
<div class="col-sm-2 col-6 py-2"><strong>{!! $day_name !!}</strong></div>
<div class="col-sm-3 col-6 py-2">
<label class="switcher">
{{ Form::hidden('info_availables[phone]['.$wday.'][active]', 0) }}
{{ Form::checkbox('info_availables[phone]['.$wday.'][active]', 1, $available->active, array('class'=>'switcher-input')) }}
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label"><span class="switcher-label-yes">erreichbar</span> <span class="switcher-label-no">nicht erreichbar</span></span>
</label>
</div>
<div class="form-group col-sm-2 col-6">
<select class="selectpicker" data-style="btn-default" name="info_availables[phone][{{$wday}}][from]" data-live-search="true">
{!! \App\Services\HTMLHelper::getTimeInSteps($available->from) !!}
</select>
</div>
<div class="form-group col-sm-2 col-6">
<select class="selectpicker" data-style="btn-default" name="info_availables[phone][{{$wday}}][to]" data-live-search="true">
{!! \App\Services\HTMLHelper::getTimeInSteps($available->to) !!}
</select>
</div>
</div>
@endforeach
</div>
</div>
<div class="card mb-4">
<div class="card-body">
<button type="submit" name="action" value="add_holiday" class="btn btn-primary btn-sm float-right mb-2"><i class="ion ion-ios-add-circle"></i> Eintrag</button>
<h4>Geschlossen Tage (nicht erreichbar)</h4>
<p>Überschreibt bei dem Datum von - bis die Erreichbarkeit, wenn lokal und/oder telefon aktiviert (rot) ist. </p>
@foreach($cms_holidays as $cms_holiday)
<div class="form-row">
<div class="col-sm-2 col-6 py-2">
<label class="switcher switcher-danger">
{{ Form::hidden('info_holidays['.$cms_holiday->id.'][local]', 0) }}
{{ Form::checkbox('info_holidays['.$cms_holiday->id.'][local]', 1, $cms_holiday->local, array('class'=>'switcher-input')) }}
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label">Lokal</span>
</label>
</div>
<div class="col-sm-3 col-6 py-2">
<label class="switcher switcher-danger">
{{ Form::hidden('info_holidays['.$cms_holiday->id.'][phone]', 0) }}
{{ Form::checkbox('info_holidays['.$cms_holiday->id.'][phone]', 1, $cms_holiday->phone, array('class'=>'switcher-input')) }}
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label">Telefon</span>
</label>
</div>
<div class="col-sm-6 col-10">
<div class="input-daterange input-group datepicker-range">
{{ Form::text('info_holidays['.$cms_holiday->id.'][from]', $cms_holiday->from, array('placeholder'=>__('Datum von'), 'class'=>'form-control')) }}
<div class="input-group-prepend">
<span class="input-group-text">bis</span>
</div>
{{ Form::text('info_holidays['.$cms_holiday->id.'][to]', $cms_holiday->to, array('placeholder'=>__('Datum von'), 'class'=>'form-control')) }}
</div>
</div>
<div class="col-sm-1 col-2 p-1">
<a href="{{route('cms_content_infos_delete', ['holiday', $cms_holiday->id])}}" class="btn btn-danger btn-sm" onclick="return confirm('Wirklich löschen?');"><i class="far fa-trash-alt"></i></a>
</div>
</div>
<hr>
@endforeach
</div>
</div>
<div class="card mb-2">
<div class="card-body">
<h4>Kontaktinfos</h4>
<div class="form-row">
<div class="form-group col-12">
<label class="switcher">
{{ Form::hidden('infos[office-important-note-active][val]', 0) }}
{{ Form::checkbox('infos[office-important-note-active][val]', 1, \App\Models\CMSInfo::getContentBySlug('office-important-note-active'), array('class'=>'switcher-input')) }}
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label"></span>
</label>
{{ Form::hidden('infos[office-important-note-active][type]', 'bool') }}
<label class="form-label" for="office_important_note">{{ __('Wichtiger Hinweis') }} <span class="text-muted">(wird zusätzlich angezeigt, wenn aktiv)</span></label>
{{ Form::text('infos[office-important-note][val]', \App\Models\CMSInfo::getContentBySlug('office-important-note'), array('placeholder'=>__('Weihnachtsferien! Vom 23.12.2019 bis zum 28.12.2019 sind wir nur zu den genannten Zeiten telefonisch zu erreichen.'), 'class'=>'form-control', 'id'=>'office_important_note')) }}
{{ Form::hidden('infos[office-important-note][type]', 'text') }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-12">
<label class="form-label" for="office_appointment">{{ __('Termin') }}*</label>
{{ Form::text('infos[office-appointment][val]', \App\Models\CMSInfo::getContentBySlug('office-appointment'), array('placeholder'=>__('Text zur Terminvereinbarung'), 'class'=>'form-control', 'id'=>'office_appointment')) }}
{{ Form::hidden('infos[office-appointment][type]', 'text') }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-12">
<label class="form-label" for="office_phone">{{ __('Telefonnummer') }}*</label>
{{ Form::text('infos[office-phone][val]', \App\Models\CMSInfo::getContentBySlug('office-phone'), array('placeholder'=>__('Telefonnummer'), 'class'=>'form-control', 'id'=>'office_phone', 'required'=>true)) }}
{{ Form::hidden('infos[office-phone][type]', 'text') }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-12">
<label class="form-label" for="office_email">{{ __('E-Mail') }}*</label>
{{ Form::email('infos[office-email][val]', \App\Models\CMSInfo::getContentBySlug('office-email'), array('placeholder'=>__('E-Mail'), 'class'=>'form-control', 'id'=>'office_email', 'required'=>true)) }}
{{ Form::hidden('infos[office-email][type]', '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>&nbsp;
</div>
{!! Form::close() !!}
@endsection

View file

@ -154,52 +154,14 @@
<a class="dropdown-item link-item-download" href="javascript:void(0)" data-action="item_download"><i class="fa fa-download"></i> download</a>
<a class="dropdown-item link-item-crop" href="javascript:void(0)" data-action="item_crop"><i class="fa fa-crop"></i> zuschneiden</a>
<!-- <a class="dropdown-item link-item-resize" href="javascript:void(0)" data-action="item_resize"><i class="fa fa-crop"></i> Größe ändern</a> -->
<a class="dropdown-item link-item-color" href="javascript:void(0)" data-action="item_color"><i class="fa fa-paint-brush"></i> Farbe</a>
<a class="dropdown-item" href="javascript:void(0)" data-action="item_trash"><i class="fa fa-trash"></i> löschen</a>
</div>
</div>
</div>
<div class="file-manager-container file-manager-col-view" id="file-manager-content">
</div>
</div>
<!-- / content list -->
{{--
<!-- sidebox -->
<div class="messages-sidebox messages-scroll col">
<div class="card-header text-uppercase text-expanded text-muted">Areas</div>
<div class="card-body py-3">
<div class="media align-items-center">
<div class="media-body">
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#modals-load-content"
data-id="add"
data-model="area"
data-action="area-content"
data-request=""
data-route="{{ route('iq_content_modal_load') }}"><i class="ion ion-ios-add-circle"></i> Add area</button>
</div>
<a href="javascript:void(0)" class="messages-sidebox-toggler d-lg-none d-block text-muted text-large font-weight-light pl-4">&times;</a>
</div>
</div>
<div class="card-header text-uppercase text-expanded text-muted">Filter</div>
<div class="card-body py-3">
<a href="javascript:void(0)" class="d-flex justify-content-between align-items-center text-body font-weight-bold py-2">
<div>
All
</div>
<div class="badge badge-primary">{{ count($models) }}</div>
</a>
<hr class="border-light my-4">
</div>
</div>
<!-- / sidebox -->
--}}
</div><!-- / .row -->
</div><!-- / .card -->
@ -277,7 +239,10 @@
<div class="p-3">
<h5 class="media-name"> </h5>
<div class="form-group d-none">
<input type="text" class="form-control media-content" readonly>
<input type="text" class="form-control media-content-title" placeholder="Title">
</div>
<div class="form-group d-none">
<textarea type="text" class="form-control media-content-description" placeholder="Description"></textarea>
</div>
<div class="input-group">
<div class="input-group-prepend">
@ -295,7 +260,6 @@
<script>
var lang = {!! json_encode(trans('laravel-filemanager::lfm')) !!};
</script>
@endsection

View file

@ -42,7 +42,11 @@
<link rel="stylesheet" href="{{ mix('/vendor/libs/select2/select2.css') }}">
<link rel="stylesheet" href="{{ mix('/vendor/libs/datatables/datatables.css') }}">
<link rel="stylesheet" href="{{ mix('/vendor/libs/bootstrap-datepicker/bootstrap-datepicker.css') }}">
<!--
<link rel="stylesheet" href="{{ mix('/vendor/libs/bootstrap-daterangepicker/bootstrap-daterangepicker.css') }}">
-->
<link rel="stylesheet" href="{{ mix('/vendor/libs/dragula/dragula.css') }}">
<link rel="stylesheet" href="{{ mix('/vendor/libs/minicolors/minicolors.css') }}">
<link rel="stylesheet" href="{{ asset('/vendor/libs/summernote/dist/summernote-bs4.css') }}">
@ -125,6 +129,10 @@
<script src="{{ mix('/vendor/libs/datatables/datatables.js') }}"></script>
<script src="{{ mix('/vendor/libs/bootstrap-datepicker/bootstrap-datepicker.js') }}"></script>
<!--
<script src="{{ mix('/vendor/libs/bootstrap-daterangepicker/bootstrap-daterangepicker.js') }}"></script>
-->
<script src="{{asset('/js/bootstrap-datepicker.de.min.js')}}"></script>
<script src="{{ mix('/vendor/libs/dragula/dragula.js') }}"></script>
<script src="{{asset('/vendor/libs/nestable/my-nestable.js')}}"></script>
@ -133,7 +141,7 @@
<script src="{{ asset('/vendor/laravel-filemanager/js/cropper.min.js') }}"></script>
<script src="{{ asset('/js/pages_file-manager.js') }}"></script>
<script src="{{ asset('/js/filemanager.js') }}"></script>
<script src="{{ asset('/js/filemanager.js?v1') }}"></script>
<!-- Libs -->
<!-- `perfect-scrollbar` library required by SideNav plugin -->
@ -182,6 +190,7 @@
});
$(document).ready(function() {
$('.summernote').summernote({
height: 300,
tabsize: 2,

View file

@ -164,6 +164,10 @@
<div>Inhalte</div>
</a>
<ul class="sidenav-menu">
<li class="sidenav-item{{ Request::is('cms/content/infos') ? ' active' : '' }}">
<a href="{{ route('cms_content_infos') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-business"></i><div>Infos</div></a>
</li>
<li class="sidenav-item{{ Request::is('cms/content/country') ? ' active' : '' }} {{ Request::is('cms/content/country/*') ? ' active' : '' }}">
<a href="{{ route('cms_content_country') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-globe"></i><div>Reiseländer</div></a>
</li>