agenda: better display of patient contacts phone numbers.

This commit is contained in:
Mikaël Ates 2013-01-06 23:32:51 +01:00
parent a22b9e7424
commit 896dc77c64
1 changed files with 16 additions and 3 deletions

View File

@ -58,11 +58,24 @@
{% endif %}
{% if appointment.patient_record_id %}
<p class="phones">
{% if appointment.patient.mobile %}
<span title="{{ appointment.patient.first_name }} {{ appointment.patient.last_name|upper }} (Patient - Perso)" class="icon-user-space">
{{ appointment.patient.mobile }}
</span>
{% endif %}
{% if appointment.patient.phone %}
<span title="{{ appointment.patient.first_name }} {{ appointment.patient.last_name|upper }} (Patient - Pro)" class="icon-user-space">
{{ appointment.patient.phone }}
</span>
{% endif %}
{% for address in appointment.patient.addresses.all %}
{% if address.place_of_life and address.phone %}
<span title="{{ address.number }} {{ address.street }} {{ address.zip_code }} {{ address.city }}" class="icon-home-space">{{ address.phone }}</span>
{% if address.place_of_life %}
{% if address.phone %}<span title="{{ address.number }} {{ address.street }} {{ address.zip_code }} {{ address.city }}" class="icon-home-space">{{ address.phone }}</span>{% endif %}
{% for contact in address.patientcontact_set.all %}
<span title="{{ contact.first_name }} {{ contact.last_name|upper }}" class="icon-user-space">{{ contact.mobile }}</span>
{% if contact.id != appointment.patient.id %}
{% if contact.mobile %}<span title="{{ contact.first_name }} {{ contact.last_name|upper }} (Perso)" class="icon-user-space">{{ contact.mobile }}</span>{% endif %}
{% if contact.phone %}<span title="{{ contact.first_name }} {{ contact.last_name|upper }} (Pro)" class="icon-user-space">{{ contact.phone }}</span>{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}