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:
@@ -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