-# V 0.2.6 Word umgebaut, verbImperfect
+# V 0.2.7 Pages
+
+## Added
+- Neue Attribute für Seitenverlinkung: previous_id, up_id, next_id
+
+# V 0.2.6 MediaWiki
+
+## Changed
+- MediaWiki:
+ - verbesserte RegEx-Ausdrücke in expandStarItems()
+ - Korrekturen in specialMacrosToHtml()
+
+# V 0.2.7 Word umgebaut, verbImperfect
## Changed
- Module Verb und Noun entfallen, Word arbeitet mit strukturiertem Attribut options
{
$rc = preg_replace(
[
- '/\*(\w[^*]+\w)\*/',
+ '/\*(\w.*?\w)\*/',
'/\*<(.+?)>\*/',
- '/\*-(\w[^*]+\w)-\*/',
- '/\*\+(\w[^*]+\w)\+\*/'
+ '/\*-(\w.*?\w)-\*/',
+ '/\*\+(\w.*?\w)\+\*/',
+ '/\*(\w)\*/'
],
[
'%trans($1)%',
'%field($1)%',
'%del($1)%',
- '%add($1)%'
+ '%add($1)%',
+ '%trans($1)%',
],
$text
);
break;
case 'trans':
$text = $matches[2];
- $info = count($matches) > 3 ? $text : substr($matches[3], 1);
+ $info = count($matches) <= 3 ? $text : substr($matches[3], 1);
$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>';
break;
case 'add':
- $rc = '<ins class="lkn-ins">' . (count($matches) == 4 ? ($matches[2] . $matches[3]) : $matches[2]) . '</ins>';
+ $rc = '<ins class="lkn-ins">' . (count($matches) >= 4 ? ($matches[2] . $matches[3]) : $matches[2]) . '</ins>';
break;
case 'del':
$rc = '<del class="lkn-del">' . (count($matches) == 4 ? ($matches[2] . $matches[3]) : $matches[2]) . '</del>';
$class = $size == 0 ? '' : "lkn-icon-$size";
$rc = "<i class=\"$name $class\"></i>";
break;
- case 'image':
- $name = $matches[2];
- $size = count($matches) < 4 ? null : $matches[3];
- $class = $size == 0 ? '' : "lkn-icon-$size";
- $rc = "<img class=\"$name $class\"></i>";
- break;
default:
$rc = $matches[0];
break;
'markup_scope' => $page->markup_scope,
'language_scope' => $page->language_scope,
'order' => $page->order ?? '0',
- 'audio_id' => $page->audio_id
+ 'audio_id' => $page->audio_id,
+ 'previous_id' => $page->previous_id,
+ 'next_id' => $page->next_id,
+ 'up_id' => $page->up_id
];
} else {
$fields['pagetype_scope'] = $page->pagetype_scope;
$view = 'page.text-col2';
}
}
+ if ($page->previous_id != null){
+ $params['prev'] = "/page-showpretty/$page->previous_id";
+ }
+ if ($page->next_id != null){
+ $params['next'] = "/page-showpretty/$page->next_id";
+ }
+ if ($page->up_id != null){
+ $params['up'] = "/page-showpretty/$page->up_id";
+ }
$context = new ContextLaraKnife($request, $params, $page);
$rc = view($view, ['context' => $context]);
}
if ($fields['reference_id'] != null){
$rules['reference_id'] = 'exists:pages,id';
}
+ if ($fields['previous_id'] != null){
+ $rules['previous_id'] = 'exists:pages,id';
+ }
+ if ($fields['up_id'] != null){
+ $rules['up_id'] = 'exists:pages,id';
+ }
+ if ($fields['next_id'] != null){
+ $rules['next_id'] = 'exists:pages,id';
+ }
$validator = Validator::make($fields, $rules);
if ($validator->fails()) {
$errors = $validator->errors();
'columns',
'audio_id',
'reference_id',
+ 'previous_id',
+ 'up_id',
+ 'next_id',
'owner_id'
];
}
"dist": {
"type": "path",
"url": "../laraknife",
- "reference": "fdc1af63b7d821c111b630663be1f0bcbba93fa5"
+ "reference": "646e4764a06caa8ed60766fd98c8ce6882479d9c"
},
"require-dev": {
"phpunit/phpunit": "11.0.x-dev"
--- /dev/null
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+ /**
+ * Run the migrations.
+ */
+ public function up(): void
+ {
+ Schema::table('pages', function(Blueprint $table) {
+ $table->foreignId('previous_id')->nullable()->references('id')->on('pages');
+ $table->foreignId('next_id')->nullable()->references('id')->on('pages');
+ $table->foreignId('up_id')->nullable()->references('id')->on('pages');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ //
+ }
+};
"Administrator": "Administrator",
"All": "Alle",
"Assign Roles": "Rollen zuordnen",
+ "Back": "Zur\u00fcck",
"Body": "Info",
"Cancel": "Abbrechen",
"Category": "Kategorie",
"Markup": "Sprachtyp",
"Name": "Name",
"New": "Neu",
+ "Next": "Weiter",
"Not Assigned Menu Items": "Nicht zugeordnete Men\u00fceintr\u00e4ge",
"Not verified": "Nicht \u00fcberpr\u00fcft",
"Notes": "Notizen",
@section('content')
<form id="chapter-show" action="/chapter-show/{{ $context->model->id }}" method="POST">
@csrf
- <x-laraknife.panels.noform-text title="{{ $context->valueof('title') }}">
+ <x-laraknife.panels.noform-text title="{{ $context->valueof('title') }}" prev="{{ $context->valueof('prev') }}"
+ next="{{ $context->valueof('next') }}">
<div class="row">
{!! $context->valueOf('text') !!}
</div>
value="{{ $context->valueOf('contents') }}" width2="10" rows="10" />
<x-laraknife.forms.text position="alone" name="info" label="Info" value="{{ $context->valueOf('info') }}"
width2="10" rows="2" />
- <x-laraknife.forms.file-protected position="first" name="file" fieldId="{{ $context->model->audio_id }}"
+ <x-laraknife.forms.file-protected position="alone" name="file" fieldId="{{ $context->model->audio_id }}"
label="Audio" width2="4" />
- <x-laraknife.buttons.button position="last" name="btnPreview" label="Preview" />
+ <x-laraknife.forms.string position="first" name="previous_id" label="Previous"
+ value="{{ $context->valueOf('previous_id') }}" width2="1" />
+ <x-laraknife.forms.string position="middle" name="up_id" label="Up"
+ value="{{ $context->valueOf('up_id') }}" width1="1" width2="1" />
+ <x-laraknife.forms.string position="middle" name="next_id" label="Next"
+ value="{{ $context->valueOf('next_id') }}" width1="1" width2="1" />
+ <x-laraknife.buttons.button-position position="last" name="btnPreview" label="Preview" width1="1"
+ width2="4" />
</x-laraknife.panels.edit>
@if (!empty($context->valueOf('preview')))
<x-laraknife.panels.noform title="{{ __('Preview') }}">
@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">
{!! $context->valueOf('text1') !!}
</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