From: Hamatoma Date: Tue, 7 May 2024 16:35:28 +0000 (+0200) Subject: MediaWiki Unicode Navigation X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=d16b0026aa2f312da3152e51556b2bb9f4fea933;p=gadeku.git MediaWiki Unicode Navigation - 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. --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 2aab876..3643768 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/app/Helpers/MediaWiki.php b/app/Helpers/MediaWiki.php index f9afb28..c5034ed 100644 --- a/app/Helpers/MediaWiki.php +++ b/app/Helpers/MediaWiki.php @@ -44,7 +44,8 @@ class MediaWiki extends MediaWikiBase $rc = "$text"; break; case 'mark': - $rc = '' . $matches[2] . ''; + $mode = count($matches) > 3 ? substr($matches[3], 1) : 'info'; + $rc = "$matches[2]"; break; case 'add': $rc = '' . (count($matches) >= 4 ? ($matches[2] . $matches[3]) : $matches[2]) . ''; @@ -77,6 +78,7 @@ class MediaWiki extends MediaWikiBase } return $rc; }, $body); + $body = preg_replace('/U\+(x[\dA-F]+;)/', '&#\1', $body); return $body; } } diff --git a/app/Http/Controllers/PageController.php b/app/Http/Controllers/PageController.php index e8ff792..5a04889 100644 --- a/app/Http/Controllers/PageController.php +++ b/app/Http/Controllers/PageController.php @@ -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){ diff --git a/composer.lock b/composer.lock index 297b6e5..ebffb40 100644 --- a/composer.lock +++ b/composer.lock @@ -1056,7 +1056,7 @@ "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 index 0000000..e69de29 diff --git a/resources/views/page/show-col2.blade.php b/resources/views/page/show-col2.blade.php index 045327b..6ca3c9d 100644 --- a/resources/views/page/show-col2.blade.php +++ b/resources/views/page/show-col2.blade.php @@ -3,7 +3,8 @@ @section('content')
@csrf - +
@@ -15,10 +16,5 @@
- @if ($context->valueof('audio') != null) -
- -
- @endif @endsection diff --git a/resources/views/page/show-col3.blade.php b/resources/views/page/show-col3.blade.php index e798954..a0a4bd5 100644 --- a/resources/views/page/show-col3.blade.php +++ b/resources/views/page/show-col3.blade.php @@ -3,7 +3,8 @@ @section('content')
@csrf - +
@@ -18,10 +19,5 @@
- @if ($context->valueof('audio') != null) -
- -
- @endif @endsection diff --git a/resources/views/page/show-col4.blade.php b/resources/views/page/show-col4.blade.php index 89446d0..1fa8d12 100644 --- a/resources/views/page/show-col4.blade.php +++ b/resources/views/page/show-col4.blade.php @@ -3,7 +3,8 @@ @section('content')
@csrf - +
@@ -21,10 +22,5 @@
- @if ($context->valueof('link') != null) -
- -
- @endif @endsection diff --git a/resources/views/page/text-col2.blade.php b/resources/views/page/text-col2.blade.php deleted file mode 100644 index e8dd889..0000000 --- a/resources/views/page/text-col2.blade.php +++ /dev/null @@ -1,24 +0,0 @@ -@extends('layouts.frontend') - -@section('content') -
- @csrf - -
-
-
- {!! $context->valueOf('text1') !!} -
-
-
-
- {!! $context->valueOf('text2') !!} -
-
-
-
- @if ($context->valueof('audio') != null) - - @endif - -@endsection diff --git a/resources/views/page/translation-col2.blade.php b/resources/views/page/translation-col2.blade.php new file mode 100644 index 0000000..b6a26f1 --- /dev/null +++ b/resources/views/page/translation-col2.blade.php @@ -0,0 +1,22 @@ +@extends('layouts.frontend') + +@section('content') +
+ @csrf + +
+
+
+ {!! $context->valueOf('text1') !!} +
+
+
+
+ {!! $context->valueOf('text2') !!} +
+
+
+
+
+@endsection