Feedback in V3
This commit is contained in:
parent
765d6a2f6b
commit
6e0c7e8706
19 changed files with 1141 additions and 491 deletions
18
.env
18
.env
|
|
@ -5,14 +5,26 @@ APP_DEBUG=true
|
|||
APP_URL=http://crm-stern-tours.local
|
||||
APP_OLD_URL = http://cms-stern-tours.local
|
||||
|
||||
#APP_URL_V2=https://v2.stern-tours.de
|
||||
APP_URL_V2=http://v2-sterntours.local
|
||||
|
||||
#APP_URL_STERN=https://www.sterntours.de
|
||||
APP_URL_STERN=http://sterntours.local
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=192.168.1.7
|
||||
DB_HOST=localhost
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=cmssso_db1
|
||||
DB_USERNAME=cmssso_1
|
||||
DB_PASSWORD=ZXk8Udm8
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=KT32vQ7
|
||||
# on neptune
|
||||
#DB_HOST=192.168.1.7
|
||||
#DB_PORT=3306
|
||||
#DB_DATABASE=cmssso_db1
|
||||
#DB_USERNAME=cmssso_1
|
||||
#DB_PASSWORD=ZXk8Udm8
|
||||
|
||||
|
||||
DB_CONNECTION_STERN=mysql
|
||||
|
|
|
|||
829
.idea/workspace.xml
generated
829
.idea/workspace.xml
generated
File diff suppressed because it is too large
Load diff
82
app/Http/Controllers/CMSFeedbackController.php
Executable file
82
app/Http/Controllers/CMSFeedbackController.php
Executable file
|
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
|
||||
|
||||
use App\Models\Feedback;
|
||||
use Input;
|
||||
|
||||
class CMSFeedbackController extends Controller
|
||||
{
|
||||
|
||||
/*
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the application dashboard.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data = [
|
||||
'feedbacks' => Feedback::all(),//Feedback::where('lvl', 1)->get(),
|
||||
];
|
||||
return view('cms.feedback.index', $data);
|
||||
|
||||
}
|
||||
|
||||
public function detail($id)
|
||||
{
|
||||
if($id == "new") {
|
||||
$feedback = new Feedback();
|
||||
$id = 'new';
|
||||
|
||||
}else{
|
||||
$feedback = Feedback::findOrFail($id);
|
||||
$id = $feedback->id;
|
||||
}
|
||||
$data = [
|
||||
'feedback' => $feedback,
|
||||
'id' => $id,
|
||||
];
|
||||
return view('cms.feedback.detail', $data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function store($id)
|
||||
{
|
||||
$data = Input::all();
|
||||
if($id == "new") {
|
||||
$feedback = new Feedback();
|
||||
}else{
|
||||
$feedback = Feedback::findOrFail($id);
|
||||
}
|
||||
|
||||
$feedback->title = $data['title'];
|
||||
$feedback->status = isset($data['status']) ? true : false;
|
||||
$feedback->slug = $data['slug'];
|
||||
$feedback->date = $data['date'];
|
||||
$feedback->content = $data['content'];
|
||||
$feedback->description = $data['description'];
|
||||
$feedback->pagetitle = $data['pagetitle'];
|
||||
$feedback->keywords = $data['keywords'];
|
||||
|
||||
//parent
|
||||
$feedback->save();
|
||||
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('cms_feedback_detail', [$feedback->id]));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -120,6 +120,12 @@ class DraftController extends Controller
|
|||
foreach ($draft->draft_items as $draft_item){
|
||||
$draft_item->delete();
|
||||
}
|
||||
|
||||
foreach ($draft->travel_program_drafts as $travel_program_draft){
|
||||
$travel_program_draft->delete();
|
||||
}
|
||||
|
||||
|
||||
$draft->delete();
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('drafts'));
|
||||
|
|
|
|||
74
app/Models/Feedback.php
Normal file
74
app/Models/Feedback.php
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use HTMLHelper;
|
||||
|
||||
class Feedback extends Page
|
||||
{
|
||||
protected $table = 'page';
|
||||
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::addGlobalScope(function ($query) {
|
||||
$query->where('model', 'feedback');
|
||||
$query->orderBy('lvl', 'ASC');
|
||||
$query->orderBy('date', 'DESC');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public function parent()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Feedback', 'owner');
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
{
|
||||
if ($this->lvl == 2) {
|
||||
$this->parent();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public function setContentAttribute($value)
|
||||
{
|
||||
if (!$value) {
|
||||
$this->attributes['content'] = $value;
|
||||
} else {
|
||||
$this->attributes['content'] = HTMLHelper::filterHTML($value, ['src' => ['removeHost']], true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getParentsArray(){
|
||||
//lvl 0
|
||||
return Page::where('model', 'feedback')->where('lvl', 1)->get()->pluck('title', 'id');
|
||||
|
||||
}
|
||||
//$feedbacks = Feedback::where('lvl', 1)->get();
|
||||
public function getDateRow()
|
||||
{
|
||||
return$this->attributes['date'];
|
||||
}
|
||||
|
||||
public function getDateAttribute()
|
||||
{
|
||||
return isset($this->attributes['date']) ? Carbon::parse($this->attributes['date'])->format("d.m.Y") : '';
|
||||
}
|
||||
|
||||
public function setDateAttribute($value)
|
||||
{
|
||||
if (!$value) {
|
||||
$this->attributes['date'] = null;
|
||||
} else {
|
||||
$this->attributes['date'] = (new Carbon($value))->format('Y-m-d');
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
13
app/Models/Page.php
Normal file
13
app/Models/Page.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Page extends Model
|
||||
{
|
||||
protected $connection = 'mysql_stern';
|
||||
|
||||
protected $table = 'page';
|
||||
|
||||
}
|
||||
|
|
@ -172,6 +172,70 @@ class HTMLHelper
|
|||
return "alle Wochentage";
|
||||
}
|
||||
|
||||
public static function getParentBy($obj = NULL, $options, $empty=true){
|
||||
|
||||
$ret = "";
|
||||
$setId = 0;
|
||||
if($obj){
|
||||
$setId = $obj->id;
|
||||
}
|
||||
if($empty){
|
||||
$ret .= '<option value="">Non-Parent</option>\n';
|
||||
}
|
||||
foreach ($options as $id => $name){
|
||||
$attr = ($id === $setId) ? 'selected="selected"' : '';
|
||||
$ret .= '<option value="'.$id.'" '.$attr.'>'.$name.'</option>\n';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
public static function filterHTML($html, $arg = [], $save = false){
|
||||
|
||||
$dom = new \DOMDocument('1.0', 'UTF-8');
|
||||
//@$dom->loadHTML();
|
||||
|
||||
@$dom->loadHTML( mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
|
||||
|
||||
if(isset($arg['src'])){
|
||||
|
||||
if(in_array('addHost', $arg['src'])){
|
||||
$images = $dom->getElementsByTagName('img');
|
||||
foreach ($images as $image) {
|
||||
|
||||
$src = $image->getAttribute('src');
|
||||
$host = config('app.url_stern');
|
||||
if(strpos($src, $host) === false){
|
||||
$src = $host."/".ltrim($src, '/');
|
||||
}
|
||||
$image->setAttribute('src', $src);
|
||||
}
|
||||
}
|
||||
|
||||
if(in_array('removeHost', $arg['src'])){
|
||||
$images = $dom->getElementsByTagName('img');
|
||||
foreach ($images as $image) {
|
||||
$src = $image->getAttribute('src');
|
||||
$host = config('app.url_stern');
|
||||
if(strpos($src, $host) !== false){
|
||||
$src = str_replace($host, '', $src);
|
||||
}
|
||||
$image->setAttribute('src', $src);
|
||||
}
|
||||
}
|
||||
}
|
||||
$html = $dom->saveHTML();
|
||||
|
||||
$html = preg_replace('~<(?:!DOCTYPE|/?(?:html|head|body))[^>]*>\s*~i', '', $html);
|
||||
|
||||
if($save){
|
||||
return mb_convert_encoding($html, "UTF-8", "HTML-ENTITIES");
|
||||
}
|
||||
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
/*
|
||||
public static function getIndustrySectorsWithoutParents($id = false, $sameId = false, $all = true){
|
||||
$values = IndustrySector::where('parent_id', null)->get();
|
||||
|
|
|
|||
|
|
@ -6,3 +6,11 @@ if (! function_exists('make_old_url')) {
|
|||
return config('app.old_url').$path;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! function_exists('make_v2_url')) {
|
||||
function make_v2_url($path)
|
||||
{
|
||||
return config('app.url_v2').$path;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,12 @@ return [
|
|||
|
||||
'old_url' => env('APP_OLD_URL', 'http://cms-stern-tours.local'),
|
||||
|
||||
'url_v2' => env('APP_URL_V2', 'https://v2.stern-tours.de'),
|
||||
|
||||
'url_stern' => env('APP_URL_STERN', 'https://www.sterntours.de'),
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Timezone
|
||||
|
|
|
|||
92
database/migrations/2018_12_22_171112_create_page_table.php
Normal file
92
database/migrations/2018_12_22_171112_create_page_table.php
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreatePageTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('page', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('owner')->nullable()->default(0);
|
||||
$table->string('model', 20)->nullable();
|
||||
$table->integer('owner_second');
|
||||
$table->integer('catalog_id')->nullable();
|
||||
$table->integer('catalog_index')->nullable()->default(0);
|
||||
$table->string('slug', 255)->nullable();
|
||||
$table->integer('travel_program')->nullable();
|
||||
$table->integer('status')->nullable()->default(1);
|
||||
$table->integer('show_in_navi')->nullable()->default(1);
|
||||
$table->integer('order')->nullable()->default(0);
|
||||
$table->string('title', 255)->nullable();
|
||||
$table->string('pagetitle', 255)->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->text('keywords')->nullable();
|
||||
$table->text('content')->nullable();
|
||||
$table->text('content_new')->nullable();
|
||||
$table->string('buma_destination', 255)->nullable();
|
||||
$table->integer('OLD_CatalogID')->nullable();
|
||||
$table->integer('OLD_OwnerID')->nullable();
|
||||
$table->integer('buma_gjr')->nullable();
|
||||
$table->dateTime('date');
|
||||
$table->tinyInteger('price-tags')->default(0);
|
||||
$table->text('text_right')->nullable();
|
||||
$table->string('keyword', 255)->nullable();
|
||||
$table->string('canonical_url', 511)->nullable();
|
||||
$table->integer('country_id')->nullable();
|
||||
$table->string('template', 80)->nullable();
|
||||
$table->integer('lft')->nullable();
|
||||
$table->integer('rgt')->nullable();
|
||||
$table->integer('lvl')->nullable();
|
||||
$table->integer('tree_root')->nullable();
|
||||
$table->integer('parent_id')->nullable();
|
||||
$table->string('real_url_path', 200)->nullable();
|
||||
$table->text('box_body')->nullable();
|
||||
$table->string('box_image_url', 200)->nullable();
|
||||
$table->string('box_star', 255)->nullable();
|
||||
$table->string('box_discount', 255)->nullable();
|
||||
$table->longText('cms_settings')->nullable();
|
||||
$table->integer('fewo_lodging')->nullable();
|
||||
|
||||
$table->unique('keyword', 'keyword');
|
||||
$table->unique('real_url_path', 'UNIQ_140AB620E2652A2A');
|
||||
$table->unique('fewo_lodging', 'UNIQ_140AB6209629C357');
|
||||
$table->index('tree_root', 'IDX_140AB620A977936C');
|
||||
$table->index('parent_id', 'IDX_140AB620727ACA70');
|
||||
|
||||
$table->foreign('parent_id', 'FK_140AB620727ACA70')->references('id')->on('page')->onDelete('CASCADE
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('fewo_lodging', 'FK_140AB6209629C357')->references('id')->on('fewo_lodging')->onDelete('SET NULL
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('tree_root', 'FK_140AB620A977936C')->references('id')->on('page')->onDelete('CASCADE
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('country_id', 'FK_page_travel_country')->references('id')->on('travel_country')->onDelete('SET NULL
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('page');
|
||||
}
|
||||
}
|
||||
|
|
@ -50,7 +50,7 @@ jQuery(document).ready(function() {
|
|||
$(function() {
|
||||
|
||||
$('.datepicker-base').datepicker({
|
||||
orientation: 'auto right',
|
||||
orientation: 'auto left',
|
||||
calendarWeeks: true,
|
||||
todayBtn: 'linked',
|
||||
daysOfWeekDisabled: '1',
|
||||
|
|
|
|||
|
|
@ -40,4 +40,6 @@
|
|||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
179
resources/views/cms/feedback/detail.blade.php
Executable file
179
resources/views/cms/feedback/detail.blade.php
Executable file
|
|
@ -0,0 +1,179 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Feedback verwalten
|
||||
</h4>
|
||||
|
||||
{!! Form::open(['url' => route('cms_feedback_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-sm-8">
|
||||
<label class="form-label" for="feedback_title">{{ __('Title') }}*</label>
|
||||
{{ Form::text('title', $feedback->title, array('placeholder'=>__('Title'), 'class'=>'form-control', 'id'=>'feedback_title', 'required'=>true)) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="custom-control custom-checkbox float-right">
|
||||
{!! Form::checkbox('status', 1, $feedback->status, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('aktiv')}}</span>
|
||||
</label>
|
||||
<label for="feedback_title" class="form-label">{{__('Parent')}}*</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="feedback_title" required>
|
||||
{!! HTMLHelper::getParentBy($feedback->parent, $feedback->getParentsArray()) !!}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-sm-8">
|
||||
<label class="form-label" for="feedback_slug">{{ __('slug') }}*</label>
|
||||
{{ Form::text('slug', $feedback->slug, array('placeholder'=>__('slug'), 'class'=>'form-control', 'id'=>'feedback_slug', 'required'=>true)) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="feedback_date">{{ __('Reisezeitraum') }}</label>
|
||||
{{ Form::text('date', $feedback->date, array('placeholder'=>__('Reisezeitraum'), 'class'=>'form-control datepicker-base', 'id'=>'feedback_date')) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="feedback_slug">{{ __('Text') }}*</label>
|
||||
{{ Form::textarea('content', HTMLHelper::filterHTML($feedback->content, ['src' => ['addHost']]) , ['class' => 'form-control summernote']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label class="form-label" for="feedback_pagetitle">{{ __('META-Titel (optional)') }}</label>
|
||||
{{ Form::text('pagetitle', $feedback->pagetitle, array('placeholder'=>__('pagetitle'), 'class'=>'form-control', 'id'=>'feedback_pagetitle')) }}
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label class="form-label" for="feedback_description">{{ __('META-Beschreibung (optional)') }}</label>
|
||||
{{ Form::text('description', $feedback->description, array('placeholder'=>__('description'), 'class'=>'form-control', 'id'=>'feedback_description')) }}
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label class="form-label" for="feedback_keywords">{{ __('META-Keywords (optional)') }}</label>
|
||||
{{ Form::text('keywords', $feedback->keywords, array('placeholder'=>__('keywords'), 'class'=>'form-control', 'id'=>'feedback_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>
|
||||
<a href="{{route('cms_feedback')}}" class="btn btn-default">{{ __('back') }}</a>
|
||||
<a href="{{ make_v2_url("/acp/") }}" class="btn btn-default float-right">{{ __('zurück ins v2 Programm') }}</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
|
||||
106
resources/views/cms/feedback/index.blade.php
Executable file
106
resources/views/cms/feedback/index.blade.php
Executable file
|
|
@ -0,0 +1,106 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-4">
|
||||
{{ __('Feedback') }}
|
||||
</h4>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-feedbacks table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('Parent')}}</th>
|
||||
<th>{{__('Date')}}</th>
|
||||
<th>{{__('sichtbar')}}</th>
|
||||
{{--
|
||||
<th></th>
|
||||
--}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($feedbacks as $value)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('cms_feedback_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="far fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td><a href="{{ route('cms_feedback_detail', [$value->id]) }}">{{ $value->title }}</a></td>
|
||||
<td>@if($value->parent) {{ $value->parent->title }} @endif</td>
|
||||
<td data-sort="{{ $value->getDateRow() }}">{{ $value->date }}</td>
|
||||
|
||||
<td data-sort="{{ $value->status }}">
|
||||
@if($value->status)
|
||||
<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_feedback_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">
|
||||
<!-- <a href="{{ route('draft_detail', ['new']) }}" class="btn btn-sm btn-primary">Neue Vorlage anlegen</a> -->
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$('.datatables-feedbacks').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
},
|
||||
initComplete: function () {
|
||||
this.api().columns(2).every( function () {
|
||||
console.log(this.title);
|
||||
var column = this;
|
||||
var title = $(column.header()).html();
|
||||
var select = $('<select class="selectpicker"><option value="">'+title+'</option></select>')
|
||||
.appendTo( $(column.header()).empty() )
|
||||
.on( 'change', function () {
|
||||
var val = $.fn.dataTable.util.escapeRegex(
|
||||
$(this).val()
|
||||
);
|
||||
|
||||
column
|
||||
.search( val ? '^'+val+'$' : '', true, false )
|
||||
.draw();
|
||||
} );
|
||||
|
||||
column.data().unique().sort().each( function ( d, j ) {
|
||||
if(d !== ""){
|
||||
select.append( '<option value="'+d+'">'+d+'</option>' );
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
} );
|
||||
|
||||
$('.selectpicker').selectpicker();
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
|
|
@ -17,7 +17,6 @@
|
|||
<div class="tab-content">
|
||||
<div class="tab-pane fade @if($step == false) active show @endif" id="navs-top-drafts">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-drafts table table-striped table-bordered">
|
||||
<thead>
|
||||
|
|
@ -57,7 +56,6 @@
|
|||
<a href="{{ route('draft_load_new') }}" class="btn btn-sm btn-default float-right mt-2">aus Vorlage duplizieren</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$('.datatables-drafts').dataTable({
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
<link rel="stylesheet" href="{{ mix('/vendor/libs/bootstrap-datepicker/bootstrap-datepicker.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') }}">
|
||||
<!-- Layout helpers -->
|
||||
<script src="{{ mix('/vendor/js/layout-helpers.js') }}"></script>
|
||||
|
||||
|
|
@ -123,11 +123,11 @@
|
|||
<script src="{{asset('/js/bootstrap-datepicker.de.min.js')}}"></script>
|
||||
<script src="{{ mix('/vendor/libs/dragula/dragula.js') }}"></script>
|
||||
<script src="{{ mix('/vendor/libs/minicolors/minicolors.js') }}"></script>
|
||||
<script src="{{ asset('/vendor/libs/summernote/dist/summernote-bs4.js') }}"></script>
|
||||
|
||||
|
||||
|
||||
<!-- Libs -->
|
||||
|
||||
<!-- `perfect-scrollbar` library required by SideNav plugin -->
|
||||
<script src="{{ mix('/vendor/libs/perfect-scrollbar/perfect-scrollbar.js') }}"></script>
|
||||
|
||||
|
|
@ -148,6 +148,26 @@
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.summernote').summernote({
|
||||
height: 300,
|
||||
tabsize: 2,
|
||||
followingToolbar: true,
|
||||
toolbar: [
|
||||
['style', ['style']],
|
||||
['font', ['bold', 'italic', 'underline', 'clear']],
|
||||
['color', ['color']],
|
||||
['para', ['ul', 'ol', 'paragraph']],
|
||||
['insert', ['link', 'picture', 'video', 'hr']],
|
||||
['view', ['fullscreen', 'codeview']],
|
||||
['help', ['help']]
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
jQuery.each(jQuery('textarea.autoExpand'), function() {
|
||||
var offset = this.offsetHeight - this.clientHeight;
|
||||
var resizeTextarea = function(el) {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
@if(Auth::user()->isAdmin())
|
||||
<li class="sidenav-divider mb-1"></li>
|
||||
<li class="sidenav-header small font-weight-semibold">ADMIN</li>
|
||||
<li class="sidenav-header small font-weight-semibold">ADMIN CRM</li>
|
||||
|
||||
|
||||
<li class="sidenav-item{{ Request::is('travel_programs') ? ' active' : '' }}">
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
<a href="{{ route('bookings') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-bed"></i><div>Buchungen</div></a>
|
||||
</li>
|
||||
<li class="sidenav-divider mb-1"></li>
|
||||
<li class="sidenav-header small font-weight-semibold">ADMIN altes System</li>
|
||||
<li class="sidenav-header small font-weight-semibold">ADMIN CRM altes System</li>
|
||||
|
||||
<li class="sidenav-item">
|
||||
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
|
||||
|
|
@ -63,6 +63,14 @@
|
|||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="sidenav-divider mb-1"></li>
|
||||
<li class="sidenav-header small font-weight-semibold">ADMIN CMS</li>
|
||||
|
||||
|
||||
<li class="sidenav-item{{ Request::is('cms/feedback/*') ? ' active' : '' }}">
|
||||
<a href="{{ route('cms_feedback') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-chatboxes"></i><div>Feedback</div></a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if(Auth::user()->isSuperAdmin())
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="program_code">{{ __('Programm Code') }}*</label>
|
||||
{{ Form::text('program_code', $program->program_code, array('placeholder'=>__('Subtitle'), 'class'=>'form-control', 'id'=>'program_code', 'required'=>true)) }}
|
||||
{{ Form::text('program_code', $program->program_code, array('placeholder'=>__('Programm Code'), 'class'=>'form-control', 'id'=>'program_code', 'required'=>true)) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
|
@ -153,7 +153,7 @@
|
|||
<div class="text-left mt-3">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>
|
||||
<a href="{{route('travel_programs')}}" class="btn btn-default">{{ __('back') }}</a>
|
||||
<a href="https://v2.stern-tours.de/acp/travel_program/show/{{$program->id}}/" class="btn btn-default float-right">{{ __('zurück ins v2 Programm') }}</a>
|
||||
<a href="{{ make_v2_url("/acp/travel_program/show/".$program->id."/") }}" class="btn btn-default float-right">{{ __('zurück ins v2 Programm') }}</a>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
|
|
|||
|
|
@ -145,6 +145,17 @@ Route::group(['middleware' => ['admin']], function()
|
|||
Route::get('/booking/draft_item/delete/{id}', 'BookingController@draftItemDelete')->name('booking_draft_item_delete');
|
||||
|
||||
|
||||
|
||||
//CMS
|
||||
|
||||
//feedback
|
||||
Route::get('/cms/feedback', 'CMSFeedbackController@index')->name('cms_feedback');
|
||||
Route::get('/cms/feedback/detail/{id}', 'CMSFeedbackController@detail')->name('cms_feedback_detail');
|
||||
Route::post('/cms/feedback/detail/{id}', 'CMSFeedbackController@store')->name('cms_feedback_detail');
|
||||
Route::get('/cms/feedback/delete/{id}', 'CMSFeedbackController@delete')->name('cms_feedback_delete');
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
//login pages for worker
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue