{% load i18n profile_tags %}

{% if top_scorers %}
<table id="top-scorers">
  <thead>
    <tr>
      <th></th>
      <th></th>
      <th class="number">{% trans 'score' %}</th>
    </tr>
  </thead>
  <tbody>
  {% for item in top_scorers %}
    {% with user=item.user %}
    <tr>
      <td class="number">{% blocktrans with position=forloop.counter %}#{{ position }}{% endblocktrans %}</td>
      <td class="user">
        <div class="gravatar">
          <a href="{{ user.get_absolute_url }}"><img src="{{ user|gravatar:30 }}" class="avatar" /></a>
        </div>
        <ul class="properties">
          <li class="name"><a href="{{ user.get_absolute_url }}">{{ user.display_name }}</a></li>
        </ul>
      </td>
      <td class="number">{{ item.public_total_score }}</td>
    </tr>
    {% endwith %}
  {% endfor %}
  </tbody>
</table>
{% else %}
<div id="top-scorers" class="no-results">
  {% trans 'No user contributions yet.' %}
</div>
{% endif %}
