From ed2bd2f25eda6ce7c233723b15c68b4102760920 Mon Sep 17 00:00:00 2001 From: Serghei Mihai Date: Fri, 11 Aug 2017 18:44:02 +0200 Subject: [PATCH] family: update family infos template (#16181) In order to allow better styling. --- combo/apps/family/templates/family/infos.html | 30 +++++++++++++++----------- combo/apps/family/templates/family/person.html | 13 +++++++---- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/combo/apps/family/templates/family/infos.html b/combo/apps/family/templates/family/infos.html index e2c0436..ff80b07 100644 --- a/combo/apps/family/templates/family/infos.html +++ b/combo/apps/family/templates/family/infos.html @@ -24,22 +24,26 @@ {% with data=family.data %} - {% if data.adults %} + {% if data.adults %} +

{% trans "Adults" %}

- - {% endif %} + {% for adult in data.adults %} +
+ {% include 'family/person.html' with person=adult %} +
+ {% endfor %} +
+ {% endif %} - {% if data.children %} + {% if data.children %} +

{% trans "Children" %}

- + {% for child in data.children %} +
+ {% include 'family/person.html' with person=child %} +
+ {% endfor %} +
{% endif %} {% endwith %} {% endif %} diff --git a/combo/apps/family/templates/family/person.html b/combo/apps/family/templates/family/person.html index 8493709..fd9e821 100644 --- a/combo/apps/family/templates/family/person.html +++ b/combo/apps/family/templates/family/person.html @@ -1,15 +1,20 @@ {% load i18n %}

{{ person.first_name }} {{ person.last_name }}

+{% if person.birthdate %}

-{% trans "Born on" %} {{ person.birthdate }} + {% trans "Born on" %} {{ person.birthdate }}

+{% endif %} -

{% trans "Address" %}

-

{% trans "Address:" %} {{ person.address }}

+
+

{% trans "Address" %}

+

{{ person.address }}

+
{% if person.phone or person.cellphone or person.email %} -

{% trans "Contact" %}

+
{% if person.phone %}

{% trans "Phone:" %} {{ person.phone }}

{% endif %} {% if person.cellphone %}

{% trans "Cellphone:" %} {{ person.cellphone }}

{% endif %} {% if person.email %}{% endif %} +
{% endif %} -- 2.14.1