Zeige auf der Shopkachel Titelbild, Saeulen, Materialart mit Symbol und Marker
CI Feature / test (push) Successful in 5m10s
Deploy Test / test (push) Successful in 5m21s
Deploy Test / deploy (push) Successful in 32s

- ShopCatalog als gemeinsame Datenquelle der Kacheln, shop/kachel als Partial
- Titelbild nur mit Website-Freigabe (PresentationMedia::coverPresentation), schmueckend mit leerem alt
- Symbol je Materialart (Stammdaten), Marker Neu, Aktualisiert, Beliebt mit Einstellung am Artikel
- Migration 2026_12_01_100000, rein ergaenzend
- ADR-54, Plan, DEPLOYMENT.md

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Sonnet 5.5 committed 2026-11-26 07:44:47 +01:00
1 parent db3a6ba779
commit 0ac70884cc
18 files changed
+991 -88

No files matched your search

@@ -42,6 +42,7 @@ class EditorialContentKind extends Model
protected $fillable = [
'slug',
'label',
'symbol',
'sort_order',
'is_active',
'contexts',
+2
View File
@@ -22,12 +22,14 @@ class LicenseArticle extends Model
'successor_of_id',
'current_release_id',
'archived_at',
'shop_markers',
];
protected function casts(): array
{
return [
'archived_at' => 'datetime',
'shop_markers' => 'array',
];
}
+27
View File
@@ -4,6 +4,7 @@
use App\Domain\Media\ThumbnailRef;
use App\Domain\Media\WebsiteMedia;
use App\Domain\Media\WebsitePresentation;
use App\Models\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
@@ -430,6 +431,32 @@ public function coverElementId(Model $subject): ?int
return null;
}
/**
* Das öffentlich zeigbare Titelbild: das erste Titel- oder Galeriebild in der Reihenfolge der Rollen, das für die
* Website freigegeben ist (WebsiteMedia). Ein nicht freigegebenes Bild wird übersprungen, nie ausgeliefert.
*/
public function coverPresentation(Model $subject): ?WebsitePresentation
{
$assignments = PresentationAssignment::query()
->with('role')
->where('subject_type', $subject->getMorphClass())
->where('subject_id', $subject->getKey())
->orderBy('position')
->get();
foreach (PresentationRole::COVER_ROLES as $slug) {
foreach ($assignments->filter(fn (PresentationAssignment $row): bool => $row->role?->slug === $slug) as $row) {
$presentation = $this->website->present((int) $row->content_element_id);
if ($presentation !== null && $presentation->kind === 'bild') {
return $presentation;
}
}
}
return null;
}
private function owned(Model $subject, int $assignmentId): PresentationAssignment
{
$assignment = PresentationAssignment::query()