From f94fb0efc15cc6007a96547c87edaf9d32c06b7a Mon Sep 17 00:00:00 2001 From: Tchama Date: Tue, 4 Aug 2020 11:33:56 +0200 Subject: [PATCH] enable and fix errors for event bundle + adding knp-time-bundle --- DependencyInjection/Configuration.php | 4 ++-- Resources/translations/messages.fr.yml | 1 - Resources/views/Event/show.html.twig | 5 ++++- Resources/views/Participation/edit-multiple.html.twig | 5 ++++- Timeline/TimelineEventProvider.php | 6 +++--- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 26441ce71..14cbddafe 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -17,8 +17,8 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('chill_event'); + $treeBuilder = new TreeBuilder('chill_event'); + $rootNode = $treeBuilder->getRootNode('chill_event'); // Here you should define the parameters that are allowed to // configure your bundle. See the documentation linked above for diff --git a/Resources/translations/messages.fr.yml b/Resources/translations/messages.fr.yml index 002ffb250..395f25eae 100644 --- a/Resources/translations/messages.fr.yml +++ b/Resources/translations/messages.fr.yml @@ -92,7 +92,6 @@ EventType: Types d'événements EventType creation: Nouveau type d'événement EventType edit: Modifier le type d'événement Status list: Liste des statuts -Status: Statuts Status creation: Nouveau statut Status edit: Modifier un statut Role list: Liste des rôles diff --git a/Resources/views/Event/show.html.twig b/Resources/views/Event/show.html.twig index 4690854cc..881cda742 100644 --- a/Resources/views/Event/show.html.twig +++ b/Resources/views/Event/show.html.twig @@ -85,7 +85,10 @@ {{ person_macro.render(participation.person) }} {{ participation.role.name|localize_translatable_string }} {{ participation.status.name|localize_translatable_string }} - {{ participation.lastUpdate|time_diff }} + {{ participation.lastUpdate|ago }} {# sf4 check: filter 'time_diff' is abandoned, + alternative: knplabs/knp-time-bundle provide filter 'ago' #} + +