Richte Redaktionskarten und Redaktionskopf am Zeilenlayout aus.
Deploy Test / test (push) Successful in 1m3s
Deploy Test / deploy (push) Successful in 23s

This commit is contained in:
Lars committed 2026-11-19 21:31:39 +01:00
1 parent b9fe0e3791
commit 41658d98dd
12 files changed
+248 -68

No files matched your search

@@ -184,6 +184,10 @@ public function mount(int|string $record): void
public function getHeading(): string|Htmlable|null
{
if ($this->redaktionOpen) {
return null;
}
$title = trim($this->displayTitle) !== '' ? trim($this->displayTitle) : trim($this->designation);
return $title !== '' ? $title : parent::getHeading();
@@ -191,6 +195,10 @@ public function getHeading(): string|Htmlable|null
public function getSubheading(): string|Htmlable|null
{
if ($this->redaktionOpen) {
return null;
}
return $this->hostKind()->deskExplanation().' '.$this->statusSentence();
}
@@ -206,6 +214,10 @@ protected function mutateFormDataBeforeFill(array $data): array
protected function getHeaderActions(): array
{
if ($this->redaktionOpen) {
return [];
}
return [
Action::make('preview')
->label('Vorschau für Trainer')
@@ -122,13 +122,21 @@ public function mount(int|string $record): void
$this->syncBodyDraft();
}
public function getHeading(): string|Htmlable
public function getHeading(): string|Htmlable|null
{
if ($this->redaktionOpen) {
return null;
}
return (string) $this->getRecord()->working_title;
}
public function getSubheading(): string|Htmlable|null
{
if ($this->redaktionOpen) {
return null;
}
return 'Texte und Vorschaubild ändern keine Fassung. Eine neue Datei oder ein geänderter Lehrtext braucht eine neue Fassung.';
}
@@ -312,6 +320,10 @@ public function deactivateAction(): Action
protected function getHeaderActions(): array
{
if ($this->redaktionOpen) {
return [];
}
return [
Action::make('releaseVersion')
->label('Fassung freigeben')
@@ -34,6 +34,28 @@ trait ManagesEditorialSurface
public bool $redaktionOpen = false;
public function getBreadcrumbs(): array
{
if ($this->redaktionOpen) {
return [];
}
return parent::getBreadcrumbs();
}
public function getCachedHeaderActions(): array
{
if ($this->redaktionOpen) {
return [];
}
if ($this->cachedHeaderActions === []) {
$this->cacheInteractsWithHeaderActions();
}
return $this->cachedHeaderActions;
}
public string $redaktionTab = 'texte';
public ?int $replacingAssignment = null;