Führe die zentrale Pflege redaktioneller Stammdaten ein
CI Feature / test (push) Successful in 1m12s
Deploy Test / test (push) Successful in 1m7s
Deploy Test / deploy (push) Successful in 23s

FACH-56 bis FACH-58: Arbeitsplatz „Redaktionelle Stammdaten“ für fachliche
Materialarten, Altersbereich und Zielgruppe, Einsatzbereiche und
Verwendungszwecke (bestehende Tabellen; Säulen bleiben in ihrer Verwaltung).

- Migration (nur Ergänzungen): aktiv/inaktiv für Materialarten und Werte,
  Reihenfolge der Werte, zulässige Objektkontexte der Materialarten, einmalig
  aus dem Bestand abgeleitet; jede vorhandene Zuordnung bleibt zulässig.
- EditorialVocabulary als eine Regelquelle für Redaktion (Medium, Modul,
  Programm, Lizenzartikel), Medien- und Kompositionsfilter, Picker und
  Mitgliederbibliothek: neu wählbar nur aktive, kontextgerechte Werte;
  vorhandene inaktive Zuordnungen sichtbar und beim Speichern erhalten;
  serverseitige Prüfung der Materialart.
- Kennung fest, Bezeichnung pflegbar; verwendete Werte nur deaktivierbar;
  Systemkennungen (programm, modul, traineranleitung) geschützt.
- „Inhaltsart“ heißt durchgängig „Fachliche Materialart“; der Picker trennt
  Medienart und fachliche Materialart und filtert danach.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-20 21:18:03 +01:00
1 parent c84ae10809
commit f774d43647
24 files changed
+1543 -91

No files matched your search

@@ -8,9 +8,8 @@
use App\Domain\Catalog\CompositionVersion;
use App\Domain\Catalog\ContentElement;
use App\Domain\Catalog\ContentElementVersion;
use App\Domain\Catalog\EditorialContentKind;
use App\Domain\Catalog\EditorialDimension;
use App\Domain\Catalog\EditorialProfileReader;
use App\Domain\Catalog\EditorialVocabulary;
use App\Domain\Catalog\IdentityDimension;
use App\Domain\Catalog\IdentityDimensionValue;
use App\Domain\Catalog\IdentityProfile;
@@ -92,6 +91,19 @@ protected function saveRedaktionTexte(): bool
$this->releaseBeforeSave = $article->current_release_id;
$this->releaseCountBeforeSave = $article->releases()->count();
$kindError = app(EditorialVocabulary::class)->kindError(
'lizenzartikel',
filled($this->kindId) ? (int) $this->kindId : null,
$article->editorial_content_kind_id !== null ? (int) $article->editorial_content_kind_id : null,
);
if ($kindError !== null) {
$this->deskFeedback = $kindError;
$this->redaktionFehlerFeld = 'kindId';
return false;
}
app(IdentityProfile::class)->fill($article, [
'working_title' => $this->workingTitle,
'display_title' => $this->displayTitle,
@@ -248,7 +260,7 @@ public function einordnungArt(): array
{
return [
'model' => 'kindId',
'options' => EditorialContentKind::selectOptions(),
'options' => app(EditorialVocabulary::class)->kindOptions('lizenzartikel', $this->getRecord()->editorial_content_kind_id !== null ? (int) $this->getRecord()->editorial_content_kind_id : null),
'hilfe' => 'Die Einordnung des Artikels ändert weder die Quelle noch den Preis.',
];
}
@@ -277,21 +289,10 @@ private function sourceTitle(Model $source): string
*/
public function licenseDimensionGroups(): array
{
$groups = [];
foreach (EditorialDimension::forSubject($this->getRecord()) as $dimension) {
$values = [];
foreach ($dimension->values as $value) {
$values[] = ['id' => $value->id, 'label' => $value->label];
}
if ($values !== []) {
$groups[] = ['label' => $dimension->label, 'values' => $values];
}
}
return $groups;
return app(EditorialVocabulary::class)->dimensionGroups($this->getRecord(), IdentityDimensionValue::query()
->where('subject_type', $this->getRecord()->getMorphClass())
->where('subject_id', $this->getRecord()->getKey())
->pluck('editorial_dimension_value_id')->map(fn ($id): int => (int) $id)->all());
}
private function fillLicenseEditorial(): void