diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index 2b0eab2..ae3fe83 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -2,12 +2,14 @@ twig: file_name_pattern: '*.twig' form_themes: ['bootstrap_5_layout.html.twig'] globals: - title: Gestionnaire de tâches simple + title: '%short_title%' menu: header: - { route: 'app_project', label: 'Projets', icon: '' } taskLifecycleManager: '@App\Service\TaskLifecycleManager' geoJsonManager: '@App\Service\GeoJsonManager' + short_title: '%short_title%' + long_title: '%long_title%' when@test: twig: diff --git a/config/services.yaml b/config/services.yaml index 4904dd1..ebd3d95 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -5,6 +5,8 @@ # https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration parameters: timezone: '%env(APP_TIMEZONE)%' + short_title: 'OMO' + long_title: 'Outil de Manipulation et d’Organisation' services: # default configuration for services in *this* file diff --git a/src/Service/TaskLifecycleManager.php b/src/Service/TaskLifecycleManager.php index d1176a5..a093dc9 100644 --- a/src/Service/TaskLifecycleManager.php +++ b/src/Service/TaskLifecycleManager.php @@ -3,6 +3,7 @@ namespace App\Service; use App\Entity\Project; +use App\Entity\Task; use Symfony\Component\Workflow\WorkflowInterface; class TaskLifecycleManager @@ -13,8 +14,16 @@ class TaskLifecycleManager ) { } - public function getProjectStats(Project $project) + public function getProjectStats($entity) { + if ($entity instanceof Project) { + $project = $entity; + } elseif ($entity instanceof Task) { + $project = $entity->getProject(); + } else { + throw new \RuntimeException(); + } + $stats = []; $places = $this->taskLifecycleStateMachine->getDefinition()->getPlaces(); diff --git a/templates/home/index.html.twig b/templates/home/index.html.twig index 80fbe28..0ecea3e 100644 --- a/templates/home/index.html.twig +++ b/templates/home/index.html.twig @@ -2,7 +2,7 @@ {% block page_content %}
L’idée c’est d’avoir un petit outil collaboratif simple et facile à administrer/utiliser pour mapper des trucs de façon coordonnée à un endroit.