2024-09-11 07:32:34 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
'site' => [
|
|
|
|
|
'label' => 'Dashboard',
|
|
|
|
|
'icon' => 'dashboard',
|
|
|
|
|
'current' => function (string $current): bool {
|
|
|
|
|
// the links of all your custom menu entries
|
|
|
|
|
$links = [
|
|
|
|
|
'pages/clients',
|
|
|
|
|
'pages/projects',
|
|
|
|
|
'pages/inspirations',
|
|
|
|
|
'pages/notifications',
|
2024-09-12 19:07:49 +02:00
|
|
|
'pages/reunions'
|
2024-09-11 07:32:34 +02:00
|
|
|
];
|
|
|
|
|
$path = Kirby\Cms\App::instance()->path();
|
|
|
|
|
return
|
|
|
|
|
$current === 'site' &&
|
|
|
|
|
A::every($links, fn ($link) => Str::contains($path, $link) === false);
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
'clients' => [
|
|
|
|
|
'label' => 'Clients',
|
|
|
|
|
'icon' => 'account',
|
|
|
|
|
'link' => 'pages/clients',
|
|
|
|
|
'current' => function (string $current): bool {
|
|
|
|
|
$path = Kirby\Cms\App::instance()->path();
|
|
|
|
|
return Str::contains($path, 'pages/clients');
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
'projects' => [
|
|
|
|
|
'label' => 'Projets',
|
|
|
|
|
'icon' => 'folder',
|
|
|
|
|
'link' => 'pages/projects',
|
|
|
|
|
'current' => function (string $current): bool {
|
|
|
|
|
$path = Kirby\Cms\App::instance()->path();
|
|
|
|
|
return Str::contains($path, 'pages/projects');
|
|
|
|
|
}
|
|
|
|
|
],
|
2024-10-08 17:30:56 +02:00
|
|
|
'-',
|
2024-09-11 07:32:34 +02:00
|
|
|
'inspirations' => [
|
|
|
|
|
'label' => 'Inspirations',
|
|
|
|
|
'icon' => 'images',
|
|
|
|
|
'link' => 'pages/inspirations',
|
|
|
|
|
'current' => function (string $current): bool {
|
|
|
|
|
$path = Kirby\Cms\App::instance()->path();
|
|
|
|
|
return Str::contains($path, 'pages/inspirations');
|
|
|
|
|
}
|
|
|
|
|
],
|
2024-10-08 17:30:56 +02:00
|
|
|
'materials' => [
|
|
|
|
|
'label' => 'Matériauthèque',
|
|
|
|
|
'icon' => 'images',
|
|
|
|
|
'link' => 'pages/materials',
|
|
|
|
|
'current' => function (string $current): bool {
|
|
|
|
|
$path = Kirby\Cms\App::instance()->path();
|
|
|
|
|
return Str::contains($path, 'pages/materials');
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
'creations' => [
|
|
|
|
|
'label' => 'Réalisations',
|
|
|
|
|
'icon' => 'images',
|
|
|
|
|
'link' => 'pages/creations',
|
|
|
|
|
'current' => function (string $current): bool {
|
|
|
|
|
$path = Kirby\Cms\App::instance()->path();
|
|
|
|
|
return Str::contains($path, 'pages/creations');
|
|
|
|
|
}
|
|
|
|
|
],
|
2024-09-11 07:32:34 +02:00
|
|
|
'-',
|
|
|
|
|
'notifications' => [
|
|
|
|
|
'label' => 'Notifications',
|
2024-09-12 19:07:49 +02:00
|
|
|
'icon' => 'megaphone',
|
2024-09-11 07:32:34 +02:00
|
|
|
'link' => 'pages/notifications',
|
|
|
|
|
'current' => function (string $current): bool {
|
|
|
|
|
$path = Kirby\Cms\App::instance()->path();
|
|
|
|
|
return Str::contains($path, 'pages/notifications');
|
|
|
|
|
}
|
|
|
|
|
],
|
2024-09-12 19:07:49 +02:00
|
|
|
'reunions' => [
|
|
|
|
|
'label' => 'Réunions',
|
2024-09-11 07:32:34 +02:00
|
|
|
'icon' => 'calendar',
|
2024-09-12 19:07:49 +02:00
|
|
|
'link' => 'pages/reunions',
|
2024-09-11 07:32:34 +02:00
|
|
|
'current' => function (string $current): bool {
|
|
|
|
|
$path = Kirby\Cms\App::instance()->path();
|
2024-09-12 19:07:49 +02:00
|
|
|
return Str::contains($path, 'pages/reunions');
|
2024-09-11 07:32:34 +02:00
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
'-',
|
|
|
|
|
'users',
|
|
|
|
|
'system'
|
|
|
|
|
];
|