mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
upgrade views, menus, routing
This commit is contained in:
@@ -1,31 +1,32 @@
|
||||
|
||||
|
||||
chill_person_view:
|
||||
pattern: /view/{id}
|
||||
pattern: /person/view/{person_id}/general
|
||||
defaults: { _controller: ChillPersonBundle:Person:view }
|
||||
options:
|
||||
menu: person
|
||||
order: 50
|
||||
label: menu.person.general_view
|
||||
menus:
|
||||
person:
|
||||
order: 50
|
||||
label: Person View
|
||||
|
||||
chill_person_general_edit:
|
||||
pattern: /view/{id}/edit
|
||||
pattern: /person/view/{person_id}/edit
|
||||
defaults: {_controller: ChillPersonBundle:Person:edit }
|
||||
|
||||
chill_person_general_update:
|
||||
pattern: /view/{id}/update
|
||||
pattern: /person/view/{person_id}/update
|
||||
defaults: {_controller: ChillPersonBundle:Person:update }
|
||||
|
||||
chill_person_new:
|
||||
pattern: /new
|
||||
pattern: /person/new
|
||||
defaults: {_controller: ChillPersonBundle:Person:new }
|
||||
|
||||
chill_person_review:
|
||||
pattern: /review
|
||||
pattern: /person/review
|
||||
defaults: {_controller: ChillPersonBundle:Person:review }
|
||||
|
||||
chill_person_create:
|
||||
pattern: /create
|
||||
pattern: /person/create
|
||||
defaults: {_controller: ChillPersonBundle:Person:create }
|
||||
|
||||
|
||||
@@ -34,102 +35,37 @@ chill_person_search:
|
||||
defaults: { _controller: ChillPersonBundle:Person:search }
|
||||
|
||||
chill_person_history_list:
|
||||
pattern: /{id}/history
|
||||
pattern: /person/{person_id}/history
|
||||
defaults: { _controller: ChillPersonBundle:History:list }
|
||||
options:
|
||||
menu: person
|
||||
order: 100
|
||||
label: menu.person.history
|
||||
menus:
|
||||
person:
|
||||
order: 100
|
||||
label: menu.person.history
|
||||
|
||||
chill_person_history_create:
|
||||
pattern: /{personId}/history/create
|
||||
pattern: /person/{person_id}/history/create
|
||||
defaults: { _controller: ChillPersonBundle:History:create }
|
||||
|
||||
|
||||
chill_person_history_update:
|
||||
pattern: /{id}/history/{historyId}/update
|
||||
pattern: /person/{person_id}/history/{historyId}/update
|
||||
defaults: { _controller: ChillPersonBundle:History:update }
|
||||
|
||||
chill_person_history_close:
|
||||
pattern: /{id}/history/close
|
||||
pattern: /person/{person_id}/history/close
|
||||
defaults: { _controller: ChillPersonBundle:History:close }
|
||||
|
||||
chill_person_history_open:
|
||||
pattern: /{id}/history/open
|
||||
pattern: /person/{person_id}/history/open
|
||||
defaults: { _controller: ChillPersonBundle:History:open }
|
||||
|
||||
chill_person_admin:
|
||||
pattern: /admin
|
||||
defaults: { _controller: ChillPersonBundle:Admin:index }
|
||||
options:
|
||||
menu: admin
|
||||
order: 100
|
||||
label: menu.person.admin.index
|
||||
helper: menu.person.admin.helper
|
||||
|
||||
#sample admin_person menu:
|
||||
chill_person_admin_test_one:
|
||||
pattern: /admin/test_one
|
||||
defaults: { _controller: ChillPersonBundle:Admin:test }
|
||||
options:
|
||||
menu: admin_person
|
||||
order: 100
|
||||
label: menu.person.admin.test_one
|
||||
helper: menu.person.admin.helper_one
|
||||
|
||||
#sample
|
||||
chill_appointment_list:
|
||||
pattern: /view/{id}/appointment/list
|
||||
defaults: {_controller: ChillPersonBundle:Person:view}
|
||||
options:
|
||||
menu: person
|
||||
order: 200
|
||||
label: "Rendez-vous"
|
||||
|
||||
chill_prof_status_view:
|
||||
pattern: /view/{id}/prof/list
|
||||
defaults: {_controller: ChillPersonBundle:Person:view}
|
||||
options:
|
||||
menu: person
|
||||
order: 300
|
||||
label: "Statut Professionnel"
|
||||
|
||||
chill_admin_view:
|
||||
pattern: /view/{id}/administrative
|
||||
defaults: {_controller: ChillPersonBundle:Person:view}
|
||||
options:
|
||||
menu: person
|
||||
order: 400
|
||||
label: "Statut administratif"
|
||||
|
||||
chill_language:
|
||||
pattern: /view/{id}/language/list
|
||||
defaults: {_controller: ChillPersonBundle:Person:view}
|
||||
options:
|
||||
menu: person
|
||||
order: 500
|
||||
label: "Langues"
|
||||
|
||||
chill_studies:
|
||||
pattern: /view/{id}/studies
|
||||
defaults: {_controller: ChillPersonBundle:Person:view}
|
||||
options:
|
||||
menu: person
|
||||
order: 600
|
||||
label: "Études"
|
||||
|
||||
chill_notes:
|
||||
pattern: /view/{id}/notes
|
||||
defaults: {_controller: ChillPersonBundle:Person:view}
|
||||
options:
|
||||
menu: person
|
||||
order: 700
|
||||
label: "Informations"
|
||||
|
||||
chill_docs:
|
||||
pattern: /view/{id}/docs
|
||||
defaults: {_controller: ChillPersonBundle:Person:view}
|
||||
options:
|
||||
menu: person
|
||||
order: 800
|
||||
label: "Documents"
|
||||
options:
|
||||
menus:
|
||||
admin:
|
||||
order: 100
|
||||
label: menu.person.admin.index
|
||||
helper: menu.person.admin.helper
|
@@ -11,9 +11,12 @@ This view should receive those arguments:
|
||||
#}
|
||||
|
||||
{% block title %}ChillPersonBundle:Person:see{% endblock %}
|
||||
|
||||
{#
|
||||
we define variables to include an edit form repeated multiple time across
|
||||
the page
|
||||
#}
|
||||
{% set edit_tmp_name = 'ChillPersonBundle:Form:go_to_form.html.twig' %}
|
||||
{% set edit_tmp_args = { 'form_path_args' : { 'id': person.id },
|
||||
{% set edit_tmp_args = { 'form_path_args' : { 'person_id': person.id },
|
||||
'form_path_key' : 'chill_person_general_edit' } %}
|
||||
|
||||
|
||||
@@ -67,22 +70,6 @@ This view should receive those arguments:
|
||||
|
||||
{{ include(edit_tmp_name, edit_tmp_args) }}
|
||||
|
||||
<figure>
|
||||
<h2>{{ 'views.Person.view.family'|trans }}</h2>
|
||||
|
||||
<dl>
|
||||
<dt class="inline">{{ 'views.Person.view.civil_union'|trans }}</dt>
|
||||
<dd>{{ ('person.civil_union.' ~ person.civilUnion)|trans }}</dd>
|
||||
|
||||
<dt class="inline">{{ 'views.Person.view.nb_of_childs'|trans }}</dt>
|
||||
<dd>{% transchoice person.nbOfChild with { '%nb%': person.nbOfChild } %}views.Person.view.nb_of_childs_count{% endtranschoice %}</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
</figure>
|
||||
|
||||
{{ include(edit_tmp_name, edit_tmp_args) }}
|
||||
|
||||
<figure>
|
||||
<h2>{{ 'views.Person.view.administrative'|trans }}</h2>
|
||||
|
||||
@@ -95,12 +82,7 @@ This view should receive those arguments:
|
||||
{{ 'views.Person.view.without_nationality'|trans }}
|
||||
{% endif %}
|
||||
|
||||
</dd>
|
||||
|
||||
<dt class="inline">{{ 'views.Person.view.national_number'|trans }}</dt>
|
||||
<dd>{{ person.belgianNationalNumber }}</dd>
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</figure>
|
||||
@@ -111,8 +93,6 @@ This view should receive those arguments:
|
||||
<h2>{{ 'views.Person.view.contact'|trans }}</h2>
|
||||
|
||||
<dl>
|
||||
<dt class="inline">{{ 'views.Person.view.address'|trans }}</dt>
|
||||
<dd><pre>{{ person.address}} </pre></dd>
|
||||
|
||||
<dt class="inline">{{ 'views.Person.view.email'|trans }}</dt>
|
||||
<dd><pre>{{ person.email}} </pre></dd>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{% extends "CLChillMainBundle::layout.html.twig" %}
|
||||
{% extends "ChillMainBundle::layout.html.twig" %}
|
||||
|
||||
{% block css %}
|
||||
|
||||
@@ -45,12 +45,11 @@
|
||||
|
||||
<section class="tabs vertical">
|
||||
{# Note: activeRouteKey should be defined in Controller or child layout #}
|
||||
{{ render(controller("CLChillMainBundle:Menu:writeMenu", {
|
||||
'menu' : 'person',
|
||||
{{ chill_menu('person', {
|
||||
'layout': 'ChillPersonBundle::menu.html.twig',
|
||||
'args' : {'id': person.id },
|
||||
'args' : {'person_id': person.id },
|
||||
'activeRouteKey': activeRouteKey
|
||||
})) }}
|
||||
}) }}
|
||||
|
||||
<div class="tab-content active columns height">
|
||||
|
||||
|
@@ -1,12 +1,12 @@
|
||||
<div class="columns four">
|
||||
<ul class="tab-nav follow-href-path">
|
||||
{% for menu in menu_composer.getRoutesFor(menu) %}
|
||||
{% for route in routes %}
|
||||
<li class="{% spaceless %}
|
||||
{% if menu.route == activeRouteKey %}
|
||||
{% if route.key == activeRouteKey %}
|
||||
active
|
||||
{% endif %}
|
||||
{% endspaceless %} ">
|
||||
<a href="{{ path(menu.route, args) }}" >{{ menu.label|trans }}</a>
|
||||
<a href="{{ path(route.key, args ) }}" >{{ route.label|trans }}</a>
|
||||
</li>
|
||||
|
||||
{% endfor %}
|
||||
|
Reference in New Issue
Block a user