{% load i18n baseurl cleanhtml %}

{% get_current_language as LANGUAGE_CODE %}

{% block top_contributers_table %}
{% if topstats %}
<div class="module-primary clear topcontributors" lang="{{ LANGUAGE_CODE }}">
    <div class="hd"><h2>{% trans 'Top Contributors' %}</h2></div>
    <div class="bd">
      <table class="topcontributors">
        <tr>
          <th colspan="2">{% trans "Suggestions" %}</th>
          <th colspan="2">{% trans "Reviews" %}</th>
          <th colspan="2">{% trans "Submissions" %}</th>
        </tr>
        {% for row in topstats %}
        <tr class="{% cycle 'even' 'odd' %}">
          {% for user in row %}
          <td class="stats-name">{% if user.username == "nobody" %}<span class="user-nobody">{% trans 'anonymous users' %}</span>{% else %}<a href="{{ "/accounts/"|l }}{{ user.username }}/">{{ user.username|obfuscate }}</a>{% endif %}</td>
          <td class="stats-number">{{ user.count }}</td>
          {% endfor %}
        </tr>
        {% endfor %}
      </table>
    </div>
    <div class="clear"></div>
</div>
{% endif %}
{% endblock top_contributers_table %}
