{% extends "user_profile_base.html"  %}
{% load i18n baseurl profile_tags %}

{% block title %}
    {% if user == profile.user %}
        {{ block.super }}
    {% else %}
        {{ profile.user }} | {% trans "Users" %} | {{ settings.TITLE }}
    {% endif %}
{% endblock %}

{% block body_id %}dashboard{% endblock %}

{% block breadcrumbs %}
    {% if user == profile.user %}
        {{ block.super }}
    {% else %}
        <li>{% trans "Users" %}</li><li>{{ profile.user }}</li>
    {% endif %}
{% endblock %}

{% block header_tabs_block %}
{% if user == profile.user %}
  {{ block.super }}
{% endif %}
{% endblock %}

{% block content %}
<div class="module user-statistics" lang="{{ LANGUAGE_CODE }}">
  <div class="hd">
    <h2>{% trans "User Statistics" %}</h2>
  </div>
  <div class="bd">
    <div class="avatar">
        <img src="{{ profile|gravatar:100 }}" width="100" height="100"{% if user == profile.user %} title="{% trans "You can set or change your avatar image at www.gravatar.com" %}"{% endif %} />
    </div>
    <table>
      {% for stat in profile.getuserstatistics %}
      <tr>
        <th scope="row">{{ stat.text }}</th><td class="stats-number">{{ stat.count }}</td>
      </tr>
      {% endfor %}
    </table>
  </div>
</div>
{% endblock %}
