feat: render multiple addresses

This commit is contained in:
Himanshu Warekar 2019-08-08 23:34:34 +05:30
parent 9335cdd536
commit 224c2ddaf4

View File

@ -14,19 +14,30 @@
style="margin-top:-3px; margin-right: -5px;">
{%= __("Edit") %}</a>
</p>
{% if (contact_list[i].phone || contact_list[i].mobile_no ||
contact_list[i].email_id) { %}
{% if (contact_list[i].phones || contact_list[i].email_ids) { %}
<p>
{% if(contact_list[i].phone) { %}
{%= __("Phone") %}: {%= contact_list[i].phone %}<br>
{% } %}
{% if(contact_list[i].mobile_no) { %}
{%= __("Mobile No.") %}: {%= contact_list[i].mobile_no %}<br>
{% } %}
{% if(contact_list[i].email_id) { %}
{%= __("Email Address") %}: {%= contact_list[i].email_id %}
{% } %}
{% if(contact_list[i].phone) { %}
{%= __("Phone ") %}: <b>{%= contact_list[i].phone %}</b><br>
{% endif %}
{% if(contact_list[i].phones) { %}
{% for(var j=0, k=contact_list[i].phones.length; j<k; j++) { %}
{%= __("Phone ") %}: {%= contact_list[i].phones[j].phone %}<br>
{% } %}
{% endif %}
</p>
<p>
{% if(contact_list[i].email_id) { %}
{%= __("Email ") %}: <b>{%= contact_list[i].email_id %}</b><br>
{% endif %}
{% if(contact_list[i].email_ids) { %}
{% for(var j=0, k=contact_list[i].email_ids.length; j<k; j++) { %}
{%= __("Email ") %}: {%= contact_list[i].email_ids[j].email_id %}<br>
{% } %}
{% endif %}
</p>
{% endif %}
{% if (contact_list[i].address) { %}
{%= __("Address ") %}: {%= contact_list[i].address %}<br>
{% endif %}
</div>
{% } %}