{% extends host_template %}

{% load comments i18n fb_versions cyclope_utils markup dbgettext_tags%}

{% block content %}

{% alias contact as 'current_object' %}

<div class="content-view contact detail contact-detail">
  <h1 class="title">{{contact}}</h1>

  <!-- herramientas -->
  <div class="tools meta-content">
    <ul>
      <li class="first"><a href="javascript:window.print()" class="print">{% trans "Print" %}</a></li>
      {% if contact.email %}
      <li><a href="mailto:{{contact.email}}">{% trans "Send mail" %}</a></li>
      {% endif %}
    </ul>
  </div>
  <!-- /herramientas -->


  {% if contact.photo %}
  <img class="contact_photo" src="{% version contact.photo 'cropped' %}" />
  {% endif %}

<div class="contact_teaser_detail">
    <div class="details-list">
        <div>{% trans "Given name" %}: <span>{{contact.given_name}}</span></div>
        <div>{% trans "Surname" %}: <span>{{contact.surname}}</span></div>
        <div>{% trans "Birth date" %}: <span>{{contact.birth_date|default:""}}</span></div>
        <div>{% trans "Gender" %}: <span>{{contact.get_gender_display}}</span></div>
        <div>{% trans "Email" %}: <span>{{contact.email}}</span></div>
        <div>{% trans "Web" %}: <span>{{contact.web}}</span></div>
        <div>{% trans "Mobile" %}: <span>{{contact.mobile_phone_number}}</span></div>
    </div>
  {% if contact.contactaddress_set.all %}

  <div class="address-list">
    {% for address in contact.contactaddress_set.all %}
    <div class="address {{address.type}}">
        <div id="address-type">{{address.get_type_display}}</div>
        <div class="field"><div class="field-name">{% trans "Address" %}:</div> <div class="field-value">{{address}}</div></div>
        <div class="field"><div class="field-name">{% trans "Post Office Box" %}:</div> <div class="field-value">{{address.post_office_box}}</div></div>
        <div class="field"><div class="field-name">{% trans "Phone Number" %}:</div> <div class="field-value">{{address.phone_number}}</div></div>
    </div>
    {% endfor %}
  </div>
  {% endif %}

  <div class="profile">
  {% if contact.has_profile %}

    {% with contact.get_profile as profile %}
        {% include CYCLOPE_CONTACTS_PROFILE_TEMPLATE %}
    {% endwith %}
  {% endif %}
  </div>

  {% if contact.tags %}
    <div class="meta-content"><span class="tags"><span class="tags-label">{% trans "Tags" %}</span> {{ contact.tags }}</span></div>
  {% endif %}

  <div>{% trans "Last update" %}: {{contact.modification_date}}</div>
  <div class="meta-content">{% include 'collections/categories_navigation_block.html' %}</div>
  </div>
  </div>
{% endblock content%}
