diff --git a/app/Filament/Resources/Compositions/Pages/EditComposition.php b/app/Filament/Resources/Compositions/Pages/EditComposition.php index 971501f..d5113cc 100644 --- a/app/Filament/Resources/Compositions/Pages/EditComposition.php +++ b/app/Filament/Resources/Compositions/Pages/EditComposition.php @@ -121,28 +121,21 @@ abstract class EditComposition extends EditRecord public ?string $thumbnailError = null; - public string $imageQuery = ''; + /** Bereich des Aufbauarbeitsplatzes: aufbau, angaben oder verlauf. */ + public string $aufbauTab = 'aufbau'; - public bool $moduleOpen = false; + /** Ansicht der ausgewählten Verwendung: stelle, quelle oder vorschau. */ + public string $detailTab = 'stelle'; - public string $moduleTab = 'didaktik'; - - public bool $partOpen = false; + /** @var list aufgeklappte Bestandteile mit Quelleninhalt */ + public array $expanded = []; public string $imageMode = 'film'; - public string $imagePick = ''; - public ?int $frameVersionId = null; public string $frameSecond = ''; - /** @var array */ - public array $moduleSnapshot = []; - - /** @var list> */ - public array $partSnapshot = []; - /** @var list> */ public array $members = []; @@ -154,11 +147,14 @@ public function mount(int|string $record): void parent::mount($record); $this->loadEditor(); + $this->selectFirstPart(); $this->returnUrl = $this->safeReturn(request()->query('zurueck')); $adopt = request()->query('uebernehmen'); - if (is_string($adopt)) { - $this->addPart($adopt); + // Ausdrücklich gewählte Rückkehr „Zurück und einbinden“: frisch geladen, daher keine anderen offenen Eingaben. + if (is_string($adopt) && $this->includePart($adopt, true) && $this->persistDraft()) { + $title = (string) ($this->members[array_key_last($this->members)]['title'] ?? 'Der Bestandteil'); + $this->feedback = $title.' ist in den Aufbau übernommen. Der Entwurf ist gespeichert; es entsteht keine neue Fassung.'; } $flashed = session('redaktion'); @@ -307,14 +303,7 @@ public function hits(): array public function openPicker(): void { - if ($this->moduleOpen) { - $this->closeModule(); - } - - if ($this->partOpen) { - $this->closePart(); - } - + $this->commitRoleDraft(); $this->textOpen = false; $this->resetPicker('aufbau'); $this->pickerKind = 'alle'; @@ -325,8 +314,7 @@ public function openPicker(): void */ protected function redaktionWillOpen(): void { - $this->moduleOpen = false; - $this->partOpen = false; + $this->commitRoleDraft(); $this->textOpen = false; $this->releaseArmed = false; } @@ -485,8 +473,6 @@ public function openText(): void { $this->feedback = ''; $this->pickerOpen = false; - $this->moduleOpen = false; - $this->partOpen = false; $this->textOpen = true; } @@ -579,6 +565,14 @@ public function releaseFollowUp(): string return $library.$draft; } + protected function selectFirstPart(): void + { + if ($this->members !== [] && ($this->selected === null || ! isset($this->members[$this->selected]))) { + $this->selected = 0; + $this->syncRoleDraft(); + } + } + public function discardDraft(): void { /** @var Composition $record */ @@ -586,6 +580,8 @@ public function discardDraft(): void app(EditorialWorkingDraft::class)->clear($record); $this->releaseArmed = false; $this->loadAufbau(); + $this->selected = null; + $this->selectFirstPart(); $this->feedback = 'Der Entwurf ist verworfen. Eine freigegebene Fassung bleibt unverändert. Offene Eingaben der Redaktion bleiben erhalten.'; } @@ -811,9 +807,105 @@ public function selectPart(int $index): void $this->commitRoleDraft(); $this->selected = $index; $this->panel = 'bestandteil'; + $this->aufbauTab = 'aufbau'; $this->syncRoleDraft(); } + /** + * Früherer Einstieg „Bestandteil bearbeiten“: wählt die Verwendung im Detailbereich. + */ + public function openPart(int $index): void + { + $this->selectPart($index); + $this->detailTab = 'stelle'; + } + + public function toggleExpanded(int $index): void + { + $this->expanded = in_array($index, $this->expanded, true) + ? array_values(array_diff($this->expanded, [$index])) + : [...$this->expanded, $index]; + } + + public function showAufbauTab(string $tab): void + { + $this->commitRoleDraft(); + + if (in_array($tab, ['aufbau', 'angaben', 'verlauf'], true)) { + $this->aufbauTab = $tab; + } + } + + public function updatedNoteDraft(): void + { + $this->commitRoleDraft(); + } + + public function updatedMembers(): void + { + $this->syncRoleDraft(); + } + + /** + * Inhalt der referenzierten Komposition zur Ansicht (eine Ebene). + * + * @return list + */ + public function childrenRows(string $target): array + { + $catalog = app(EditorialCatalog::class); + $exceptId = (int) $this->getRecord()->getKey(); + $rows = []; + + if (preg_match('/^composition-draft:(\d+)$/', $target, $match) === 1) { + $composition = Composition::query()->find($match[1]); + $draft = $composition instanceof Composition && is_array($composition->working_draft) ? $composition->working_draft : []; + + foreach ($draft['members'] ?? [] as $member) { + if (! is_array($member)) { + continue; + } + + $row = $catalog->rowForTarget((string) ($member['target'] ?? ''), $exceptId, allowSelf: true, allowDraft: true, allowBlocked: true); + $rows[] = [ + 'title' => (string) ($row['title'] ?? 'Bestandteil'), + 'kind' => (string) ($row['kind'] ?? ''), + 'image' => $row['image'] ?? null, + 'tone' => (string) ($row['tone'] ?? 'text'), + 'role' => trim((string) ($member['role'] ?? '')), + ]; + } + + return $rows; + } + + if (preg_match('/^composition:(\d+)$/', $target, $match) !== 1) { + return []; + } + + $version = CompositionVersion::query()->find($match[1]); + + if (! $version instanceof CompositionVersion) { + return []; + } + + foreach (app(CompositionStructureReader::class)->tree($version) as $node) { + $childTarget = $node->contentElementVersionId !== null + ? 'element:'.$node->contentElementVersionId + : ($node->compositionVersionId !== null ? 'composition:'.$node->compositionVersionId : ''); + $row = $childTarget !== '' ? $catalog->rowForTarget($childTarget, $exceptId, allowSelf: true, allowDraft: true, allowBlocked: true) : null; + $rows[] = [ + 'title' => $node->title, + 'kind' => (string) ($row['kind'] ?? $node->editorialKindLabel ?? $node->technicalKindLabel ?? ''), + 'image' => $row['image'] ?? null, + 'tone' => (string) ($row['tone'] ?? 'text'), + 'role' => $node->role, + ]; + } + + return $rows; + } + public function addPart(string $target): void { $this->includePart($target, true); @@ -855,12 +947,8 @@ private function includePart(string $target, bool $allowDraft): bool $this->search = ''; $this->pickerOpen = false; $this->pickerSelected = ''; - - if (! $this->persistDraft()) { - return false; - } - - $this->feedback = $row['title'].' ist in den Aufbau übernommen. Die Datei wird nicht kopiert. Der Entwurf ist gespeichert. Es entsteht keine neue Fassung.'; + $this->detailTab = 'stelle'; + $this->feedback = $row['title'].' steht jetzt an Stelle '.count($this->members).' im Aufbau. Es wird nur verwiesen, nichts kopiert. Gespeichert wird mit „Entwurf speichern“.'; return true; } @@ -871,15 +959,41 @@ public function removePart(int $index): void return; } + $title = (string) ($this->members[$index]['title'] ?? 'Der Bestandteil'); unset($this->members[$index]); $this->members = array_values($this->members); - $this->selected = null; - $this->roleDraft = ''; - $this->noteDraft = ''; - $this->panel = 'angaben'; - $this->partOpen = false; - $this->partSnapshot = []; - $this->feedback = 'Der Bestandteil ist aus dem Arbeitsstand genommen. Entwurf speichern hält das fest. Eine freigegebene Fassung bleibt unverändert.'; + $this->expanded = []; + $this->selected = $this->members === [] ? null : min($index, count($this->members) - 1); + $this->syncRoleDraft(); + $this->feedback = '„'.$title.'“ ist aus diesem Aufbau genommen. Das Quellobjekt bleibt im Bestand. Gespeichert ist das erst mit „Entwurf speichern“; eine freigegebene Fassung bleibt unverändert.'; + } + + /** + * @return array{aktion: string, argument: int|string|null, titel: string, text: string, label: string, gefahr: bool}|null + */ + protected function extraConfirmation(string $aktion, int|string|null $argument): ?array + { + if ($aktion !== 'removePart' || ! isset($this->members[(int) $argument])) { + return null; + } + + $title = (string) ($this->members[(int) $argument]['title'] ?? 'Bestandteil'); + + return [ + 'aktion' => $aktion, + 'argument' => (int) $argument, + 'titel' => '„'.$title.'“ aus diesem Aufbau entfernen?', + 'text' => 'Nur diese Verwendung wird entfernt. Das Medium oder Modul bleibt im Bestand und in anderen Aufbauten. Gespeichert wird das mit „Entwurf speichern“.', + 'label' => 'Aus dem Aufbau entfernen', + 'gefahr' => true, + ]; + } + + protected function runExtraConfirmation(string $aktion, int|string|null $argument): void + { + if ($aktion === 'removePart') { + $this->removePart((int) $argument); + } } public function movePart(int $index, int $direction): void @@ -980,7 +1094,6 @@ public function startCreateMedium(): void private function revealMediumForm(): void { $this->pickerOpen = false; - $this->partOpen = false; $this->textOpen = false; } @@ -1013,46 +1126,6 @@ public function createMediumAction(): Action }); } - public function editMediumAction(): Action - { - return Action::make('editMedium') - ->modalHeading('Medium bearbeiten') - ->modalDescription('Titel, Beschreibung, Hinweise und Vorschaubild gelten für das Medium. Eine neue Fassung entsteht nur, wenn der Text bereits freigegeben und verwendet wird.') - ->modalSubmitActionLabel('Speichern') - ->modalWidth(Width::Large) - ->beforeFormFilled(fn () => $this->revealMediumForm()) - ->fillForm(function (array $arguments): array { - $element = ContentElement::query()->find($arguments['element'] ?? 0); - - return $element instanceof ContentElement ? MediumForm::fill($element) : []; - }) - ->schema(function (array $arguments): array { - $element = ContentElement::query()->find($arguments['element'] ?? 0); - - return MediumForm::fields(creating: false, element: $element instanceof ContentElement ? $element : null); - }) - ->action(function (array $data, array $arguments): void { - $element = ContentElement::query()->find($arguments['element'] ?? 0); - - if (! $element instanceof ContentElement) { - Notification::make()->title('Dieses Medium ist nicht mehr vorhanden.')->danger()->send(); - - throw new Halt; - } - - try { - $revised = MediumForm::update($element, $data); - } catch (DomainRuleException $exception) { - Notification::make()->title($exception->getMessage())->danger()->send(); - - throw new Halt; - } - - $this->retargetContainedElement($element, $revised); - $this->feedback = 'Die Angaben des Mediums sind gespeichert.'; - }); - } - public function startModule(): void { $name = trim($this->newModuleName); @@ -1078,57 +1151,46 @@ public function saveDisplay(): void $this->feedback = 'Die Anzeige ist gespeichert. Die Fassung bleibt unverändert.'; } + /** + * Früherer Dialog „Didaktik und Katalogbild“: öffnet den Bereich „Angaben“. + */ public function openModule(): void { - $this->moduleSnapshot = [ - 'learningGoal' => $this->learningGoal, - 'durationMinutes' => $this->durationMinutes, - 'materialNote' => $this->materialNote, - 'revisionNote' => $this->revisionNote, - 'thumbnailAlt' => $this->thumbnailAlt, - 'imageMode' => $this->imageMode, - 'imagePick' => $this->imagePick, - 'frameVersionId' => $this->frameVersionId, - 'frameSecond' => $this->frameSecond, - ]; - $this->pickerOpen = false; - $this->partOpen = false; - $this->textOpen = false; - $this->feedback = ''; - $this->moduleTab = in_array($this->moduleTab, ['didaktik', 'titelbild'], true) ? $this->moduleTab : 'didaktik'; + $this->commitRoleDraft(); + $this->aufbauTab = 'angaben'; $this->frameFilmChoices = $this->frameFilms(); - $films = $this->frameFilmChoices; - $this->imageMode = $films === [] ? 'bestand' : 'film'; - if ($films !== [] && $this->frameVersionId === null) { - $this->frameVersionId = $films[0]['version_id']; + if ($this->frameFilmChoices !== [] && $this->frameVersionId === null) { + $this->frameVersionId = $this->frameFilmChoices[0]['version_id']; } - $this->moduleOpen = true; + if ($this->frameFilmChoices === [] && $this->imageMode === 'film') { + $this->imageMode = 'upload'; + } } - public function closeModule(): void + public function openCatalogImagePicker(): void { - foreach ($this->moduleSnapshot as $key => $value) { - $this->{$key} = $value; - } + $this->guardEditorial(); + $this->resetPicker('vorschaubild'); + $this->pickerKind = 'bild'; + } - $this->moduleOpen = false; - $this->moduleSnapshot = []; - $this->previewUpload = null; + protected function adoptThumbnailFromPicker(string $target): void + { + $elementId = $this->elementIdOf($target); + + if ($elementId !== null) { + $this->adoptPicture($elementId); + } } /** - * Übernimmt Didaktik und Katalogbild. Texte, Name und Einordnung gehören zur Redaktion und werden hier nicht gespeichert. + * Übernimmt Alternativtext und gewähltes Katalogbild (Filmstelle oder Upload) sofort. + * Didaktik und Aufbau speichert „Entwurf speichern“; Texte und Einordnung die Redaktion. */ - public function saveModule(): void + public function saveCatalogImage(): void { - if ($this->minutes($this->durationMinutes) === false) { - $this->feedback = 'Der Zeitbedarf ist eine Zahl von Minuten oder bleibt leer.'; - - return; - } - /** @var Composition $record */ $record = $this->getRecord(); app(IdentityProfile::class)->fill($record, ['thumbnail_alt' => trim($this->thumbnailAlt)], $this->actor()); @@ -1139,66 +1201,29 @@ public function saveModule(): void return; } - if ($this->needsRevision() || app(EditorialWorkingDraft::class)->read($record) !== null) { - $this->persistDraft(); - } - - $this->moduleOpen = false; - $this->moduleSnapshot = []; $this->previewUpload = null; - $this->imagePick = ''; - $this->feedback = trim('Didaktik und Katalogbild sind übernommen. Es entsteht keine neue Fassung.'.($image === '' ? '' : ' '.$image)); + $this->feedback = trim('Das Katalogbild ist übernommen. Es entsteht keine neue Fassung.'.($image === '' ? '' : ' '.$image)); } - public function openPart(int $index): void + /** + * Speichert den Wortlaut eines Textbausteins an seiner Quelle. Wird die Fassung schon verwendet, entsteht eine neue + * Fassung; der Aufbau verweist dann im Arbeitsstand darauf und speichert das mit „Entwurf speichern“. + */ + public function saveSourceText(): void { - $this->selectPart($index); - $member = $this->selectedMember(); - $this->partTitle = (string) ($member['title'] ?? ''); - $this->partBody = (string) ($member['body'] ?? ''); - $this->partSnapshot = $this->members; - $this->feedback = ''; - $this->moduleOpen = false; - $this->pickerOpen = false; - $this->textOpen = false; - $this->partOpen = true; - } - - public function closePart(): void - { - if ($this->partSnapshot !== []) { - $this->members = $this->partSnapshot; - } - - $this->partOpen = false; - $this->partSnapshot = []; - $this->syncRoleDraft(); - } - - public function savePart(): void - { - if (trim($this->roleDraft) === '') { - $this->feedback = 'Die Rolle fehlt.'; - - return; - } - $this->commitRoleDraft(); - $textNote = $this->writePartText(); + $note = $this->writePartText(); + + if ($note === false || $note === '') { + if ($note === '') { + $this->feedback = 'Der Text ist unverändert.'; + } - if ($textNote === false) { return; } - if (! $this->persistDraft()) { - return; - } - - $this->partOpen = false; - $this->partSnapshot = []; - $this->feedback = $textNote !== '' - ? $textNote - : 'Die Angaben zum Bestandteil sind im Entwurf. Es entsteht keine neue Fassung.'; + $this->syncRoleDraft(); + $this->feedback = $note.' Die Zuordnung im Aufbau speichert „Entwurf speichern“.'; } /** @@ -1348,37 +1373,6 @@ public function adoptPicture(int $elementId): void $this->feedback = $this->previewFeedback($record, $before); } - private function retargetContainedElement(ContentElement $element, ?ContentElementVersion $revised): void - { - $element->refresh(); - - foreach ($this->members as $index => $member) { - if ((int) ($member['element_id'] ?? 0) !== $element->id) { - continue; - } - - $target = $revised instanceof ContentElementVersion - ? 'element:'.$revised->id - : (string) ($member['target'] ?? ''); - $row = app(EditorialCatalog::class)->rowForTarget( - $target, - (int) $this->getRecord()->getKey(), - allowSelf: true, - allowDraft: true, - ); - - if ($row === null) { - continue; - } - - $row['role'] = (string) ($member['role'] ?? $row['kind']); - $row['note'] = (string) ($member['note'] ?? ''); - $this->members[$index] = $row; - } - - $this->persistDraft(); - } - private function writePartText(): string|false { $index = $this->selected; @@ -1509,14 +1503,6 @@ public function suggestedFilm(): ?array return count($films) === 1 ? $films[0] : null; } - /** - * @return list - */ - public function mediaChoices(): array - { - return app(EditorialCatalog::class)->mediaPictures($this->imageQuery); - } - /** * @return list */ @@ -1785,6 +1771,8 @@ protected function syncRoleDraft(): void $member = $this->selected !== null ? ($this->members[$this->selected] ?? null) : null; $this->roleDraft = is_array($member) ? (string) ($member['role'] ?? '') : ''; $this->noteDraft = is_array($member) ? (string) ($member['note'] ?? '') : ''; + $this->partTitle = is_array($member) ? (string) ($member['title'] ?? '') : ''; + $this->partBody = is_array($member) ? (string) ($member['body'] ?? '') : ''; } public function releaseDisplay(): void @@ -1977,12 +1965,6 @@ protected function applyChosenImage(): string|false return str_contains($this->feedback, 'unverändert') ? $this->feedback : false; } - if ($this->imageMode === 'bestand' && ctype_digit($this->imagePick)) { - $this->adoptPicture((int) $this->imagePick); - - return str_contains($this->feedback, 'unverändert') ? $this->feedback : false; - } - if ($this->imageMode === 'film' && $this->frameVersionId !== null && trim($this->frameSecond) !== '') { if (! is_numeric($this->frameSecond) || (float) $this->frameSecond < 0 || (float) $this->frameSecond > 7200) { $this->feedback = 'Die Zeitposition muss eine Zahl in Sekunden sein.'; @@ -2068,12 +2050,9 @@ protected function statusSentence(): string */ protected function payload(): array { + // Rolle und Hinweis stehen bereits in $members (commitRoleDraft bei jeder Änderung und vor jedem Speichern). $members = $this->members; - if ($this->selected !== null && isset($members[$this->selected]) && trim($this->roleDraft) !== '') { - $members[$this->selected]['role'] = trim($this->roleDraft); - } - $minutes = $this->minutes($this->durationMinutes); return [ diff --git a/app/Filament/Support/ManagesEditorialSurface.php b/app/Filament/Support/ManagesEditorialSurface.php index 049dab3..3e1bf87 100644 --- a/app/Filament/Support/ManagesEditorialSurface.php +++ b/app/Filament/Support/ManagesEditorialSurface.php @@ -1268,6 +1268,15 @@ public function editorialGaps(): array return $gaps; } + public function clearFeedback(): void + { + $this->deskFeedback = ''; + + if (property_exists($this, 'feedback')) { + $this->feedback = ''; + } + } + protected function feedback(string $message, bool $error = false): void { $this->deskFeedback = $message; diff --git a/resources/views/filament/editorial/editor.blade.php b/resources/views/filament/editorial/editor.blade.php index 41ab4cf..9fa8d99 100644 --- a/resources/views/filament/editorial/editor.blade.php +++ b/resources/views/filament/editorial/editor.blade.php @@ -1,42 +1,49 @@ @if ($this->redaktionOpen) @include('filament.verwaltung.redaktion') @else -
- @php - $titel = trim($this->displayTitle) !== '' ? trim($this->displayTitle) : trim($this->designation); - $statusSatz = $this->editorStatus(); - $aufbauOffen = str_starts_with($statusSatz, 'Es gibt ungespeicherte'); - $redaktionOffen = $this->redaktionOffen(); - $aktionen = []; - if ($url = $this->previewUrl()) { - $aktionen[] = ['label' => 'Vorschau für Trainer', 'href' => $url, 'neu' => true, 'icon' => 'auge']; - } - $aktionen[] = ['label' => 'Redaktion bearbeiten', 'wire' => "openRedaktion('texte')", 'art' => 'line', 'icon' => 'stift']; - $aktionen[] = ['label' => 'Fassung freigeben', 'wire' => 'armRelease']; - $aktionen[] = ['label' => 'Entwurf speichern', 'wire' => 'saveDraft', 'art' => 'primary']; - $mehr = []; - if ($this->currentReadyVersion() !== null) { - $mehr[] = $this->isInLibrary() - ? ['label' => 'Aus Mitgliederbibliothek ausblenden', 'wire' => "mountAction('displayRevoke')", 'hinweis' => 'Der Inhalt bleibt gespeichert.'] - : ['label' => 'In Mitgliederbibliothek anzeigen', 'wire' => "mountAction('displayRelease')", 'hinweis' => 'Zeigt die letzte freigegebene Fassung.']; - } - $mehr[] = ['label' => 'Entwurf verwerfen', 'wire' => 'discardDraft', 'hinweis' => 'Zurück zum letzten freigegebenen Aufbau.']; - @endphp -
- @include('filament.verwaltung.kopf', [ - 'zurueck' => ['label' => 'Zum Arbeitsplatz', 'href' => \App\Filament\Pages\EditorialDesk::getUrl()], - 'brot' => [['label' => $this->isProgram() ? 'Programme' : 'Module', 'href' => $this::getResource()::getUrl('index')], $titel], - 'titel' => $titel, - 'typ' => $this->hostLabel(), - 'status' => [ - ['text' => $statusSatz, 'ton' => $aufbauOffen ? 'offen' : ($this->currentReadyVersion() !== null ? 'gut' : 'neutral')], - $redaktionOffen ? ['text' => 'Die Redaktion hat ungespeicherte Änderungen.', 'ton' => 'offen', 'aktion' => ['label' => 'Zur Redaktion', 'wire' => "openRedaktion('".$this->redaktionTab."')"]] : null, - ], - 'aktionen' => $aktionen, - 'mehr' => $mehr, - ]) +@php + $titel = trim($this->displayTitle) !== '' ? trim($this->displayTitle) : trim($this->designation); + $statusSatz = $this->editorStatus(); + $aufbauOffen = str_starts_with($statusSatz, 'Es gibt ungespeicherte'); + $redaktionOffen = $this->redaktionOffen(); + $bereit = $this->currentReadyVersion(); + $aktionen = []; + if ($url = $this->previewUrl()) { + $aktionen[] = ['label' => 'Vorschau für Trainer', 'href' => $url, 'neu' => true, 'icon' => 'auge']; + } + $aktionen[] = ['label' => 'Redaktion bearbeiten', 'wire' => "openRedaktion('texte')", 'art' => 'line', 'icon' => 'stift']; + $aktionen[] = ['label' => 'Entwurf speichern', 'wire' => 'saveDraft', 'art' => 'primary']; + $mehr = [['label' => 'Fassung freigeben', 'wire' => 'armRelease', 'hinweis' => 'Neue unveränderliche Fassung aus dem Aufbau.']]; + if ($bereit !== null) { + $mehr[] = $this->isInLibrary() + ? ['label' => 'Aus Mitgliederbibliothek ausblenden', 'wire' => "mountAction('displayRevoke')", 'hinweis' => 'Der Inhalt bleibt gespeichert.'] + : ['label' => 'In Mitgliederbibliothek anzeigen', 'wire' => "mountAction('displayRelease')", 'hinweis' => 'Zeigt die letzte freigegebene Fassung.']; + } + $mehr[] = ['label' => 'Entwurf verwerfen', 'wire' => 'discardDraft', 'hinweis' => 'Zurück zum letzten gespeicherten Aufbau.', 'gefahr' => true]; + $anzahl = count($this->members); + $typ = implode(' · ', array_filter([ + 'Aufbau', + $bereit !== null ? 'Fassung '.$bereit->number.' freigegeben' : 'Noch keine Fassung', + is_array($this->getRecord()->working_draft) && $this->getRecord()->working_draft !== [] ? 'Entwurf gespeichert' : null, + ])); +@endphp +
+ @include('filament.verwaltung.kopf', [ + 'zurueck' => ['label' => 'Zum Arbeitsplatz', 'href' => \App\Filament\Pages\EditorialDesk::getUrl()], + 'brot' => [['label' => $this->isProgram() ? 'Programme' : 'Module', 'href' => $this::getResource()::getUrl('index')], $titel], + 'titel' => $titel, + 'typ' => $this->hostLabel().' · '.$typ, + 'status' => [ + ['text' => $aufbauOffen ? 'Änderungen am Aufbau nicht gespeichert' : $statusSatz, 'ton' => $aufbauOffen ? 'offen' : ($bereit !== null ? 'gut' : 'neutral')], + $redaktionOffen ? ['text' => 'Die Redaktion hat ungespeicherte Änderungen.', 'ton' => 'offen', 'aktion' => ['label' => 'Zur Redaktion', 'wire' => "openRedaktion('".$this->redaktionTab."')"]] : null, + ], + 'aktionen' => $aktionen, + 'mehr' => $mehr, + ]) + +
@if ($this->returnUrl !== '') -

+

@include('filament.verwaltung.icon', ['name' => 'info']) Dieser Eintrag wurde aus einem anderen Aufbau geöffnet.

@endif - @foreach (array_unique(array_filter([$this->feedback !== '' && ! $this->moduleOpen && ! $this->partOpen ? $this->feedback : '', $this->deskFeedback])) as $meldung) -

{{ $meldung }}

+

@include('filament.verwaltung.icon', ['name' => 'info'])„Entwurf speichern“ sichert Aufbau, Rollen, Hinweise und Didaktik. Freigegebene Fassungen bleiben unverändert, bis du eine neue Fassung freigibst. Texte und Präsentation bearbeitest du in der Redaktion.

+ @foreach (array_unique(array_filter([$this->feedback, $this->deskFeedback])) as $meldung) +

{{ $meldung }} +

@endforeach
- @if ($this->releaseArmed) - @php($review = $this->releaseReview()) - - @endif -
-
-
-

Aufbau

-
- - - -
-
-

Der Aufbau ist die Arbeitsfläche. Das Stiftsymbol bearbeitet den Bestandteil, das Auge öffnet eine Vorschau. Ziehen ändert die Reihenfolge, Nach oben und Nach unten tun dasselbe ohne Ziehen.

- @if ($this->members === []) -

- @if ($this->isProgram()) - Dieses Programm hat noch keinen Bestandteil. Füge ein Modul oder ein Medium hinzu. Die Datei wird nicht kopiert. - @else - Dieses Modul hat noch keinen Bestandteil. Füge ein vorhandenes Medium hinzu, erstelle einen Text oder lege eine Datei an. Ein Film ist nicht nötig. - @endif -

- @else -
    - @foreach ($this->members as $index => $member) -
  1. - -
    - @if (! empty($member['open_url'])) - - - - @endif - - - -
    -
  2. - @endforeach -
- @endif -
- -
- @if ($this->selected !== null && ($usage = $this->selectedMember())) -
-

{{ $usage['title'] }}

-

Verwendung in diesem Aufbau

-
- - @if (! empty($usage['edit_url'])) - Quelle - @endif - @if (! empty($usage['open_url'])) - Vorschau - @endif -
-

Gilt nur hier. Die Quelle bleibt unverändert.

-

{{ $usage['kind'] }} · {{ $usage['version_label'] }}

- @if (filled($usage['role'] ?? null)) -

Rolle im {{ $this->hostLabel() }}
{{ $usage['role'] }}

- @endif - @if (filled($usage['note'] ?? null)) -

Hinweis an dieser Stelle
{{ $usage['note'] }}

- @endif -
- @endif -

Überblick

-
- @foreach ($this->presentationChips() as $chip) - {{ $chip['label'] }} - @endforeach -
- @php($cover = $this->coverPicture()) -

Katalogbild

-
- @if ($cover['url']) - {{ $this->thumbnailAlt !== '' ? $this->thumbnailAlt : '' }} - @else - - @endif - @if ($cover['note']) - {{ $cover['note'] }} - @endif -
- @if ($caption = $this->imageCaption()) -

{{ $caption }}

- @endif -

{{ trim($this->summary) !== '' ? \Illuminate\Support\Str::limit(trim($this->summary), 180) : 'Noch keine Kurzbeschreibung' }}

-
-
Lernziel
{{ trim($this->learningGoal) !== '' ? \Illuminate\Support\Str::limit(trim($this->learningGoal), 140) : 'Keine Angabe' }}
-
Zeit
{{ trim($this->durationMinutes) !== '' ? $this->durationMinutes.' Minuten' : 'Keine Angabe' }}
-
Material
{{ trim($this->materialNote) !== '' ? \Illuminate\Support\Str::limit(trim($this->materialNote), 80) : 'Keine Angabe' }}
-
-
- -
- -

Freigegebene Fassungen

- @if ($this->versionChoices() === []) -

Noch keine freigegebene Fassung. Sie entsteht mit „Fassung freigeben“, nicht beim Speichern des Entwurfs.

- @else -
    - @foreach ($this->versionChoices() as $version) -
  • -
    - {{ $version['text'] }} - @if ($version['current']) - Letzter freigegebener Stand - @endif -
    -
    - - @if ($url = $this->previewUrlFor($version['id'])) - Vorschau - @endif -
    -
  • - @endforeach -
- @endif - - @if ($follow = $this->releaseFollowUp()) -

{{ $follow }}

- @endif - - @if ($this->usageLines() !== []) -

Verwendung der letzten freigegebenen Fassung

-
    - @foreach ($this->usageLines() as $line) -
  • {{ $line }}
  • - @endforeach -
- @endif - -
- Was Speichern und Freigeben bedeuten -

Titel, Kurzbeschreibung, fachliche Beschreibung, Einordnung und Titelbild ändern die sichtbare Karte. Sie erzeugen keine Inhaltsfassung.

-

Entwurf speichern hält Aufbau, Rollen, Lernziel, Zeit und Material fest. Das kann beliebig oft geschehen. Eine freigegebene Fassung bleibt dabei unverändert.

-

„Fassung freigeben“ erzeugt eine neue unveränderliche Fassung. Die bisherige bleibt für ältere Verweise erhalten.

-

In Mitgliederbibliothek anzeigen entscheidet, welche freigegebene Fassung Trainer sehen. Das veröffentlicht weder die Website noch ein Angebot.

-

Ein Medium oder Modul, das auch woanders steckt, bleibt dort bei seiner bisherigen Fassung. Hier wird nur darauf verwiesen.

-
-
+
+ @foreach (['aufbau' => 'Aufbau', 'angaben' => 'Didaktik und Katalogbild', 'verlauf' => 'Fassungen und Verwendung'] as $wert => $label) + + @endforeach
- @if ($this->moduleOpen) -