68 lines
1.7 KiB
HTML
68 lines
1.7 KiB
HTML
{% load i18n %}
|
|
<h2>{% trans "Informations related to your family" %}</h2>
|
|
<div>
|
|
{% if not user.is_authenticated %}
|
|
<p>{% trans "You have to connect and link your account to a family." %}</p>
|
|
|
|
{% elif error %}
|
|
<p>{{error}}</p>
|
|
|
|
{% elif not family.data %}
|
|
<p>{% trans "No family linked to your account." %}</p>
|
|
{% url 'family-link' as link_url %}
|
|
<p>
|
|
{% blocktrans %}
|
|
If you have family credentials, please
|
|
<a href="{{ link_url }}" rel="popup">click here</a> to link your personal
|
|
account to it.
|
|
{% endblocktrans %}
|
|
</p>
|
|
|
|
{% else %}
|
|
<div class="family_unlink">
|
|
<a href="{% url 'family-unlink' %}" rel="popup">{% trans "Unlink" %}</a>
|
|
</div>
|
|
{% with data=family.data %}
|
|
{% if data.address or data.quotient %}
|
|
<div class="family-data">
|
|
{% if data.address %}
|
|
<div class="address">
|
|
<h4>{% trans "Address" %}</h4>
|
|
<p>{{ data.address }}</p>
|
|
</div>
|
|
{% endif %}
|
|
{% if data.quotient %}
|
|
<p class="family-quotient">
|
|
<span class="label">{% trans "Family quotient:" %}</span>
|
|
<span class="value">{{ data.quotient }}</span>
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
<div class="family_members">
|
|
{% if data.adults %}
|
|
<div class="family_adults">
|
|
<h3>{% trans "Adults" %}</h3>
|
|
{% for adult in data.adults %}
|
|
<div>
|
|
{% include 'family/person.html' with person=adult %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if data.children %}
|
|
<div class="family_children">
|
|
<h3>{% trans "Children" %}</h3>
|
|
{% for child in data.children %}
|
|
<div>
|
|
{% include 'family/person.html' with person=child %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endwith %}
|
|
{% endif %}
|
|
</div>
|