Improving navigation

This commit is contained in:
Marc Ducobu 2014-11-11 16:57:21 +01:00
parent 06ae186427
commit eb29131957
2 changed files with 46 additions and 16 deletions

View File

@ -8,32 +8,36 @@ chill_person_view:
person: person:
order: 50 order: 50
label: Person View label: Person View
chill_person_general_edit: chill_person_general_edit:
pattern: /person/{person_id}/general/edit pattern: /person/{person_id}/general/edit
defaults: {_controller: ChillPersonBundle:Person:edit } defaults: {_controller: ChillPersonBundle:Person:edit }
chill_person_general_update: chill_person_general_update:
pattern: /person/{person_id}/general/update pattern: /person/{person_id}/general/update
defaults: {_controller: ChillPersonBundle:Person:update } defaults: {_controller: ChillPersonBundle:Person:update }
chill_person_new: chill_person_new:
pattern: /person/new pattern: /person/new
defaults: {_controller: ChillPersonBundle:Person:new } defaults: {_controller: ChillPersonBundle:Person:new }
chill_person_review: chill_person_review:
pattern: /person/review pattern: /person/review
defaults: {_controller: ChillPersonBundle:Person:review } defaults: {_controller: ChillPersonBundle:Person:review }
chill_person_create: chill_person_create:
pattern: /person/create pattern: /person/create
defaults: {_controller: ChillPersonBundle:Person:create } defaults: {_controller: ChillPersonBundle:Person:create }
chill_person_search: chill_person_search:
pattern: /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: chill_person_history_list:
pattern: /person/{person_id}/history pattern: /person/{person_id}/history
defaults: { _controller: ChillPersonBundle:History:list } defaults: { _controller: ChillPersonBundle:History:list }
@ -42,24 +46,23 @@ chill_person_history_list:
person: person:
order: 100 order: 100
label: menu.person.history label: menu.person.history
chill_person_history_create: chill_person_history_create:
pattern: /person/{person_id}/history/create pattern: /person/{person_id}/history/create
defaults: { _controller: ChillPersonBundle:History:create } defaults: { _controller: ChillPersonBundle:History:create }
chill_person_history_update: chill_person_history_update:
pattern: /person/history/{history_id}/update pattern: /person/history/{history_id}/update
defaults: { _controller: ChillPersonBundle:History:update } defaults: { _controller: ChillPersonBundle:History:update }
chill_person_history_close: chill_person_history_close:
pattern: /person/{person_id}/history/close pattern: /person/{person_id}/history/close
defaults: { _controller: ChillPersonBundle:History:close } defaults: { _controller: ChillPersonBundle:History:close }
chill_person_history_open: chill_person_history_open:
pattern: /person/{person_id}/history/open pattern: /person/{person_id}/history/open
defaults: { _controller: ChillPersonBundle:History:open } defaults: { _controller: ChillPersonBundle:History:open }
chill_person_admin: chill_person_admin:
pattern: /admin/person pattern: /admin/person
defaults: { _controller: ChillPersonBundle:Admin:index } defaults: { _controller: ChillPersonBundle:Admin:index }

View File

@ -8,7 +8,7 @@
{% endstylesheets %} {% endstylesheets %}
{% endblock %} {% endblock %}
{% block content %} {% block layout_content %}
<div id="person_wrapper"> <div id="person_wrapper">
<div id="general"> <div id="general">
<h1> <h1>
@ -38,6 +38,33 @@
</div> </div>
<div id="person_details"> <div id="person_details">
{# Flash messages ! #}
<div class="container">
{% for flashMessage in app.session.flashbag.get('success') %}
<div class="grid-8 centered success">
<span>
{{ flashMessage|raw }}
</span>
</div>
{% endfor %}
{% for flashMessage in app.session.flashbag.get('danger') %}
<div class="grid-8 centered error">
<span>
{{ flashMessage|raw }}
</span>
</div>
{% endfor %}
{% for flashMessage in app.session.flashbag.get('info') %}
<div class="grid-8 centered notice">
<span>
{{ flashMessage|raw }}
</span>
</div>
{% endfor %}
</div>
<section class="container"> <section class="container">
{# Note: activeRouteKey should be defined in Controller or child layout #} {# Note: activeRouteKey should be defined in Controller or child layout #}
{{ chill_menu('person', { {{ chill_menu('person', {