mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
show memo in person details + minor fixes
The memo is shown only if not empty. minor fixes : - re-add label 'country of birth' on view page - set title to pages
This commit is contained in:
parent
4e4f45e2bc
commit
90f579d88a
@ -68,6 +68,7 @@ Reset: 'Remise à zéro'
|
||||
'Create accompanying period': 'Nouvelle ouverture-fermeture à une autre date'
|
||||
'Closing motive': 'Motif de clôture'
|
||||
'Person details': 'Détails de la personne'
|
||||
'Update details for %name%': 'Modifier détails de %name%'
|
||||
Accompanying period list: Périodes d'accompagnement
|
||||
|
||||
#timeline
|
||||
|
@ -18,14 +18,21 @@
|
||||
|
||||
{% set activeRouteKey = '' %}
|
||||
|
||||
{% block title %}ChillPersonBundle:Person:see{% endblock %}
|
||||
{% block title %}{{ 'Update details for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName } )|capitalize }}{% endblock %}
|
||||
|
||||
{% block personcontent %}
|
||||
|
||||
<h1>{{ 'Update details for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName|capitalize } ) }}</h1>
|
||||
|
||||
{% form_theme form 'ChillMainBundle:Form:fields.html.twig' %}
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
<fieldset>
|
||||
<legend><h2>{{ 'Memo'|trans }}</h2></legend>
|
||||
{{ form_row(form.memo, {'label' : 'Memo'} ) }}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><h2>{{ 'General information'|trans }}</h2></legend>
|
||||
{{ form_row(form.firstName, {'label' : 'First name'}) }}
|
||||
@ -54,7 +61,6 @@
|
||||
|
||||
</fieldset>
|
||||
|
||||
{{ form_row(form.memo, {'label' : 'Memo'} ) }}
|
||||
|
||||
{{ form_rest(form) }}
|
||||
|
||||
|
@ -23,7 +23,8 @@ This view should receive those arguments:
|
||||
- person
|
||||
#}
|
||||
|
||||
{% block title %}ChillPersonBundle:Person:see{% endblock %}
|
||||
{% block title %}{{ 'Person details'|trans|capitalize ~ ' ' ~ person.firstName|capitalize ~
|
||||
' ' ~ person.lastName }}{% endblock %}
|
||||
{#
|
||||
we define variables to include an edit form repeated multiple time across
|
||||
the page
|
||||
@ -34,8 +35,21 @@ This view should receive those arguments:
|
||||
|
||||
|
||||
{% block personcontent %}
|
||||
|
||||
|
||||
|
||||
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
|
||||
{% if person.memo is not empty %}
|
||||
<div class="grid-12">
|
||||
<figure class="person-details">
|
||||
<h2 class="chill-red">{{ 'Memo'|trans|upper }}</h2>
|
||||
|
||||
<p>
|
||||
<blockquote>{{ person.memo|nl2br }}</blockquote>
|
||||
</p>
|
||||
</figure>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="grid-6">
|
||||
<figure class="person-details">
|
||||
<h2 class="chill-red">{{ 'General information'|trans|upper }}</h2>
|
||||
@ -74,6 +88,7 @@ This view should receive those arguments:
|
||||
|
||||
<dt>{{ 'Place of birth'|trans }} :</dt>
|
||||
<dd>{{ person.placeOfBirth }}</dd>
|
||||
<dt>{{ 'Country of birth'|trans }} :</dt>
|
||||
<dd>{% spaceless %}
|
||||
{% if person.countryOfBirth is not null %}
|
||||
{{ person.countryOfBirth.name|localize_translatable_string }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user