refactor: rename packages → dossiers throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0b1f8c94b2
commit
8d808a87fe
4 changed files with 8 additions and 8 deletions
|
|
@ -47,13 +47,13 @@ return [
|
|||
return Str::contains($path, 'pages/news');
|
||||
}
|
||||
],
|
||||
'packages' => [
|
||||
'dossiers' => [
|
||||
'label' => 'Dossiers',
|
||||
'icon' => 'folder',
|
||||
'link' => 'pages/packages',
|
||||
'link' => 'pages/dossiers',
|
||||
'current' => function (string $current): bool {
|
||||
$path = Kirby\Cms\App::instance()->path();
|
||||
return Str::contains($path, 'pages/packages');
|
||||
return Str::contains($path, 'pages/dossiers');
|
||||
}
|
||||
],
|
||||
'laboratoire' => [
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ de la vérité et de la justice.</p>
|
|||
<ul>
|
||||
<li><a href="<?= page('a-propos')->url() ?>"><?= kirby()->language() && kirby()->language()->code() === 'en' ? 'About' : 'À propos' ?></a></li>
|
||||
<li><a href="<?= page('enquetes')->url() ?>"><?= t('investigations.title') ?></a></li>
|
||||
<li><a href="<?= page('packages')->url() ?>"><?= t('packages.title') ?></a></li>
|
||||
<li><a href="<?= page('dossiers')->url() ?>"><?= t('packages.title') ?></a></li>
|
||||
<li><a href="<?= page('impacts')->url() ?>"><?= t('impacts.title') ?></a></li>
|
||||
<li><a href="<?= page('news')->url() ?>"><?= t('news.title') ?></a></li>
|
||||
<li><a href="<?= page('ressources')->url() ?>"><?= t('resources.title') ?></a></li>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ $count = max(4, (int)$section->count()->value());
|
|||
[$seeMoreLabel, $seeMoreUrl] = match($type) {
|
||||
'investigations' => ['Voir toutes les enquêtes', page('enquetes')->url()],
|
||||
'impacts' => ['Voir tous les impacts', page('impacts')->url()],
|
||||
'packages' => ['Voir tous les dossiers', page('packages')->url()],
|
||||
'dossiers' => ['Voir tous les dossiers', page('dossiers')->url()],
|
||||
'projects' => ['Voir tous les projets', site()->find('laboratoire')->url()],
|
||||
'news' => ['Voir toutes les brèves', page('news')->url()],
|
||||
default => ['Voir tout', '/'],
|
||||
|
|
@ -183,9 +183,9 @@ $count = max(4, (int)$section->count()->value());
|
|||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
<?php elseif ($type === 'packages'): ?>
|
||||
<?php elseif ($type === 'dossiers'): ?>
|
||||
|
||||
<?php foreach (page('packages')->children()->listed()->limit($count) as $package):
|
||||
<?php foreach (page('dossiers')->children()->listed()->limit($count) as $package):
|
||||
$cover = $package->cover()->toFile();
|
||||
$investigationsCount = $package->linkedContent()->toPages()->count();
|
||||
$impactsCount = $package->linkedImpacts()->toPages()->count();
|
||||
|
|
|
|||
|
|
@ -391,7 +391,7 @@ if ($relatedInvestigations->isEmpty()) {
|
|||
|
||||
<?php
|
||||
// Récupérer le dossier associé à cette investigation (reverse lookup via linkedContent)
|
||||
$packagesParent = site()->find('packages');
|
||||
$packagesParent = site()->find('dossiers');
|
||||
$package = $packagesParent
|
||||
? $packagesParent->children()->listed()->filter(fn($p) => $p->linkedContent()->toPages()->has($page))->first()
|
||||
: null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue