Files
laraundfelix/resources/views/filament/verwaltung/texte-artikel.blade.php
T
Lars b9fe0e3791
Deploy Test / test (push) Successful in 55s
Deploy Test / deploy (push) Successful in 24s
Richte die Redaktionsformulare an den Mockups aus.
Abschnitte, Medienkarten, Einordnung und Auswahl folgen der vorgegebenen Form. Datenmodell und Fassungen bleiben unverändert.
2026-11-19 15:28:22 +01:00

37 lines
2.2 KiB
PHP

@php
$profile = $this->editorialProfile('artikel');
$editable = $this->canEditEditorial();
$felder = [
['id' => 'artikel-arbeit', 'label' => 'Interner Arbeitstitel', 'model' => 'workingTitle', 'kind' => 'text', 'value' => $this->workingTitle, 'origin' => null],
['id' => 'artikel-anzeige', 'label' => 'Anzeigename', 'model' => 'displayTitle', 'kind' => 'text', 'value' => $this->displayTitle, 'field' => 'display_title'],
['id' => 'artikel-teaser', 'label' => 'Teaser', 'model' => 'teaser', 'kind' => 'textarea', 'rows' => 2, 'value' => $this->teaser, 'field' => 'teaser'],
['id' => 'artikel-kurz', 'label' => 'Kurzbeschreibung', 'model' => 'summary', 'kind' => 'textarea', 'rows' => 4, 'value' => $this->summary, 'field' => 'summary'],
['id' => 'artikel-beschreibung', 'label' => 'Ausführliche Beschreibung', 'model' => 'descriptionText', 'kind' => 'textarea', 'rows' => 6, 'value' => $this->descriptionText, 'field' => 'description'],
['id' => 'artikel-suche', 'label' => 'Suchbegriffe', 'model' => 'searchTerms', 'kind' => 'text', 'value' => $this->searchTerms, 'origin' => 'Freie Suche, keine Klassifikation'],
];
@endphp
<div class="vw-formular">
<h3>Texte</h3>
@foreach ($felder as $feld)
@php
$field = $feld['field'] ?? null;
$fromSource = $field && $profile->origin($field) === 'quelle';
@endphp
@include('filament.verwaltung.abschnitt', [
'id' => $feld['id'],
'label' => $feld['label'],
'model' => $feld['model'],
'kind' => $feld['kind'],
'rows' => $feld['rows'] ?? 3,
'value' => $feld['value'] !== '' ? $feld['value'] : ($fromSource ? $profile->value($field) : ''),
'origin' => $feld['origin'] ?? ($field ? $profile->originLabel($field) : null),
'placeholder' => $fromSource ? (string) $profile->value($field) : '',
'disabled' => ! $editable,
])
@if ($fromSource)
<p class="vw-quellenblick">Übernommenen Text ansehen: {{ $profile->value($field) }}</p>
@endif
@endforeach
@include('filament.editorial.variants')
</div>