refactor: rename investigation highlight fields

- Rename `superPinnedInvestigation` → `featuredInvestigation` (à la une, max 1)
- Rename `pinnedInvestigations` → stays `pinnedInvestigations` but now multiple
- Rename tab `highlightTab` → `starredTab`
- Update home.php to use new field names

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-02-27 11:25:14 +01:00
parent 4e45d5a5dc
commit 9aa2041ec4
2 changed files with 21 additions and 17 deletions

View file

@ -45,16 +45,16 @@ $count = max(4, (int)$section->count()->value());
<?php
$enquetesPage = page('enquetes');
$superPin = $enquetesPage->superPinnedInvestigation()->toPage();
$featured = $enquetesPage->featuredInvestigation()->toPage();
$pinned = $enquetesPage->pinnedInvestigations()->toPages();
if ($superPin) $pinned = $pinned->not($superPin);
if ($featured) $pinned = $pinned->not($featured);
$list = [];
$shownIds = [];
if ($superPin) {
$list[] = ['page' => $superPin, 'type' => 'super'];
$shownIds[] = $superPin->id();
if ($featured) {
$list[] = ['page' => $featured, 'type' => 'super'];
$shownIds[] = $featured->id();
}
foreach ($pinned as $p) {