reorganize panel:
- project blueprints : add managers field - projects blueprint : re organize, add 'Vos projets' section based on custom user method - menu : hide dashboard item (useless)
This commit is contained in:
parent
d3e73bc8de
commit
4f60dc91d3
15 changed files with 110 additions and 150 deletions
15
public/site/plugins/your-projects/index.php
Normal file
15
public/site/plugins/your-projects/index.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
Kirby::plugin('adrienpayet/pdc-your-projects', [
|
||||
'userMethods' => [
|
||||
'projects' => function() {
|
||||
$allProjects = page('projects')->children();
|
||||
|
||||
$managedProjects = $allProjects->filter(
|
||||
fn ($project) => $project->managers()->toUsers()->has($this)
|
||||
);
|
||||
|
||||
return $managedProjects;
|
||||
}
|
||||
]
|
||||
]);
|
||||
Loading…
Add table
Add a link
Reference in a new issue