Banner zentral: je Website, Saison und Prioritaet, auch fuer Sonderangebote
Hinweise werden zu Bannern mit Website, Erscheinungsbildern, Prioritaet und optionalem Sonderangebot (Text, Termin und Link aus dem Angebot, sichtbar nur solange es beworben wird). Sonderangebote lassen sich mit einem Klick als Banner zeigen; die Liste nennt das heute sichtbare Banner. Banner-Texte der Erscheinungsbilder werden zu saisonalen Bannern. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
791786ed3e
commit
d2b1a853dc
21 files changed
+618
-106
No files matched your search
@@ -10,6 +10,23 @@ class ListNotices extends ListRecords
|
||||
{
|
||||
protected static string $resource = NoticeResource::class;
|
||||
|
||||
/**
|
||||
* Which banner the website shows today – the answer to "why do I see this banner?".
|
||||
*/
|
||||
public function getSubheading(): ?string
|
||||
{
|
||||
$today = NoticeResource::bannersToday();
|
||||
if ($today === []) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return collect($today)->map(function (array $entry) use ($today): string {
|
||||
$prefix = count($today) > 1 ? $entry['site']->name.': ' : '';
|
||||
|
||||
return $prefix.($entry['banner'] ? 'Heute sichtbar: „'.$entry['banner']->text.'“' : 'Heute ist kein Banner sichtbar.');
|
||||
})->implode(' · ');
|
||||
}
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
|
||||
Reference in new issue
Block a user