From c1446cc1224ff0d0fd61b91edc3d52f15461a582 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 | 34 ++++++++++++++++++++------ 2 files changed, 44 insertions(+), 20 deletions(-) diff --git a/combo/apps/family/templates/family/infos.html b/combo/apps/family/templates/family/infos.html index e2c0436..06f81c5 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..a9801ae 100644 --- a/combo/apps/family/templates/family/person.html +++ b/combo/apps/family/templates/family/person.html @@ -1,15 +1,35 @@ {% 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 %}

{% trans "Email:" %} {{ person.email }}

{% endif %} +
+{% if person.phone %} +

+ {% trans "Phone:" %} + +

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

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

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