Führe den gemeinsamen Redaktionsarbeitsplatz ein.
Deploy Test / test (push) Successful in 55s
Deploy Test / deploy (push) Successful in 24s

Texte, Medienzuordnung und Einordnung teilen sich einen Arbeitsplatz. Fassungen, Rechte und das Datenmodell bleiben unverändert.
This commit is contained in:
Lars committed 2026-11-19 14:43:15 +01:00
1 parent a359a5fb69
commit 4c29ab2593
140 files changed
+6705 -201

No files matched your search

@@ -101,6 +101,8 @@ abstract class EditComposition extends EditRecord
public string $pickerSelected = '';
public string $pickerInspected = '';
public bool $textOpen = false;
public bool $releaseArmed = false;
@@ -326,6 +328,66 @@ public function openPicker(): void
$this->pickerOpen = true;
$this->textOpen = false;
$this->pickerSelected = '';
$this->pickerInspected = '';
}
public function openRedaktion(): void
{
$this->guardEditorial();
$this->moduleOpen = false;
$this->moduleSnapshot = [];
$this->partOpen = false;
$this->pickerOpen = false;
$this->textOpen = false;
$this->redaktionOpen = true;
$this->redaktionTab = 'texte';
}
public function closeRedaktion(): void
{
$this->redaktionOpen = false;
$this->pickerOpen = false;
$this->replacingAssignment = null;
$this->presentationInspect = '';
}
public function saveRedaktion(): void
{
if (! $this->persistPresentation()) {
return;
}
$this->feedback = 'Die Redaktion ist gespeichert. Aufbau, Lernziel, Zeit und Fassungen bleiben unverändert.';
}
public function redaktionUnsaved(): bool
{
/** @var Composition $record */
$record = $this->getRecord()->fresh() ?? $this->getRecord();
$text = trim($this->designation) !== trim((string) $record->designation)
|| trim($this->displayTitle) !== trim((string) ($record->display_title ?? ''))
|| trim($this->teaser) !== trim((string) ($record->teaser ?? ''))
|| trim($this->summary) !== trim((string) ($record->summary ?? ''))
|| trim($this->description) !== trim((string) ($record->description ?? ''))
|| trim($this->searchTerms) !== trim((string) ($record->search_terms ?? ''))
|| trim($this->thumbnailAlt) !== trim((string) ($record->thumbnail_alt ?? ''));
if ($text) {
return true;
}
$stored = IdentityDimensionValue::query()
->where('subject_type', $record->getMorphClass())
->where('subject_id', $record->getKey())
->where('origin', 'direkt')
->pluck('editorial_dimension_value_id')
->map(fn ($id): int => (int) $id)
->all();
$current = array_map(intval(...), $this->dimensionIds);
sort($stored);
sort($current);
return $stored !== $current;
}
public function openPresentationPicker(): void
@@ -341,6 +403,7 @@ public function openPresentationPicker(): void
$this->moduleOpen = false;
$this->textOpen = false;
$this->pickerSelected = '';
$this->pickerInspected = '';
}
public function assignFromPicker(string $target): void
@@ -389,6 +452,18 @@ public function assignFromPicker(string $target): void
public function closePicker(): void
{
$this->pickerOpen = false;
$this->pickerSelected = '';
$this->pickerInspected = '';
$this->replacingAssignment = null;
}
public function inspectPicker(string $target, bool $mark = false): void
{
$this->pickerInspected = $target;
if ($mark) {
$this->pickerSelected = $target;
}
}
/**
@@ -417,12 +492,14 @@ public function pickerResult(): array
*/
public function pickerDetail(): ?array
{
if ($this->pickerSelected === '') {
$target = $this->pickerInspected !== '' ? $this->pickerInspected : $this->pickerSelected;
if ($target === '') {
return null;
}
$row = app(EditorialCatalog::class)->rowForTarget(
$this->pickerSelected,
$target,
(int) $this->getRecord()->getKey(),
allowDraft: true,
);