]> gitweb.hamatoma.de Git - gadeku.git/commitdiff
- PageController:
authorHamatoma <author@hamatoma.de>
Sun, 28 Apr 2024 14:29:04 +0000 (16:29 +0200)
committerHamatoma <author@hamatoma.de>
Sun, 28 Apr 2024 14:29:04 +0000 (16:29 +0200)
  - Korrektur: Anzeige des Audio-Controls

CHANGELOG.md
app/Http/Controllers/PageController.php
resources/views/page/edit.blade.php
resources/views/page/show-col1.blade.php
resources/views/page/text-col2.blade.php

index 9babd71883310358f3c61edf060780e66f4199d7..dbce0d192893618bf1e962324b8c3b4ad5cf1e2d 100644 (file)
@@ -1,3 +1,9 @@
+# V 0.2.5 Page
+
+## Changed
+- PageController:
+  - Korrektur: Anzeige des Audio-Controls
+
 # V 0.2.4 Page
 
 ## Changed
index 4a608221410f04829681a77923fa1da3871062da..9580a7b7d1c75dd874402bf612e726d55e283df2 100644 (file)
@@ -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);
index 72f19ac3b55eb238219a624840460d6e2a657c4b..ec0c1635463ba34e0543d237e0a54a667851e083 100644 (file)
@@ -1,7 +1,7 @@
 @extends('layouts.backend')
 
 @section('content')
-    <form id="page-edit" action="/page-edit/{{ $context->model->id }}" method="POST">
+    <form id="page-edit" enctype="multipart/form-data" action="/page-edit/{{ $context->model->id }}" method="POST">
         @csrf
         <x-laraknife.panels.edit title="{{ __('Change of a Page') }}">
             <x-laraknife.forms.combobox position="first" name="pagetype_scope" label="Pagetype" :options="$optionsPagetype" width2="4"
index e4d966fe54233cc5d5e1e66f6afd87f01389b385..ad3f0be47ea0c3a9da67c5758adee99a45e60e00 100644 (file)
@@ -5,12 +5,12 @@
         @csrf
         <x-laraknife.panels.text-area title="{{ $context->valueof('title') }}">
             <div class="lkn-text">
-                {!! $context->valueOf('text') !!}
+                {!! $context->valueOf('text1') !!}
             </div>
         </x-laraknife.panels.text-area>
-        @if ($context->valueof('link') != null)
+        @if ($context->valueof('audio') != null)
             <div class="row">
-                <x-laraknife.forms.audio width1="5" width2="2" fileLink="{{ $context->valueof('link') }}" />
+                <x-laraknife.forms.audio width1="5" width2="2" fileLink="{{ $context->valueof('audio') }}" />
             </div>
         @endif
     </form>
index 194c509791012f545bc560fd26a1dfebda38a8bf..e8dd889d031424b2327d4e68addadf8935dff538 100644 (file)
@@ -18,9 +18,7 @@
             </div>
         </x-laraknife.panels.text-area>
         @if ($context->valueof('audio') != null)
-            <div class="row">
-                <x-laraknife.forms.audio width1="5" width2="2" fileLink="{{ $context->valueof('audio') }}" />
-            </div>
+                <x-laraknife.forms.audio-norow fileLink="{{ $context->valueof('audio') }}" />
         @endif
     </form>
 @endsection