Führe eine zentrale Widget-Registry mit visuellem Seiteneditor ein.
CI Feature / test (push) Successful in 31s

- Codebasiertes Widget-Register (config/cms.php) mit Vertrag
  {id, type, v, variant, settings, data, refs}: Typkennung, Schemaversion,
  Prüfregeln, freigegebene Varianten, Editorfelder, Blade-Ansicht,
  Verweisauflösung und Medienliste je Widget-Art.
- Die sechs Bestandsbausteine bleiben als Version 1 lesbar; gespeicherte
  Revisionen werden nicht umgeschrieben, sondern beim Lesen angehoben
  (Bild und Text: Version 2 mit Titel, formatiertem Text, Bild links/rechts).
  Wiederherstellen kopiert eine Revision unverändert.
- Neue Widgets: Einstieg (Hero) und Programm-/Modulkarten. Letztere speichern
  nur Verweise; Titel und Kurzbeschreibung kommen aus den Fachdaten. Öffentlich
  erscheinen nur Programme mit Anzeigefreigabe (gleiche Regel wie /programme,
  jetzt in PublicCatalogReader); Module nur in der Redaktionsvorschau, bis
  öffentliche Profile (ADR-29) bestehen.
- Ein Renderer für öffentliche Seite, Vorschau und Blockvorschau im Editor.
- Seiteneditor als Filament-Builder: Auswahl mit Beschreibung und Schema,
  kompakte Abschnitte mit Vorschau, Bearbeitung im Dialog, Sortieren,
  Duplizieren. Speichern erzeugt nur einen Entwurf.
- Vorschau einer Revision in 390/768/1440 px; Vorschauroute nutzt den
  Personal-Guard (vorher war sie für Redakteure ohne Mitgliedersitzung
  nicht erreichbar).
- Basislayout in Komponenten (Marke, Kopf, Fuß, Seitenvorlage).
- Navigation: bearbeiten, ausblenden, löschen, per Ziehen sortieren;
  unsichere Adressen (javascript:) werden abgewiesen und nicht ausgegeben.
  Ergänzende Migration is_visible (Vorgabe sichtbar).
- Pfadfehler und doppelte Pfade erscheinen am Pfadfeld statt still zu scheitern.

Tests: BlockRegistryTest geht in WidgetRegistryTest auf (gleiche Prüfungen
plus Registrierung, Versionierung, Bereinigung). Bestandsseiten werden gegen
Textfixtures aus dem Stand vor der Umstellung geprüft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-17 17:49:30 +01:00
1 parent cfdd6de0c7
commit 9d936bfa4a
76 files changed
+4237 -475

No files matched your search

@@ -0,0 +1,9 @@
<div class="cta">
<h2>{{ $data['heading'] ?? '' }}</h2>
@if (filled($data['text'] ?? null))
<p>{{ $data['text'] }}</p>
@endif
@if (\App\Domain\Cms\Widgets\Support\SafeUrl::isSafe($data['url'] ?? null))
<a href="{{ $data['url'] }}">{{ $data['label'] ?? '' }}</a>
@endif
</div>
+27
View File
@@ -0,0 +1,27 @@
@if ($items !== [])
<ul class="cards cards-{{ $variant === 'compact' ? 'compact' : 'grid' }}">
@foreach ($items as $item)
<li class="card @if ($item['imageUrl']) card-with-image @endif">
@if ($item['url'])
<a href="{{ $item['url'] }}">
@if ($item['imageUrl'])
<img class="card-image" src="{{ $item['imageUrl'] }}" alt="" loading="lazy">
@endif
<h3>{{ $item['title'] }}</h3>
@if (filled($item['text']))
<p>{{ $item['text'] }}</p>
@endif
</a>
@else
@if ($item['imageUrl'])
<img class="card-image" src="{{ $item['imageUrl'] }}" alt="" loading="lazy">
@endif
<h3>{{ $item['title'] }}</h3>
@if (filled($item['text']))
<p>{{ $item['text'] }}</p>
@endif
@endif
</li>
@endforeach
</ul>
@endif
@@ -0,0 +1,39 @@
@if ($entries !== [] || $context->preview)
<div class="catalog-cards catalog-cards-{{ $variant === 'compact' ? 'compact' : 'standard' }}">
@if (filled($data['heading'] ?? null))
<h2>{{ $data['heading'] }}</h2>
@endif
@if (filled($data['intro'] ?? null))
<p class="lede">{{ $data['intro'] }}</p>
@endif
@if ($entries === [])
<p class="preview-note">Noch kein Programm oder Modul gewählt, oder keines ist öffentlich sichtbar. Öffentlich erscheint dieser Abschnitt nicht.</p>
@else
<ul class="catalog-list">
@foreach ($entries as $entry)
<li class="catalog-card @unless ($entry->public) catalog-card-internal @endunless">
@if ($variant !== 'compact')
<div class="catalog-card-visual" aria-hidden="true"><span>{{ $entry->kindLabel }}</span></div>
@endif
<div class="catalog-card-body">
<p class="catalog-card-kind">{{ $entry->kindLabel }}</p>
<h3>
@if ($entry->url)
<a href="{{ $entry->url }}">{{ $entry->title }}</a>
@else
{{ $entry->title }}
@endif
</h3>
@if ($variant !== 'compact' && filled($entry->summary))
<p>{{ $entry->summary }}</p>
@endif
@unless ($entry->public)
<p class="preview-note">Nur in der Redaktionsvorschau sichtbar: Für diese Inhaltsart gibt es noch keine öffentliche Freigabe (öffentliches Profil, ADR-29).</p>
@endunless
</div>
</li>
@endforeach
</ul>
@endif
</div>
@endif
+6
View File
@@ -0,0 +1,6 @@
<dl class="faq">
@foreach ($data['items'] ?? [] as $item)
<dt>{{ $item['question'] ?? '' }}</dt>
<dd>{{ $item['answer'] ?? '' }}</dd>
@endforeach
</dl>
@@ -0,0 +1,8 @@
@if (! empty($first))
<h1>{{ $data['heading'] ?? '' }}</h1>
@else
<h2>{{ $data['heading'] ?? '' }}</h2>
@endif
@if (filled($data['intro'] ?? null))
<p class="lede">{{ $data['intro'] }}</p>
@endif
+18
View File
@@ -0,0 +1,18 @@
<div class="hero hero-{{ $variant === 'highlight' ? 'highlight' : 'standard' }} @if ($imageUrl) hero-with-image @endif">
<div class="hero-copy">
@if (! empty($first))
<h1>{{ $data['heading'] ?? '' }}</h1>
@else
<h2>{{ $data['heading'] ?? '' }}</h2>
@endif
@if (filled($data['text'] ?? null))
<p class="lede">{{ $data['text'] }}</p>
@endif
@if ($action)
<a class="button" href="{{ $action['url'] }}">{{ $action['label'] }}</a>
@endif
</div>
@if ($imageUrl)
<img class="hero-image" src="{{ $imageUrl }}" alt="{{ $data['alt'] ?? '' }}">
@endif
</div>
@@ -0,0 +1,15 @@
<div class="image-text image-text-{{ $variant === 'image_right' ? 'right' : 'left' }} @unless ($imageUrl) image-text-no-image @endunless">
@if ($imageUrl)
<img src="{{ $imageUrl }}" alt="{{ $data['alt'] ?? '' }}" loading="lazy">
@endif
<div class="image-text-copy">
@if (filled($data['title'] ?? null))
@if (! empty($first))
<h1>{{ $data['title'] }}</h1>
@else
<h2>{{ $data['title'] }}</h2>
@endif
@endif
<div class="prose">{!! $body !!}</div>
</div>
</div>
+7
View File
@@ -0,0 +1,7 @@
@if (filled($data['body'] ?? null))
<div class="prose">
@foreach (preg_split("/\n\s*\n/", trim($data['body'])) as $paragraph)
<p>{{ $paragraph }}</p>
@endforeach
</div>
@endif