Nimm die kleine Filmstufe für die Titelbildwahl und verankere Hinweise ohne neue Fassung.
Deploy Test / test (push) Successful in 24s
Deploy Test / deploy (push) Successful in 28s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-16 21:17:35 +01:00
1 parent c47c3b9b32
commit f86032cb5f
14 files changed
+283 -46

No files matched your search

@@ -70,6 +70,9 @@ public static function table(Table $table): Table
fn (ContentElement $record): string => static::getUrl('view', ['record' => $record])
)->columns([
TextColumn::make('working_title')->label('Arbeitstitel')->searchable(),
TextColumn::make('summary')->label('Kurzbeschreibung')->limit(80),
TextColumn::make('usage_note')->label('Einsatzhinweis')->limit(80),
TextColumn::make('license_note')->label('Lizenzvermerk')->limit(40),
TextColumn::make('kind')->label('Art'),
TextColumn::make('pillar_names')->label('Säulen')->state(
fn (ContentElement $record): string => $record->pillars->pluck('name')->join(', ') ?: '—'
@@ -58,7 +58,11 @@ public function form(Schema $schema): Schema
->helperText('Erscheint in der Bibliothek. Leer lässt den Arbeitstitel stehen. Speichern legt keine Fassung an.'),
Textarea::make('summary')->label('Kurzbeschreibung')->rows(3),
Textarea::make('description')->label('Beschreibung')->rows(4)
->helperText('Gilt für das Medium, nicht für eine einzelne Fassung.'),
->helperText('Allgemeine Beschreibung des Mediums. Gilt nicht für eine einzelne Fassung und nicht nur für ein Modul.'),
Textarea::make('usage_note')->label('Hinweise für den Einsatz')->rows(4)
->helperText('Gilt für das Medium in jeder Verwendung. Speichern legt keine Fassung an.'),
Textarea::make('license_note')->label('Interner Lizenzvermerk')->rows(3)
->helperText('Nur in der Verwaltung sichtbar. Erscheint nicht in der Bibliothek und nicht auf der Website.'),
Select::make('editorial_content_kind_id')
->label('Inhaltsart')
->options(fn (): array => EditorialContentKind::selectOptions())
@@ -170,6 +174,8 @@ protected function mutateFormDataBeforeFill(array $data): array
'working_title' => $this->getRecord()->working_title,
'display_title' => $this->getRecord()->display_title,
'description' => $this->getRecord()->description,
'usage_note' => $this->getRecord()->usage_note,
'license_note' => $this->getRecord()->license_note,
'summary' => $this->getRecord()->summary,
'editorial_content_kind_id' => $this->getRecord()->editorial_content_kind_id,
'dimension_ids' => IdentityDimensionValue::query()
@@ -193,6 +199,8 @@ protected function handleRecordUpdate(Model $record, array $data): Model
app(IdentityProfile::class)->fill($record, [
'display_title' => $data['display_title'] ?? null,
'summary' => $data['summary'] ?? null,
'usage_note' => $data['usage_note'] ?? null,
'license_note' => $data['license_note'] ?? null,
], auth()->user());
if (array_key_exists('editorial_content_kind_id', $data)) {
$record->editorial_content_kind_id = filled($data['editorial_content_kind_id'] ?? null)
@@ -6,6 +6,7 @@
use App\Domain\Catalog\ContentElementVersion;
use App\Domain\Catalog\ContentService;
use App\Domain\Catalog\ContentVersionStatus;
use App\Domain\Catalog\IdentityProfile;
use App\Domain\Catalog\Pillar;
use App\Domain\Catalog\PillarService;
use App\Filament\Resources\ContentElements\ContentElementResource;
@@ -91,12 +92,17 @@ protected function getHeaderActions(): array
->fillForm(fn (): array => [
'working_title' => $this->getRecord()->working_title,
'description' => $this->getRecord()->description,
'usage_note' => $this->getRecord()->usage_note,
'license_note' => $this->getRecord()->license_note,
'pillars' => $this->getRecord()->pillars()->pluck('pillars.id')->all(),
])
->schema([
TextInput::make('working_title')->label('Arbeitstitel')->required(),
Textarea::make('description')->label('Beschreibung')->rows(4)
->helperText('Gilt für das Medium. Speichern legt keine neue Fassung an.'),
Textarea::make('usage_note')->label('Hinweise für den Einsatz')->rows(4),
Textarea::make('license_note')->label('Interner Lizenzvermerk')->rows(3)
->helperText('Nur in der Verwaltung. Nicht in der Bibliothek und nicht auf der Website.'),
CheckboxList::make('pillars')
->label('Fachliche Säulen')
->options(fn (): array => Pillar::query()->orderBy('name')->pluck('name', 'id')->all()),
@@ -106,6 +112,10 @@ protected function getHeaderActions(): array
/** @var ContentElement $element */
$element = $this->getRecord();
app(ContentService::class)->describe($element, (string) $data['working_title'], $data['description'] ?? null);
app(IdentityProfile::class)->fill($element, [
'usage_note' => $data['usage_note'] ?? null,
'license_note' => $data['license_note'] ?? null,
], auth()->user());
app(PillarService::class)->assign($element, array_map(intval(...), $data['pillars'] ?? []));
}, 'Die Beschreibung ist gespeichert.');
$this->getRecord()->refresh();