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');
|
return Str::contains($path, 'pages/news');
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
'packages' => [
|
'dossiers' => [
|
||||||
'label' => 'Dossiers',
|
'label' => 'Dossiers',
|
||||||
'icon' => 'folder',
|
'icon' => 'folder',
|
||||||
'link' => 'pages/packages',
|
'link' => 'pages/dossiers',
|
||||||
'current' => function (string $current): bool {
|
'current' => function (string $current): bool {
|
||||||
$path = Kirby\Cms\App::instance()->path();
|
$path = Kirby\Cms\App::instance()->path();
|
||||||
return Str::contains($path, 'pages/packages');
|
return Str::contains($path, 'pages/dossiers');
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
'laboratoire' => [
|
'laboratoire' => [
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ de la vérité et de la justice.</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="<?= page('a-propos')->url() ?>"><?= kirby()->language() && kirby()->language()->code() === 'en' ? 'About' : 'À propos' ?></a></li>
|
<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('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('impacts')->url() ?>"><?= t('impacts.title') ?></a></li>
|
||||||
<li><a href="<?= page('news')->url() ?>"><?= t('news.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>
|
<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) {
|
[$seeMoreLabel, $seeMoreUrl] = match($type) {
|
||||||
'investigations' => ['Voir toutes les enquêtes', page('enquetes')->url()],
|
'investigations' => ['Voir toutes les enquêtes', page('enquetes')->url()],
|
||||||
'impacts' => ['Voir tous les impacts', page('impacts')->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()],
|
'projects' => ['Voir tous les projets', site()->find('laboratoire')->url()],
|
||||||
'news' => ['Voir toutes les brèves', page('news')->url()],
|
'news' => ['Voir toutes les brèves', page('news')->url()],
|
||||||
default => ['Voir tout', '/'],
|
default => ['Voir tout', '/'],
|
||||||
|
|
@ -183,9 +183,9 @@ $count = max(4, (int)$section->count()->value());
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</div>
|
</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();
|
$cover = $package->cover()->toFile();
|
||||||
$investigationsCount = $package->linkedContent()->toPages()->count();
|
$investigationsCount = $package->linkedContent()->toPages()->count();
|
||||||
$impactsCount = $package->linkedImpacts()->toPages()->count();
|
$impactsCount = $package->linkedImpacts()->toPages()->count();
|
||||||
|
|
|
||||||
|
|
@ -391,7 +391,7 @@ if ($relatedInvestigations->isEmpty()) {
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Récupérer le dossier associé à cette investigation (reverse lookup via linkedContent)
|
// Récupérer le dossier associé à cette investigation (reverse lookup via linkedContent)
|
||||||
$packagesParent = site()->find('packages');
|
$packagesParent = site()->find('dossiers');
|
||||||
$package = $packagesParent
|
$package = $packagesParent
|
||||||
? $packagesParent->children()->listed()->filter(fn($p) => $p->linkedContent()->toPages()->has($page))->first()
|
? $packagesParent->children()->listed()->filter(fn($p) => $p->linkedContent()->toPages()->has($page))->first()
|
||||||
: null;
|
: null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue