kunde: PM-Liste zeigt Firmen-Kontext unter der Headline und Bild-Thumbnails
Der aktive Firmen-Kontext (Firmen-Umschalter) steht jetzt prominent unter der Überschrift — Firmenname oder „Alle Firmen" — statt als kleiner Hinweistext. Neue Spalte „Bild" zwischen Status und Titel mit dem Titelbild (thumb-Variante, is_preview zuerst), dem gewählten Platzhalter bei bildlosen PMs oder einem generischen Icon-Fallback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
921c533fdb
commit
9b73972d33
4 changed files with 100 additions and 8 deletions
|
|
@ -178,6 +178,18 @@ class PressRelease extends Model
|
|||
return $image?->variantUrl('card') ?? $image?->url();
|
||||
}
|
||||
|
||||
/**
|
||||
* Bild-URL für Listen-Thumbnails: thumb-Variante des Titelbildes,
|
||||
* Fallback card-Variante bzw. Original. Null bei bildlosen PMs
|
||||
* (dann greift chosenPlaceholderUrl() bzw. der generische Fallback).
|
||||
*/
|
||||
public function thumbImageUrl(): ?string
|
||||
{
|
||||
$image = $this->images?->first();
|
||||
|
||||
return $image?->variantUrl('thumb') ?? $image?->variantUrl('card') ?? $image?->url();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tag-freier, whitespace-normalisierter Anriss des PM-Textes.
|
||||
*/
|
||||
|
|
@ -607,8 +619,14 @@ class PressRelease extends Model
|
|||
|
||||
$models = static::query()->withoutGlobalScopes()
|
||||
->whereKey($pageIds)
|
||||
// Kategorie fürs Listen-Rendering (localizedCategoryName, 13.07.).
|
||||
->with(['company:id,name', 'category.translations'])
|
||||
// Kategorie fürs Listen-Rendering (localizedCategoryName, 13.07.);
|
||||
// Bilder fürs Listen-Thumbnail — Titelbild zuerst (is_preview,
|
||||
// gleiche Reihenfolge wie in der PM-Vorschau).
|
||||
->with([
|
||||
'company:id,name',
|
||||
'category.translations',
|
||||
'images' => fn ($query) => $query->orderByDesc('is_preview')->orderBy('sort_order'),
|
||||
])
|
||||
// Für das Einreichungs-Modal je Zeile: ohne eigenes Bild entfällt
|
||||
// die Bildrechte-Bestätigung.
|
||||
->withCount('images')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue