diff --git a/Controller/EventController.php b/Controller/EventController.php index 8d08f281f..ca0460c14 100644 --- a/Controller/EventController.php +++ b/Controller/EventController.php @@ -91,21 +91,21 @@ class EventController extends Controller * Finds and displays a Event entity. * */ - public function showAction($id) + public function showAction($event_id) { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository('ChillEventBundle:Event')->find($id); + $entity = $em->getRepository('ChillEventBundle:Event')->find($event_id); if (!$entity) { throw $this->createNotFoundException('Unable to find Event entity.'); } - $deleteForm = $this->createDeleteForm($id); + $this->denyAccessUnlessGranted('CHILL_EVENT_SEE_DETAILS', $entity, + "You are not allowed to see details on this event"); return $this->render('ChillEventBundle:Event:show.html.twig', array( - 'entity' => $entity, - 'delete_form' => $deleteForm->createView(), + 'event' => $entity )); } diff --git a/Resources/config/routing/event.yml b/Resources/config/routing/event.yml index cd3573f4e..84d775aab 100644 --- a/Resources/config/routing/event.yml +++ b/Resources/config/routing/event.yml @@ -3,7 +3,7 @@ event: defaults: { _controller: "ChillEventBundle:Event:index" } event_show: - path: /{id}/show + path: /{event_id}/show defaults: { _controller: "ChillEventBundle:Event:show" } event_new: diff --git a/Resources/translations/messages.fr.yml b/Resources/translations/messages.fr.yml index d579fd3a2..90a759f7c 100644 --- a/Resources/translations/messages.fr.yml +++ b/Resources/translations/messages.fr.yml @@ -3,8 +3,17 @@ Name: Nom Date: Date Event type : Type d'événement See: Voir +Event: Événement +'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 +Details of an event: Détails d'un événement +Edit all the participations: Modifier toutes les participations #search Event search: Recherche d'événements diff --git a/Resources/views/Event/list.html.twig b/Resources/views/Event/list.html.twig index 9e158b285..f7338fd98 100644 --- a/Resources/views/Event/list.html.twig +++ b/Resources/views/Event/list.html.twig @@ -22,11 +22,11 @@