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

{% block content %}
<div class="member-detail">

    {% if object.image %}
        <div class="image">
            <img src="{{ object.get_thumbnail_url }}" />
        </div>
    {% endif %}
    <div class="title">{{ object.username }}</div>

    <div class="meta">
        {% if notifications %}
            <div class="notifications">
                <a href="{% url "member-notifications" %}">{% trans "Notifications" %} ({{ notifications }})</a>
            </div>
        {% endif %}
    </div>

    <table>
        <tr class="total-comments">
            <th>{% trans "Total comments" %}</th>
            <td>{{ object.number_of_comments }}</td>
        </tr>
        <tr class="recent-comments">
            <th>{% trans "Recent comments" %}</th>
            <td>
                {% for comment in object.last_5_comments %}
                    <div>
                        <a href="{{ comment.content_object.get_absolute_url }}">{{ comment.comment|truncatewords:20 }}</a>
                    </div>
                {% endfor %}
            </td>
        </tr>

    </table>

</div>
{% endblock content %}
