Projet

Général

Profil

0001-family-update-family-infos-template-16181.patch

Serghei Mihai, 11 août 2017 18:48

Télécharger (2,89 ko)

Voir les différences:

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(-)
combo/apps/family/templates/family/infos.html
24 24
  </div>
25 25

  
26 26
  {% with data=family.data %}
27
    {% if data.adults %}
27
  {% if data.adults %}
28
  <div id="family_adults">
28 29
    <h3>{% trans "Adults" %}</h3>
29
    <ul>
30
      {% for adult in data.adults %}
31
      <li>{% include 'family/person.html' with person=adult %}</li>
32
      {% endfor %}
33
    </ul>
34
    {% endif %}
30
    {% for adult in data.adults %}
31
    <div class="adult">
32
      {% include 'family/person.html' with person=adult %}
33
    </div>
34
    {% endfor %}
35
  </div>
36
  {% endif %}
35 37

  
36
    {% if data.children %}
38
  {% if data.children %}
39
  <div id="family_children">
37 40
    <h3>{% trans "Children" %}</h3>
38
    <ul>
39
      {% for child in data.children %}
40
      <li>{% include 'family/person.html' with person=child %}</li>
41
      {% endfor %}
42
    </ul>
41
    {% for child in data.children %}
42
    <div class="child">
43
      {% include 'family/person.html' with person=child %}
44
    </div>
45
    {% endfor %}
46
  </div>
43 47
    {% endif %}
44 48
  {% endwith %}
45 49
  {% endif %}
combo/apps/family/templates/family/person.html
1 1
{% load i18n %}
2 2
<p class="name"><span>{{ person.first_name }} {{ person.last_name }}</span></p>
3
{% if person.birthdate %}
3 4
<p class="birthdate">
4
<span>{% trans "Born on" %}</span> {{ person.birthdate }}
5
  <span>{% trans "Born on" %}</span> {{ person.birthdate }}
5 6
</p>
7
{% endif %}
6 8

  
7
<h4>{% trans "Address" %}</h4>
8
<p class="address"><span>{% trans "Address:" %}</span> {{ person.address }}</p>
9
<div class="address">
10
  <h4>{% trans "Address" %}</h4>
11
  <p class="address">{{ person.address }}</p>
12
</div>
9 13

  
10 14
{% if person.phone or person.cellphone or person.email %}
11
<h4>{% trans "Contact" %}</h4>
15
<div class="contact">
12 16
{% if person.phone %}<p class='phone'><span>{% trans "Phone:" %}</span> {{ person.phone }}</p>{% endif %}
13 17
{% if person.cellphone %}<p class='cellphone'><span>{% trans "Cellphone:" %}</span> {{ person.cellphone }}</p>{% endif %}
14 18
{% if person.email %}<p class='email'><span>{% trans "Email:" %}</span> {{ person.email }}</p>{% endif %}
19
</div>
15 20
{% endif %}
16
-