From: Hamatoma Date: Sun, 28 Apr 2024 14:29:04 +0000 (+0200) Subject: - PageController: X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=819fa126a8e30b62aeec16c24c4db5b40e094a92;p=gadeku.git - PageController: - Korrektur: Anzeige des Audio-Controls --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 9babd71..dbce0d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# V 0.2.5 Page + +## Changed +- PageController: + - Korrektur: Anzeige des Audio-Controls + # V 0.2.4 Page ## Changed diff --git a/app/Http/Controllers/PageController.php b/app/Http/Controllers/PageController.php index 4a60822..9580a7b 100644 --- a/app/Http/Controllers/PageController.php +++ b/app/Http/Controllers/PageController.php @@ -352,6 +352,9 @@ LEFT JOIN sproperties t4 ON t4.id=t0.owner_id public function update(Page $page, Request $request, array &$fields) { $rules = $this->rules(false); + if ($fields['order'] == null){ + $fields['order'] = 0; + } if ($fields['reference_id'] != null){ $rules['reference_id'] = 'exists:pages,id'; } @@ -362,7 +365,9 @@ LEFT JOIN sproperties t4 ON t4.id=t0.owner_id } else { $validated = $validator->validated(); $validated['info'] = strip_tags($validated['info']); - if (empty($page->audio_id) && $request->file('file') != null) { + $audioId = $page->audio_id; + $x = $request->file('file'); + if ($audioId == null && $request->file('file') != null) { $filename = FileHelper::textToFilename($page->title); $moduleId = Module::idOfModule('Page'); $fileId = File::storeFile($request, $page->title, 1103, 1091, 'audio file of page', $filename, $moduleId, $page->id); diff --git a/resources/views/page/edit.blade.php b/resources/views/page/edit.blade.php index 72f19ac..ec0c163 100644 --- a/resources/views/page/edit.blade.php +++ b/resources/views/page/edit.blade.php @@ -1,7 +1,7 @@ @extends('layouts.backend') @section('content') -
+ @csrf
- {!! $context->valueOf('text') !!} + {!! $context->valueOf('text1') !!}
- @if ($context->valueof('link') != null) + @if ($context->valueof('audio') != null)
- +
@endif diff --git a/resources/views/page/text-col2.blade.php b/resources/views/page/text-col2.blade.php index 194c509..e8dd889 100644 --- a/resources/views/page/text-col2.blade.php +++ b/resources/views/page/text-col2.blade.php @@ -18,9 +18,7 @@ @if ($context->valueof('audio') != null) -
- -
+ @endif @endsection