{% extends "forum/base.html" %}
{% load i18n %}

{% block forum_content %}
<div class="user_profile">
    <header>
        <h3>
            {% if profile %}
            <a href='{{ profile.get_absolute_url }}'>{{ profile }}</a>
            {% else %}Who are you? @.o{% endif %}
        </h3>
    </header>

    <aside>
        <div class="avatar">
            <img alt='{% trans "avatar image" %}'
                {% if profile and profile.avatar %}
                src="{{ profile.get_avatar_url }}"
                title='{% trans "Avatar image for" %} {{ forum_user }}'
                {% else %}
                src="{{ STATIC_URL }}img/forum/avatar/dull_face.png"
                title='{% trans "Default image" %}'
                {% endif %} />
        </div>
        {% if is_self %}
            <div class="menu">
                <a id="edit_avatar" title='{% trans "Change your avatar image" %}'
                   href="{% url forum:edit_profile %}">{% trans "Edit profile" %}</a>
            </div>
        {% endif %}
    </aside><!--

 --><section>
    {% block profile_content %}
        <ul class="profile_list">
            <li>
                <label for="id_profile">{% trans "Profile created at" %}</label>
                <span id="id_profile">{{ profile.creation_time|date }}</span>
            </li>
            <li>
                <label for="id_gender">{% trans "Gender" %}</label>
                <span id="id_gender">{{ profile.get_gender_display }}</span>
            </li>
            <li>
                <label for="id_reputation">{% trans "Reputation" %}</label>
                <span id="id_reputation">{{ profile.reputation }}</span>
            </li>
            <li>
                <label for="id_total_threads">{% trans "Threads" %}</label>
                <span id="id_total_threads">{{ profile.threads_counter }}</span>
            </li>
            <li>
                <label for="id_total_replies">{% trans "Replies" %}</label>
                <span id="id_total_replies">{{ profile.replies_counter }}</span>
            </li>
            {% if profile.message %}
            <li class="signature">
                {% if profile.message %}
                <div>
                    {{ profile.html|safe }}
                </div>
                {% endif %}
            </li>
            {% endif %}
        </ul>
        {% if not is_self %}
            <a class="send_pvt" title='{% trans "send private message" %}'
               href='{% url forum:send_message profile.nickname %}'>Send message</a>
        {% endif %}
    {% endblock %}
    </section>

</div>
{% endblock %}