complete dossier
All checks were successful
Deploy / Deploy to Production (push) Successful in 17s

This commit is contained in:
Julie Blanc 2026-02-26 17:54:47 +01:00
parent e5727b5630
commit ec72fa474c
10 changed files with 220 additions and 45 deletions

View file

@ -296,6 +296,46 @@ $dateLocale = substr(is_array($locale) ? reset($locale) : $locale, 0, 5);
</div> -->
<?php
$resourcesParent = site()->find('ressources');
$resources = $resourcesParent ? $resourcesParent->children()->listed()->filter(function($resource) use ($page) {
return $resource->linkedInvestigations()->toPages()->has($page);
}) : null;
?>
<?php if ($resources && $resources->isNotEmpty()): ?>
<aside class="page__aside" id="methodologies">
<h3 class="aside__title"><?= t('resources.methodologies') ?></h3>
<?php foreach ($resources as $resource): ?>
<div class="card--block-small has-link">
<div class="group-top">
<p class="type"><?= t('resource.type') ?></p>
<?php if ($resource->category()->isNotEmpty()): ?>
<p class="category"><?= $resource->category()->esc() ?></p>
<?php endif ?>
</div>
<h4 class="title"><?= $resource->title()->esc() ?></h4>
<?php if ($resource->created()->isNotEmpty()): ?>
<p class="date">
<time datetime="<?= $resource->created()->toDate('yyyy-MM-dd') ?>"><?= $resource->created()->toDate('d MMMM yyyy', $dateLocale) ?></time>
</p>
<?php endif ?>
<button class="btn--go-to">
<a href="<?= $resource->url() ?>">
<?= svg('assets/icons/arrow-left.svg') ?>
</a>
</button>
<a class="link-block" href="<?= $resource->url() ?>" aria-hidden="true"></a>
</div>
<?php endforeach ?>
</aside>
<?php endif ?>
<?php
$impactsParent = site()->find('impacts');