superPinnedInvestigation()->toPage();
$pinned = $enquetesPage->pinnedInvestigations()->toPages();
if ($superPin) $pinned = $pinned->not($superPin);
$list = [];
$shownIds = [];
if ($superPin) {
$list[] = ['page' => $superPin, 'type' => 'super'];
$shownIds[] = $superPin->id();
}
foreach ($pinned as $p) {
if (count($list) >= 5) break;
$list[] = ['page' => $p, 'type' => 'pinned'];
$shownIds[] = $p->id();
}
if (count($list) < 5) {
$latest = $enquetesPage->children()->listed()->sortBy('created', 'desc')
->filter(fn($p) => !in_array($p->id(), $shownIds))
->limit(5 - count($list));
foreach ($latest as $p) {
$list[] = ['page' => $p, 'type' => 'latest'];
}
}
?>
cover()->toFile();
?>
videoPreview()->toFile())): ?>
= svg('assets/icons/pin.svg') ?>
chapo()->isNotEmpty()): ?>
= $investigation->chapo()->excerpt(200) ?>
incidentDate()->isNotEmpty()): ?>
- Date de l'incident
partners()->toStructure()): ?>
isNotEmpty()): ?>
- Partenaire(s)
-
name()->value() ?>
= implode(', ', $partnerNames) ?>
incidentLocation()->isNotEmpty()): ?>
- Lieu de l'incident
- = $investigation->incidentLocation()->esc() ?>
keywords()->split()): ?>