From eb2913195764997a8a9db54118da8e4054533118 Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Tue, 11 Nov 2014 16:57:21 +0100 Subject: [PATCH] Improving navigation --- Resources/config/routing.yml | 33 +++++++++++++++++--------------- Resources/views/layout.html.twig | 29 +++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/Resources/config/routing.yml b/Resources/config/routing.yml index 301f1e027..6a5fa05d4 100644 --- a/Resources/config/routing.yml +++ b/Resources/config/routing.yml @@ -8,32 +8,36 @@ chill_person_view: person: order: 50 label: Person View - + chill_person_general_edit: pattern: /person/{person_id}/general/edit defaults: {_controller: ChillPersonBundle:Person:edit } - + chill_person_general_update: pattern: /person/{person_id}/general/update defaults: {_controller: ChillPersonBundle:Person:update } - + chill_person_new: pattern: /person/new defaults: {_controller: ChillPersonBundle:Person:new } - + chill_person_review: pattern: /person/review defaults: {_controller: ChillPersonBundle:Person:review } - + chill_person_create: pattern: /person/create defaults: {_controller: ChillPersonBundle:Person:create } - - + chill_person_search: pattern: /search - defaults: { _controller: ChillPersonBundle:Person:search } - + defaults: { _controller: ChillPersonBundle:Person:search } + options: + menus: + main: + order: 30 + label: Chercher une personne + chill_person_history_list: pattern: /person/{person_id}/history defaults: { _controller: ChillPersonBundle:History:list } @@ -42,24 +46,23 @@ chill_person_history_list: person: order: 100 label: menu.person.history - + chill_person_history_create: pattern: /person/{person_id}/history/create defaults: { _controller: ChillPersonBundle:History:create } - chill_person_history_update: pattern: /person/history/{history_id}/update - defaults: { _controller: ChillPersonBundle:History:update } - + defaults: { _controller: ChillPersonBundle:History:update } + chill_person_history_close: pattern: /person/{person_id}/history/close defaults: { _controller: ChillPersonBundle:History:close } - + chill_person_history_open: pattern: /person/{person_id}/history/open defaults: { _controller: ChillPersonBundle:History:open } - + chill_person_admin: pattern: /admin/person defaults: { _controller: ChillPersonBundle:Admin:index } diff --git a/Resources/views/layout.html.twig b/Resources/views/layout.html.twig index f30c42eda..d4dcbd5bd 100644 --- a/Resources/views/layout.html.twig +++ b/Resources/views/layout.html.twig @@ -8,7 +8,7 @@ {% endstylesheets %} {% endblock %} -{% block content %} +{% block layout_content %}

@@ -38,6 +38,33 @@

+ {# Flash messages ! #} +
+ {% for flashMessage in app.session.flashbag.get('success') %} +
+ + {{ flashMessage|raw }} + +
+ {% endfor %} + + {% for flashMessage in app.session.flashbag.get('danger') %} +
+ + {{ flashMessage|raw }} + +
+ {% endfor %} + + {% for flashMessage in app.session.flashbag.get('info') %} +
+ + {{ flashMessage|raw }} + +
+ {% endfor %} +
+
{# Note: activeRouteKey should be defined in Controller or child layout #} {{ chill_menu('person', {