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
@@ -12,8 +12,8 @@
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* A seasonal look of a site (e.g. summer, winter, Christmas, New Year's Eve): colour tokens, texts and banner
|
||||
* change, photos made for it (Photo::appearance_ids) are shown – the page structure does not (sections may be limited to
|
||||
* A seasonal look of a site (e.g. summer, winter, Christmas, New Year's Eve): colour tokens and texts change,
|
||||
* photos and banners made for it (appearance_ids) are shown – the page structure does not (sections may be limited to
|
||||
* appearances, see SectionRegistry). Offers are advertised by their own rules (OfferShowcase). The period recurs every year ("MM-DD" to "MM-DD",
|
||||
* inclusive; a period may run over the turn of the year). The default appearance applies when none matches.
|
||||
*/
|
||||
@@ -27,9 +27,6 @@ class Appearance extends Model
|
||||
* Texts an appearance can replace, with their admin labels. Sections read them through Theme::text().
|
||||
*/
|
||||
public const OVERRIDABLE = [
|
||||
'banner.text' => 'Banner: Text',
|
||||
'banner.link_label' => 'Banner: Link-Text',
|
||||
'banner.link_url' => 'Banner: Link-Ziel',
|
||||
'hero.eyebrow' => 'Titelbereich: kleine Überschrift',
|
||||
'hero.title' => 'Titelbereich: Überschrift',
|
||||
'hero.text' => 'Titelbereich: Text',
|
||||
@@ -67,12 +64,10 @@ public function site(): BelongsTo
|
||||
*/
|
||||
public static function names(): array
|
||||
{
|
||||
// once() keys its cache by the closure's bound variables, so each landlord gets its own entry.
|
||||
$tenantId = app(TenantContext::class)->id();
|
||||
|
||||
return once(function (): array {
|
||||
return self::query()->pluck('name', 'id')->all();
|
||||
});
|
||||
// once() keys its cache by the variables the closure uses, so each landlord gets its own entry.
|
||||
return once(fn (): array => self::query()->when($tenantId, fn ($query) => $query->where('tenant_id', $tenantId))->pluck('name', 'id')->all());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user