From 384b2be577a6cea0622a3c8427f8abe2226ef4d6 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 11 Jul 2022 12:29:11 +0200 Subject: [PATCH 0001/1067] flash menu rapid action in search results: bootstrap dropdown integration --- .../translations/messages.fr.yml | 1 + .../translations/messages.fr.yml | 1 + .../views/Person/list_with_period.html.twig | 39 ++++++++++++++++--- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/translations/messages.fr.yml b/src/Bundle/ChillActivityBundle/translations/messages.fr.yml index abfa0ea89..601455279 100644 --- a/src/Bundle/ChillActivityBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillActivityBundle/translations/messages.fr.yml @@ -196,6 +196,7 @@ Documents label: Libellé du champ Documents # activity type category admin ActivityTypeCategory list: Liste des catégories des types d'activité Create a new activity type category: Créer une nouvelle catégorie de type d'activité +Create a new activity in accompanying course: Créer une activité dans le parcours # activity delete Remove activity: Supprimer une activité diff --git a/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml b/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml index da244fd13..d013cb5ef 100644 --- a/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml @@ -26,6 +26,7 @@ The calendar item has been successfully removed.: Le rendez-vous a été supprim From the day: Du to the day: au Transform to activity: Transformer en échange +Create a new calendar in accompanying course: Créer un rendez-vous dans le parcours canceledBy: supprimé par Canceled by: supprimé par diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig index c407b6c57..4a8e6ed7f 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig @@ -2,11 +2,22 @@ {% set household = person.getCurrentHousehold %} {% if household is not null %}
  • - + +
  • {% endif %} -
  • - +
  • {% endmacro %} @@ -165,10 +176,28 @@ From 04fc5b6614cb8c421a474b40b98618c22404098c Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 11 Jul 2022 14:10:45 +0200 Subject: [PATCH 0002/1067] flash menu rapid action built with chill_menu() --- .../AccompanyingCourseQuickMenuBuilder.php | 34 ++++++++++++++++ .../AccompanyingCourseQuickMenuBuilder.php | 34 ++++++++++++++++ .../ChillMainBundle/Menu/quick_menu.html.twig | 17 ++++++++ .../Menu/PersonQuickMenuBuilder.php | 32 +++++++++++++++ .../views/Person/list_with_period.html.twig | 39 ++++++------------- 5 files changed, 129 insertions(+), 27 deletions(-) create mode 100644 src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseQuickMenuBuilder.php create mode 100644 src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseQuickMenuBuilder.php create mode 100644 src/Bundle/ChillMainBundle/Menu/quick_menu.html.twig create mode 100644 src/Bundle/ChillPersonBundle/Menu/PersonQuickMenuBuilder.php diff --git a/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseQuickMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseQuickMenuBuilder.php new file mode 100644 index 000000000..5d0f95e14 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseQuickMenuBuilder.php @@ -0,0 +1,34 @@ +addChild('Create a new activity in accompanying course', [ + 'route' => 'chill_activity_activity_new', + 'routeParameters' => [ + //'accompanying_course_id' => $accompanyingCourse->getId() + ] + ]) + ->setExtras([ + 'order' => 10, + 'icon' => 'plus' + ]) + ; + + } +} \ No newline at end of file diff --git a/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseQuickMenuBuilder.php b/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseQuickMenuBuilder.php new file mode 100644 index 000000000..d98e9f2c8 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseQuickMenuBuilder.php @@ -0,0 +1,34 @@ +addChild('Create a new calendar in accompanying course', [ + 'route' => 'chill_calendar_calendar_new', + 'routeParameters' => [ + //'accompanying_course_id' => $accompanyingCourse->getId() + ] + ]) + ->setExtras([ + 'order' => 20, + 'icon' => 'plus' + ]) + ; + + } +} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Menu/quick_menu.html.twig b/src/Bundle/ChillMainBundle/Menu/quick_menu.html.twig new file mode 100644 index 000000000..f431674c7 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Menu/quick_menu.html.twig @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Menu/PersonQuickMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/PersonQuickMenuBuilder.php new file mode 100644 index 000000000..82d3c4574 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Menu/PersonQuickMenuBuilder.php @@ -0,0 +1,32 @@ +addChild('Create Accompanying Course', [ + 'route' => 'chill_person_accompanying_course_new', + 'routeParameters' => [ + 'person_id' => $person->getId(), + ], ]) + ->setExtras([ + 'order' => 10, + 'icon' => 'plus' + ]) + ; + } + +} \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig index 4a8e6ed7f..bfbbe88e1 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig @@ -9,16 +9,12 @@ {% endif %} - + + {{ chill_menu('person_quick_menu', { + 'layout': '@ChillMainBundle/Menu/quick_menu.html.twig', + 'args' : { 'person': person } + }) }} + {% endmacro %} {% macro accompanying_period(acp, person) %} @@ -181,23 +177,12 @@ > - + + {{ chill_menu('accompanying_course_quick_menu', { + 'layout': '@ChillMainBundle/Menu/quick_menu.html.twig', + 'args' : { 'accompanying-course': acp } + }) }} + From 38deaf6f3694ca7519104001f91114a4876e1986 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 11 Jul 2022 16:17:38 +0200 Subject: [PATCH 0003/1067] remove outdated deprecated message --- src/Bundle/ChillMainBundle/Routing/MenuTwig.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Routing/MenuTwig.php b/src/Bundle/ChillMainBundle/Routing/MenuTwig.php index bf59bfcb8..9772a916c 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuTwig.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuTwig.php @@ -56,8 +56,6 @@ class MenuTwig extends AbstractExtension implements ContainerAwareInterface * - layout: the layout. Absolute path needed (i.e.: ChillXyzBundle:section:foo.html.twig) * - activeRouteKey : the key active, will render the menu differently. * - * @deprecated link: see https://redmine.champs-libres.coop/issues/179 for more informations - * * @param string $menuId * @param mixed[] $params */ From a42d7231d94f4e8c148ac1981b6a18daf48a1d87 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 11 Jul 2022 17:23:34 +0200 Subject: [PATCH 0004/1067] not display flash menu if menu is empty --- src/Bundle/ChillMainBundle/Menu/quick_menu.html.twig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/Menu/quick_menu.html.twig b/src/Bundle/ChillMainBundle/Menu/quick_menu.html.twig index f431674c7..417e2b2d9 100644 --- a/src/Bundle/ChillMainBundle/Menu/quick_menu.html.twig +++ b/src/Bundle/ChillMainBundle/Menu/quick_menu.html.twig @@ -1,3 +1,4 @@ +{% if menus|length > 0 %} \ No newline at end of file + +{% endif %} From c2dd9ef6764373cc1cb7c4b8b649211b88f0e569 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Tue, 12 Jul 2022 09:37:16 +0200 Subject: [PATCH 0005/1067] wip --- .../Menu/AccompanyingCourseQuickMenuBuilder.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseQuickMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseQuickMenuBuilder.php index 5d0f95e14..6e13ecb97 100644 --- a/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseQuickMenuBuilder.php +++ b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseQuickMenuBuilder.php @@ -21,7 +21,8 @@ class AccompanyingCourseQuickMenuBuilder implements LocalMenuBuilderInterface ->addChild('Create a new activity in accompanying course', [ 'route' => 'chill_activity_activity_new', 'routeParameters' => [ - //'accompanying_course_id' => $accompanyingCourse->getId() + // 'activityType_id' => '', + 'accompanying_period_id' => $accompanyingCourse->getId() ] ]) ->setExtras([ From 1337360690d80e1d599eaf064b77e33084e5bfb9 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 24 May 2023 12:44:02 +0200 Subject: [PATCH 0006/1067] Fixed [search page] quickMenu: improve position and design, manage duplicate buttons --- .../ChillMainBundle/Menu/quick_menu.html.twig | 7 ++--- .../Menu/PersonQuickMenuBuilder.php | 27 ++++++++++++++----- .../public/chill/scss/flex_table.scss | 2 +- .../views/Person/list_with_period.html.twig | 7 +---- .../config/services/menu.yaml | 18 +++---------- 5 files changed, 30 insertions(+), 31 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Menu/quick_menu.html.twig b/src/Bundle/ChillMainBundle/Menu/quick_menu.html.twig index 417e2b2d9..ec0a21181 100644 --- a/src/Bundle/ChillMainBundle/Menu/quick_menu.html.twig +++ b/src/Bundle/ChillMainBundle/Menu/quick_menu.html.twig @@ -1,11 +1,12 @@ {% if menus|length > 0 %}
  • - -
  • - {% endif %} {% endmacro %} {% macro accompanying_period(acp, person) %} @@ -194,7 +189,7 @@ {% endif %} -