From a91ce5fe4f7f7a0e11d13ea80a90f457f437c548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 24 Mar 2016 15:02:08 +0100 Subject: [PATCH 1/3] fix bug in validation close #21 --- Resources/config/validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/config/validation.yml b/Resources/config/validation.yml index 90ebf28e0..e214de89a 100644 --- a/Resources/config/validation.yml +++ b/Resources/config/validation.yml @@ -1,4 +1,4 @@ -Chill\EventBundle\Event\Participation: +Chill\EventBundle\Entity\Participation: properties: event: - NotNull: ~ From 372cae7008428561b94c1bc7ef99d99944fd1ee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 24 Mar 2016 15:18:50 +0100 Subject: [PATCH 2/3] show always the form "add a participant" even if no participation yet --- Resources/views/Event/show.html.twig | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/Resources/views/Event/show.html.twig b/Resources/views/Event/show.html.twig index e28fec753..8c47ab42c 100644 --- a/Resources/views/Event/show.html.twig +++ b/Resources/views/Event/show.html.twig @@ -75,18 +75,22 @@ - + {% endif %} + + {% endblock %} From 8db8c8925cc10e27e76f0399d844494c9ebd27d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 24 Mar 2016 15:19:23 +0100 Subject: [PATCH 3/3] add a link into section menu Currently, the main link in section menu redirect to a search which display the last events ref #10 --- Controller/EventController.php | 8 ++++++++ Entity/Participation.php | 1 + Resources/config/routing/event.yml | 10 ++++++++++ Resources/translations/messages.fr.yml | 7 ++++++- Resources/views/Event/list.html.twig | 10 +++++++++- 5 files changed, 34 insertions(+), 2 deletions(-) diff --git a/Controller/EventController.php b/Controller/EventController.php index bb73708a2..ec3f5a3d5 100644 --- a/Controller/EventController.php +++ b/Controller/EventController.php @@ -34,6 +34,14 @@ class EventController extends Controller 'entities' => $entities, )); } + + public function mostRecentIndexAction() + { + return $this->redirectToRoute('chill_main_search', array( + 'q' => '@event' + )); + } + /** * Creates a new Event entity. * diff --git a/Entity/Participation.php b/Entity/Participation.php index ef33c6b99..3aa52313c 100644 --- a/Entity/Participation.php +++ b/Entity/Participation.php @@ -231,6 +231,7 @@ class Participation implements HasCenterInterface, HasScopeInterface ->atPath('status') ->addViolation(); } + var_dump('ok'); } } diff --git a/Resources/config/routing/event.yml b/Resources/config/routing/event.yml index 84d775aab..87781f06f 100644 --- a/Resources/config/routing/event.yml +++ b/Resources/config/routing/event.yml @@ -1,6 +1,16 @@ event: path: / defaults: { _controller: "ChillEventBundle:Event:index" } + +chill_event_list_most_recent: + path: most_recent + defaults: { _controller: "ChillEventBundle:Event:mostRecentIndex" } + options: + menus: + section: + order: 90 + label: Events + icons: [calendar] event_show: path: /{event_id}/show diff --git a/Resources/translations/messages.fr.yml b/Resources/translations/messages.fr.yml index 91e7e1ea8..a456de1ee 100644 --- a/Resources/translations/messages.fr.yml +++ b/Resources/translations/messages.fr.yml @@ -4,14 +4,18 @@ Date: Date Event type : Type d'événement See: Voir Event: Événement +Events: Événements 'Event : %label%': Événement "%label%" Participation: Participation Status: Statut Last update: Dernière mise à jour '%count% participations to this event': '{0} Aucun participant à l''événement | {1} Un participant à l''événement | ]1,Inf] %count% participants à l''événement' -#CRUD +#CRUD event Details of an event: Détails d'un événement +New event: Nouvel événement + +#crud participation Edit all the participations: Modifier toutes les participations Add a participation: Ajouter un participant Participation creation: Ajouter une participation @@ -20,6 +24,7 @@ Associated event: Événement associé Back to the event: Retour à l'événement The participation was created: La participation a été créée The participation was updated: La participation a été mise à jour +Participation Edit: Modifier une participation #search Event search: Recherche d'événements diff --git a/Resources/views/Event/list.html.twig b/Resources/views/Event/list.html.twig index f7338fd98..38196122a 100644 --- a/Resources/views/Event/list.html.twig +++ b/Resources/views/Event/list.html.twig @@ -40,4 +40,12 @@ -{% endif %} \ No newline at end of file +{% endif %} + + \ No newline at end of file