CI Feature / test (push) Successful in 56s
Medium, Modul, Programm und Lizenzartikel nutzen denselben Objektkopf, dieselben Register (Texte, Präsentationsmedien, Einordnung) und denselben visuellen Picker. Präsentationsmedien, Abweichungen und Texte bilden einen Arbeitsstand, den nur „Redaktion speichern“ schreibt; Austausch behält die Position, Sortierung bleibt in der Rolle. Der Wechsel zur Redaktion und zurück erhält offene Eingaben des Ausgangseditors. Entfernt versteckte Mitspeicherungen: Der Didaktikdialog schreibt keine Redaktionstexte mehr, die Website-Freigabe keine offenen Quellenzeilen, Entwurf verwerfen setzt keine offenen Redaktionseingaben zurück. Tests, die alte Orte oder CSS-Zeichenketten prüften, sind auf die neue Bedienung umgestellt; neue Tests decken Arbeitsstand, Austausch, Abbrechen und Rückweg ab. Datenmodell, Fassungen und Rechte bleiben unverändert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
91 lines
5.5 KiB
PHP
91 lines
5.5 KiB
PHP
{{--
|
|
Gemeinsamer Objektkopf. Parameter:
|
|
zurueck ['label' => …, 'wire' => … | 'href' => …] oder null
|
|
brot Liste von Bezeichnungen, die letzte ist das bearbeitete Objekt
|
|
titel, typ (Zeile unter dem Titel), status ['text' => …, 'ton' => offen|gut|neutral, 'aktion' => ['label', 'wire']]
|
|
aktionen Liste ['label', 'wire' | 'href', 'art' => primary|line|quiet, 'icon', 'neu' => bool, 'disabled' => bool]
|
|
mehr Liste ['label', 'wire' | 'href', 'hinweis', 'gefahr' => bool, 'neu' => bool] für „Weitere Aktionen“
|
|
--}}
|
|
@php
|
|
$zurueck = $zurueck ?? null;
|
|
$brot = $brot ?? [];
|
|
$status = $status ?? null;
|
|
$stati = $status === null ? [] : (isset($status['text']) ? [$status] : array_values(array_filter($status)));
|
|
$aktionen = $aktionen ?? [];
|
|
$mehr = $mehr ?? [];
|
|
@endphp
|
|
<header class="vw-kopf">
|
|
@if ($zurueck)
|
|
@if (! empty($zurueck['wire']))
|
|
<button type="button" class="vw-link vw-kopf-zurueck" wire:click="{{ $zurueck['wire'] }}">@include('filament.verwaltung.icon', ['name' => 'zurueck']){{ $zurueck['label'] }}</button>
|
|
@else
|
|
<a class="vw-link vw-kopf-zurueck" href="{{ $zurueck['href'] }}">@include('filament.verwaltung.icon', ['name' => 'zurueck']){{ $zurueck['label'] }}</a>
|
|
@endif
|
|
@endif
|
|
@if ($brot !== [])
|
|
<nav class="vw-kopf-brot" aria-label="Pfad">
|
|
@foreach ($brot as $teil)
|
|
@if ($loop->last)
|
|
<strong>{{ $teil }}</strong>
|
|
@else
|
|
<span>{{ $teil }}</span><span aria-hidden="true">/</span>
|
|
@endif
|
|
@endforeach
|
|
</nav>
|
|
@endif
|
|
<div class="vw-kopf-zeile">
|
|
<div class="vw-kopf-titel">
|
|
<h1>{{ $titel }}</h1>
|
|
@if (filled($typ ?? null))
|
|
<p class="vw-kopf-typ">{{ $typ }}</p>
|
|
@endif
|
|
@foreach ($stati as $eintrag)
|
|
<p class="vw-status" role="status">
|
|
<span @class(['vw-punkt', 'is-offen' => ($eintrag['ton'] ?? '') === 'offen', 'is-gut' => ($eintrag['ton'] ?? '') === 'gut']) aria-hidden="true"></span>
|
|
<span>{{ $eintrag['text'] }}@if (! empty($eintrag['aktion']))
|
|
<button type="button" class="vw-link is-quiet vw-status-aktion" wire:click="{{ $eintrag['aktion']['wire'] }}" @if (! empty($eintrag['aktion']['confirm'])) wire:confirm="{{ $eintrag['aktion']['confirm'] }}" @endif>{{ $eintrag['aktion']['label'] }}</button>
|
|
@endif</span>
|
|
</p>
|
|
@endforeach
|
|
</div>
|
|
@if ($aktionen !== [] || $mehr !== [])
|
|
<div class="vw-kopf-aktionen">
|
|
@foreach ($aktionen as $aktion)
|
|
@php($klasse = 'vw-btn'.match ($aktion['art'] ?? 'quiet') { 'primary' => ' is-primary', 'line' => ' is-line', default => '' })
|
|
@if (! empty($aktion['href']))
|
|
<a class="{{ $klasse }}" href="{{ $aktion['href'] }}" @if (! empty($aktion['neu'])) target="_blank" rel="noopener" @endif>
|
|
@if (! empty($aktion['icon']))@include('filament.verwaltung.icon', ['name' => $aktion['icon']])@endif
|
|
{{ $aktion['label'] }}
|
|
</a>
|
|
@else
|
|
<button type="button" class="{{ $klasse }}" wire:click="{{ $aktion['wire'] }}" wire:loading.attr="disabled" wire:target="{{ \Illuminate\Support\Str::before($aktion['wire'], '(') }}" @disabled(! empty($aktion['disabled']))>
|
|
@if (! empty($aktion['icon']))@include('filament.verwaltung.icon', ['name' => $aktion['icon']])@endif
|
|
{{ $aktion['label'] }}
|
|
</button>
|
|
@endif
|
|
@endforeach
|
|
@if ($mehr !== [])
|
|
<div class="vw-mehr" x-data="{ offen: false }" x-on:keydown.escape.stop="offen = false; $refs.knopf.focus()" x-on:click.outside="offen = false">
|
|
<button type="button" class="vw-btn" x-ref="knopf" x-on:click="offen = ! offen" x-bind:aria-expanded="offen" aria-haspopup="true">
|
|
Weitere Aktionen @include('filament.verwaltung.icon', ['name' => 'runter'])
|
|
</button>
|
|
<div class="vw-mehr-menue" x-show="offen" x-cloak x-transition.opacity.duration.100ms>
|
|
@foreach ($mehr as $eintrag)
|
|
@if (! empty($eintrag['href']))
|
|
<a href="{{ $eintrag['href'] }}" @if (! empty($eintrag['neu'])) target="_blank" rel="noopener" @endif x-on:click="offen = false">
|
|
<span>{{ $eintrag['label'] }}@if (! empty($eintrag['hinweis']))<small>{{ $eintrag['hinweis'] }}</small>@endif</span>
|
|
</a>
|
|
@else
|
|
<button type="button" wire:click="{{ $eintrag['wire'] }}" x-on:click="offen = false" @if (! empty($eintrag['gefahr'])) style="color: var(--vw-error)" @endif>
|
|
<span>{{ $eintrag['label'] }}@if (! empty($eintrag['hinweis']))<small>{{ $eintrag['hinweis'] }}</small>@endif</span>
|
|
</button>
|
|
@endif
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</header>
|