Führe den gemeinsamen Redaktionsarbeitsplatz ein.
Texte, Medienzuordnung und Einordnung teilen sich einen Arbeitsplatz. Fassungen, Rechte und das Datenmodell bleiben unverändert.
This commit is contained in:
1 parent
a359a5fb69
commit
4c29ab2593
140 files changed
+6705
-201
No files matched your search
@@ -482,6 +482,52 @@ public function saveEditorial(): void
|
||||
$this->editorialFeedback = $element->versions()->count() === $versions
|
||||
? 'Gespeichert. Es gibt keine neue Fassung.'
|
||||
: 'Gespeichert. Prüfe die Fassungen, ihre Zahl hat sich geändert.';
|
||||
$this->deskFeedback = $this->editorialFeedback;
|
||||
}
|
||||
|
||||
public function redaktionUnsaved(): bool
|
||||
{
|
||||
/** @var ContentElement $element */
|
||||
$element = $this->getRecord()->fresh() ?? $this->getRecord();
|
||||
$kind = filled($this->kindId) ? (int) $this->kindId : null;
|
||||
$storedKind = $element->editorial_content_kind_id !== null ? (int) $element->editorial_content_kind_id : null;
|
||||
$text = trim($this->workingTitle) !== trim((string) $element->working_title)
|
||||
|| trim($this->displayTitle) !== trim((string) ($element->display_title ?? ''))
|
||||
|| trim($this->teaser) !== trim((string) ($element->teaser ?? ''))
|
||||
|| trim($this->summary) !== trim((string) ($element->summary ?? ''))
|
||||
|| trim($this->searchTerms) !== trim((string) ($element->search_terms ?? ''))
|
||||
|| trim($this->descriptionText) !== trim((string) ($element->description ?? ''))
|
||||
|| trim($this->usageNote) !== trim((string) ($element->usage_note ?? ''))
|
||||
|| trim($this->licenseNote) !== trim((string) ($element->license_note ?? ''))
|
||||
|| trim($this->websiteCredit) !== trim((string) ($element->website_credit ?? ''))
|
||||
|| trim($this->websiteAlt) !== trim((string) ($element->website_alt ?? ''))
|
||||
|| $kind !== $storedKind;
|
||||
|
||||
if ($text) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$pillars = $element->pillars()->pluck('pillars.id')->map(fn ($id): int => (int) $id)->all();
|
||||
$currentPillars = array_map(intval(...), $this->pillarIds);
|
||||
sort($pillars);
|
||||
sort($currentPillars);
|
||||
|
||||
if ($pillars !== $currentPillars) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$stored = IdentityDimensionValue::query()
|
||||
->where('subject_type', $element->getMorphClass())
|
||||
->where('subject_id', $element->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 releaseForWebsite(): void
|
||||
|
||||
Reference in new issue
Block a user