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
@@ -2,9 +2,11 @@
|
||||
|
||||
namespace App\Filament\Resources\Pillars\Pages;
|
||||
|
||||
use App\Domain\Catalog\Pillar;
|
||||
use App\Domain\Catalog\PillarService;
|
||||
use App\Filament\Resources\ContentElements\ContentElementResource;
|
||||
use App\Filament\Resources\Pillars\PillarResource;
|
||||
use App\Filament\Support\ListsCatalog;
|
||||
use App\Filament\Support\ReportsDomainRules;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
@@ -13,6 +15,7 @@
|
||||
|
||||
class ListPillars extends ListRecords
|
||||
{
|
||||
use ListsCatalog;
|
||||
use ReportsDomainRules;
|
||||
|
||||
protected static string $resource = PillarResource::class;
|
||||
@@ -27,6 +30,9 @@ protected function getHeaderActions(): array
|
||||
return [
|
||||
Action::make('create')
|
||||
->label('Säule anlegen')
|
||||
->modalHeading('Neue fachliche Säule')
|
||||
->modalDescription('Der Name genügt. Website-Text, Adresse und Veröffentlichung legst du danach fest.')
|
||||
->modalSubmitActionLabel('Säule anlegen')
|
||||
->visible(fn (): bool => ContentElementResource::editor())
|
||||
->schema([
|
||||
TextInput::make('name')->label('Name')->required(),
|
||||
@@ -43,4 +49,45 @@ protected function getHeaderActions(): array
|
||||
}),
|
||||
];
|
||||
}
|
||||
|
||||
protected function catalogRows(): array
|
||||
{
|
||||
$rows = [];
|
||||
|
||||
foreach (Pillar::query()->withCount('elements')->orderBy('sort_order')->orderBy('name')->get() as $pillar) {
|
||||
$public = $pillar->published_at !== null;
|
||||
$url = PillarResource::getUrl('edit', ['record' => $pillar]);
|
||||
$rows[] = [
|
||||
'schluessel' => 's'.$pillar->id,
|
||||
'titel' => $pillar->name,
|
||||
'meta' => 'Fachliche Säule'.(filled($pillar->slug) ? ' · /themen/'.$pillar->slug : ''),
|
||||
'text' => (string) ($pillar->public_summary ?? ''),
|
||||
'symbol' => 'modul',
|
||||
'url' => $url,
|
||||
'chips' => [
|
||||
$public ? ['label' => 'Auf der Website veröffentlicht', 'ton' => 'gut'] : ['label' => 'Intern', 'ton' => 'leise'],
|
||||
['label' => $pillar->elements_count === 1 ? '1 Medium' : $pillar->elements_count.' Medien', 'ton' => 'neutral'],
|
||||
],
|
||||
'zustand' => [$public ? 'oeffentlich' : 'intern'],
|
||||
'aktionen' => [['label' => 'Bearbeiten', 'href' => $url, 'icon' => 'stift']],
|
||||
];
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
protected function zustandOptionen(): array
|
||||
{
|
||||
return ['alle' => 'Jeder Zustand', 'oeffentlich' => 'Auf der Website veröffentlicht', 'intern' => 'Intern'];
|
||||
}
|
||||
|
||||
protected function einheit(): array
|
||||
{
|
||||
return ['Fachliche Säule', 'Fachliche Säulen'];
|
||||
}
|
||||
|
||||
protected function leer(): array
|
||||
{
|
||||
return ['titel' => 'Noch keine Säulen', 'text' => 'Mit „Säule anlegen“ oben entsteht die erste Säule.'];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user