2024-07-10 16:10:33 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
'debug' => true,
|
|
|
|
|
'api' => [
|
|
|
|
|
'basicAuth' => true,
|
|
|
|
|
// Enable api access without SSL. To disable in production.
|
|
|
|
|
'allowInsecure' => true
|
2024-09-03 18:40:31 +02:00
|
|
|
],
|
|
|
|
|
'panel' => [
|
|
|
|
|
'language' => 'fr',
|
|
|
|
|
'css' => 'assets/css/panel.css',
|
|
|
|
|
'favicon' => 'assets/favicons/favicon.svg',
|
|
|
|
|
'menu' => [
|
|
|
|
|
'site' => [
|
|
|
|
|
'label' => 'Dashboard',
|
|
|
|
|
'icon' => 'dashboard',
|
|
|
|
|
'current' => function (string $current): bool {
|
|
|
|
|
// the links of all your custom menu entries
|
|
|
|
|
$links = [
|
|
|
|
|
'pages/clients',
|
|
|
|
|
'pages/projects',
|
|
|
|
|
'pages/notifications',
|
|
|
|
|
'pages/events'
|
|
|
|
|
];
|
|
|
|
|
$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');
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
'-',
|
|
|
|
|
'notifications' => [
|
|
|
|
|
'label' => 'Notifications',
|
|
|
|
|
'icon' => 'bell',
|
|
|
|
|
'link' => 'pages/notifications',
|
|
|
|
|
'current' => function (string $current): bool {
|
|
|
|
|
$path = Kirby\Cms\App::instance()->path();
|
|
|
|
|
return Str::contains($path, 'pages/notifications');
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
'events' => [
|
|
|
|
|
'label' => 'Événements',
|
|
|
|
|
'icon' => 'calendar',
|
|
|
|
|
'link' => 'pages/events',
|
|
|
|
|
'current' => function (string $current): bool {
|
|
|
|
|
$path = Kirby\Cms\App::instance()->path();
|
|
|
|
|
return Str::contains($path, 'pages/events');
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
'-',
|
|
|
|
|
'users',
|
|
|
|
|
'system'
|
|
|
|
|
]
|
2024-07-10 16:10:33 +02:00
|
|
|
]
|
2024-09-03 18:40:31 +02:00
|
|
|
];
|