Ordne Paket, Rechteprofil, Säulen, Kombinationen und Benutzer in die gemeinsamen Muster ein.
- Gemeinsame Katalog-Objektseite (catalog/objekt): Kopf, Hauptabschnitte, Begleitinformation. Angebot, Paket und Rechteprofil nutzen sie; lesbare Bezeichnungen zentral in CatalogLabels. - Paket: eine Maske für erste und geänderte Fassung, bei einer Änderung mit der neuesten veröffentlichten Fassung vorbelegt; Wirkung unverändert BundleService::publish (frühere Fassungen bleiben veröffentlicht). - Rechteprofil: erlaubte Handlungen lesbar, Verwendung in Angeboten, Fassungen; der doppelte Titel „… ansehen ansehen“ entfällt. - Fachliche Säulen, Fachliche Kombinationen und Benutzer in der gemeinsamen Bestandsliste; Säulen mit Website-Zustand und Medienzahl, Konten mit Status und Rollen. - Gefüllte Filament-Hauptknöpfe überall im Verwaltungsgrün (auch Formularfuß, etwa „Speichern“ der Säule). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3aa1bad859
commit
51d58ac55c
14 files changed
+675
-198
No files matched your search
@@ -16,8 +16,8 @@
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
|
||||
/**
|
||||
* Listen „Module“ und „Programme“: dieselbe Bestandsliste wie der Arbeitsplatz, mit festem Typ. Fachliche
|
||||
* Kombinationen behalten vorerst ihre Tabelle (Teil B, Abschnitt 3).
|
||||
* Listen „Module“, „Programme“ und „Fachliche Kombinationen“: dieselbe Bestandsliste wie der Arbeitsplatz, mit festem
|
||||
* Typ. Module und Programme teilen den Anlegedialog des Arbeitsplatzes; Kombinationen behalten ihren.
|
||||
*/
|
||||
abstract class ListCompositionKind extends ListRecords
|
||||
{
|
||||
@@ -31,41 +31,39 @@ protected function fixedKind(): ?CompositionKind
|
||||
return $this->kind();
|
||||
}
|
||||
|
||||
private function usesBestand(): bool
|
||||
private function onDesk(): bool
|
||||
{
|
||||
return in_array($this->kind(), [CompositionKind::Kurs, CompositionKind::Uebung], true);
|
||||
}
|
||||
|
||||
public function getSubheading(): string|Htmlable|null
|
||||
{
|
||||
$desk = $this->usesBestand() ? ' Programme und Module stehen gemeinsam auch auf dem Arbeitsplatz.' : '';
|
||||
$desk = $this->onDesk() ? ' Programme und Module stehen gemeinsam auch auf dem Arbeitsplatz.' : '';
|
||||
|
||||
return $this->kind()->deskExplanation().$desk;
|
||||
}
|
||||
|
||||
public function getMaxContentWidth(): Width|string|null
|
||||
{
|
||||
return $this->usesBestand() ? Width::Full : parent::getMaxContentWidth();
|
||||
return Width::Full;
|
||||
}
|
||||
|
||||
public function content(Schema $schema): Schema
|
||||
{
|
||||
if (! $this->usesBestand()) {
|
||||
return parent::content($schema);
|
||||
}
|
||||
|
||||
return $schema->components([View::make('filament.verwaltung.bestand')]);
|
||||
}
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
if ($this->usesBestand()) {
|
||||
if ($this->onDesk()) {
|
||||
return [$this->createCompositionAction($this->kind())];
|
||||
}
|
||||
|
||||
return [
|
||||
Action::make('create')
|
||||
->label($this->kind()->createLabel())
|
||||
->modalHeading('Neue '.$this->kind()->label())
|
||||
->modalSubmitActionLabel($this->kind()->createLabel())
|
||||
->visible(fn (): bool => ContentElementResource::editor())
|
||||
->schema([
|
||||
TextInput::make('designation')->label('Bezeichnung')->required(),
|
||||
|
||||
Reference in new issue
Block a user