]> gitweb.hamatoma.de Git - gadeku.git/commitdiff
MediaWiki Unicode Navigation
authorHamatoma <author@hamatoma.de>
Tue, 7 May 2024 16:35:28 +0000 (18:35 +0200)
committerHamatoma <author@hamatoma.de>
Tue, 7 May 2024 16:35:28 +0000 (18:35 +0200)
- MediaWiki:
  - Korrekturen in specialMacrosToHtml(): Indexprüfung für $matches
  - Neu: Unicode-Muster
- PageController:
  - Korrektur: Berechnen Vorschau nur wenn Button
- show-col2.blade, ... + translation-col2.blade: Anzeige von "Zurück"- und "Weiter"-Icons.

CHANGELOG.md
app/Helpers/MediaWiki.php
app/Http/Controllers/PageController.php
composer.lock
dummy.html [new file with mode: 0644]
resources/views/page/show-col2.blade.php
resources/views/page/show-col3.blade.php
resources/views/page/show-col4.blade.php
resources/views/page/text-col2.blade.php [deleted file]
resources/views/page/translation-col2.blade.php [new file with mode: 0644]

index 2aab8761e7c3806c9a0e165087719062af7aa0ea..3643768382a350cb189cff33046b74b782da0030 100644 (file)
@@ -1,3 +1,13 @@
+# V 0.2.8 MediaWiki Unicode Navigation
+
+## Changed
+- MediaWiki: 
+  - Korrekturen in specialMacrosToHtml(): Indexprüfung für $matches
+  - Neu: Unicode-Muster
+- PageController:
+  - Korrektur: Berechnen Vorschau nur wenn Button
+- show-col2.blade, ... + translation-col2.blade: Anzeige von "Zurück"- und "Weiter"-Icons.
+
 # V 0.2.7 Pages
 
 ## Added
index f9afb286f48b9bb60195b2c538b401cfd9b5ad3e..c5034ed55fbde790a0492fe5b5a7982a257dff57 100644 (file)
@@ -44,7 +44,8 @@ class MediaWiki extends MediaWikiBase
                     $rc = "<i><b data-toggle=\"tooltip\" data-placement=\"top\" title=\"$info\">$text</b></i>";
                     break;
                 case 'mark':
-                    $rc = '<span class="lkn-text-' . substr($matches[3], 1) . '">' . $matches[2] . '</span>';
+                    $mode = count($matches) > 3 ? substr($matches[3], 1) : 'info';
+                    $rc = "<span class=\"lkn-text-$mode\">$matches[2]</span>";
                     break;
                 case 'add':
                     $rc = '<ins class="lkn-ins">' . (count($matches) >= 4 ? ($matches[2] . $matches[3]) : $matches[2]) . '</ins>';
@@ -77,6 +78,7 @@ class MediaWiki extends MediaWikiBase
             }
             return $rc;
         }, $body);
+        $body = preg_replace('/U\+(x[\dA-F]+;)/', '&#\1', $body);
         return $body;
     }
 }
index e8ff792043aa81bc9b65eff490f5517e900dd68c..5a0488938d7e5baf84d35e6461fed2cc1505a1a5 100644 (file)
@@ -114,8 +114,7 @@ class PageController extends Controller
             $optionsPagetype = SProperty::optionsByScope('pagetype', $page->pagetype_scope, '');
             $optionsMarkup = SProperty::optionsByScope('markup', $page->markup_scope, '');
             $optionsLanguage = SProperty::optionsByScope('localization', $page->language_scope, '');
-            $preview = $this->asHtml($page);
-            $fields = $request->btnSubmit !== 'btnPreview' ? null : ['preview' => $preview];
+            $fields = $request->btnSubmit !== 'btnPreview' ? null : ['preview' => $this->asHtml($page)];
             $context = new ContextLaraKnife($request, $fields, $page);
             $rc = view('page.edit', [
                 'context' => $context,
@@ -285,7 +284,7 @@ LEFT JOIN sproperties t4 ON t4.id=t0.owner_id
                 }
                 if ($text2 != null) {
                     $params['text2'] = $text2;
-                    $view = 'page.text-col2';
+                    $view = 'page.translation-col2';
                 }
             }
             if ($page->previous_id != null){
index 297b6e5fc34c6651ba0480106339cac708ec6bfe..ebffb4082b9e1044aa43e62533c16b0dd3a25c29 100644 (file)
             "dist": {
                 "type": "path",
                 "url": "../laraknife",
-                "reference": "646e4764a06caa8ed60766fd98c8ce6882479d9c"
+                "reference": "8a0789ea4dc11c715341bfeb32f23113068a3384"
             },
             "require-dev": {
                 "phpunit/phpunit": "11.0.x-dev"
diff --git a/dummy.html b/dummy.html
new file mode 100644 (file)
index 0000000..e69de29
index 045327b475bcd3e45be8bda000fa693314fe4b24..6ca3c9d4331ab2800adc76a570df656c5daf54a1 100644 (file)
@@ -3,7 +3,8 @@
 @section('content')
     <form id="page-show" action="/page-show/{{ $context->model->id }}" method="POST">
         @csrf
-        <x-laraknife.panels.text-area title="{{ $context->valueof('title') }}">
+        <x-laraknife.panels.text-area title="{{ $context->valueof('title') }}" prev="{{ $context->valueof('prev') }}"
+            up="{{ $context->valueof('up') }}"  next="{{ $context->valueof('next') }}" audio="{{ $context->valueof('audio') }}">
             <div class="lkn-text">
             <div class="row">
                 <div class="col-md-6">
             </div>
             </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>
-        @endif
     </form>
 @endsection
index e798954c79469bd0afbd6b5bc975d406335cdde7..a0a4bd57babfa8a2a81d1b9942eae75621242ec2 100644 (file)
@@ -3,7 +3,8 @@
 @section('content')
     <form id="page-show" action="/page-show/{{ $context->model->id }}" method="POST">
         @csrf
-        <x-laraknife.panels.text-area title="{{ $context->valueof('title') }}">
+        <x-laraknife.panels.text-area title="{{ $context->valueof('title') }}" prev="{{ $context->valueof('prev') }}"
+            up="{{ $context->valueof('up') }}"  next="{{ $context->valueof('next') }}" audio="{{ $context->valueof('audio') }}">
             <div class="lkn-text">
                 <div class="row">
                     <div class="col-md-4">
                 </div>
             </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>
-        @endif
     </form>
 @endsection
index 89446d043885c4f847f5cb99f537b0d30eb8606c..1fa8d127b7fe0b67636fadd22a87623781d0af9f 100644 (file)
@@ -3,7 +3,8 @@
 @section('content')
     <form id="page-show" action="/page-show/{{ $context->model->id }}" method="POST">
         @csrf
-        <x-laraknife.panels.text-area title="{{ $context->valueof('title') }}">
+        <x-laraknife.panels.text-area title="{{ $context->valueof('title') }}" prev="{{ $context->valueof('prev') }}"
+            up="{{ $context->valueof('up') }}"  next="{{ $context->valueof('next') }}" audio="{{ $context->valueof('audio') }}">
             <div class="lkn-text">
                 <div class="row">
                     <div class="col-md-3">
                 </div>
             </div>
         </x-laraknife.panels.text-area>
-        @if ($context->valueof('link') != null)
-            <div class="row">
-                <x-laraknife.forms.audio width1="5" width2="2" fileLink="{{ $context->valueof('link') }}" />
-            </div>
-        @endif
     </form>
 @endsection
diff --git a/resources/views/page/text-col2.blade.php b/resources/views/page/text-col2.blade.php
deleted file mode 100644 (file)
index e8dd889..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-@extends('layouts.frontend')
-
-@section('content')
-    <form id="page-show" action="/page-show/{{ $context->model->id }}" method="POST">
-        @csrf
-        <x-laraknife.panels.text-area title="{{ $context->valueof('title') }}">
-            <div class="row">
-                <div class="col-md-6">
-                    <div class="lkn-text">
-                        {!! $context->valueOf('text1') !!}
-                    </div>
-                </div>
-                <div class="col-md-6">
-                    <div class="lkn-text">
-                        {!! $context->valueOf('text2') !!}
-                    </div>
-                </div>
-            </div>
-        </x-laraknife.panels.text-area>
-        @if ($context->valueof('audio') != null)
-                <x-laraknife.forms.audio-norow fileLink="{{ $context->valueof('audio') }}" />
-        @endif
-    </form>
-@endsection
diff --git a/resources/views/page/translation-col2.blade.php b/resources/views/page/translation-col2.blade.php
new file mode 100644 (file)
index 0000000..b6a26f1
--- /dev/null
@@ -0,0 +1,22 @@
+@extends('layouts.frontend')
+
+@section('content')
+    <form id="page-show" action="/page-show/{{ $context->model->id }}" method="POST">
+        @csrf
+            <x-laraknife.panels.text-area title="{{ $context->valueof('title') }}" prev="{{ $context->valueof('prev') }}"
+                up="{{ $context->valueof('up') }}"  next="{{ $context->valueof('next') }}" audio="{{ $context->valueof('audio') }}">
+                <div class="row">
+                <div class="col-md-6">
+                    <div class="lkn-text">
+                        {!! $context->valueOf('text1') !!}
+                    </div>
+                </div>
+                <div class="col-md-6">
+                    <div class="lkn-text">
+                        {!! $context->valueOf('text2') !!}
+                    </div>
+                </div>
+            </div>
+        </x-laraknife.panels.text-area>
+    </form>
+@endsection