{% extends 'userena/base_userena.html' %}
{% load i18n %}

{% block title %}{% blocktrans with profile.user.username as username %}{{ username }}'s profile.{% endblocktrans %}{% endblock %}
{% block content_title %}<h2>{{ profile.user.username }} {% if profile.user.get_full_name %}({{ profile.user.get_full_name }}){% endif %}</h2>{% endblock %}

{% block content %}
  <div class="white-box">
    {% block profile_navigation %}
      {# Dirty hack. Will use django-guardian in the future. #}
      {% if user.username == profile.user.username %}
        <ul id="box-nav">
          {% block profile_navigation_items %}
            <li><a href="{% url 'userena_profile_detail' user.username %}">{% trans "View profile" %}</a></li>
            <li><a href="{% url 'userena_profile_edit' user.username %}">{% trans "Edit details" %}</a></li>
            <li><a href="{% url 'userena_password_change' user.username %}">{% trans "Change password" %}</a></li>
            <li><a href="{% url 'userena_email_change' user.username %}">{% trans "Change email" %}</a></li>
          {% endblock %}
        </ul>
      {% endif %}
    {% endblock %}

    <div id="details">
      {% block profile_details %}
        <img class="mugshot" src="{{ profile.get_mugshot_url }}" alt="{% trans "Your mugshot" %}" />
        <dl>
          {% block profile_definition_list %}
            {% if profile.user.get_full_name %}
              <dt>{% trans "Name" %}</dt>
              <dd>{{ profile.user.get_full_name }}</dd>
            {% endif %}
            {% if profile.user.email and not hide_email %}
              <dt>{% trans "Email" %}</dt>
              <dd>{{ profile.user.email }}</dd>
            {% endif %}
            {% if profile.age %}
              <dt>{% trans "Age" %}</dt>
              <dd>{{ profile.age }}</dd>
            {% endif %}
            {% if profile.website %}
              <dt>{% trans "Website" %}</dt>
              <dd>{{ profile.website|urlize }}</dd>
            {% endif %}
            {% if profile.location %}
              <dt>{% trans "Location" %}</dt>
              <dd>{{ profile.location }}</dd>
            {% endif %}
            {% if profile.about_me %}
              <dt>{% trans "About me" %}</dt>
              <dd>{{ profile.about_me }}</dd>
            {% endif %}
          {% endblock %}
        </dl>
      {% endblock %}
    </div>
  </div>
{% endblock %}
