active_posters.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. {% extends "misago/userslists/base.html" %}
  2. {% load humanize i18n misago_avatars %}
  3. {% block meta-description %}{% blocktrans trimmed with days=tracked_period %}
  4. List of users that have posted new messages during last {{ days }} days.
  5. {% endblocktrans %}{% endblock meta-description %}
  6. {% block users %}
  7. {% if users_count %}
  8. <p class="lead">
  9. {% blocktrans trimmed with posters=users_count|intcomma days=tracked_period count counter=users_count %}
  10. {{ posters }} user has posted new messages posting during last {{ days }} days.
  11. {% plural %}
  12. {{ posters }} users posted new messages during last {{ days }} days.
  13. {% endblocktrans %}
  14. </p>
  15. <table class="table users-ranking">
  16. <thead>
  17. <tr>
  18. <th colspan="2">{% trans "User" %}</th>
  19. <th class="text-center">{% trans "Rank" %}</th>
  20. <th class="text-center">{% trans "Posts" %}</th>
  21. <th class="text-center">{% trans "Total" %}</th>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. {% for ranked in users %}
  26. {% url USER_PROFILE_URL user_slug=ranked.slug user_id=ranked.id as user_url %}
  27. <tr {% if ranked.pk == user.pk %}class="highlight"{% endif %}>
  28. <td style="width: 1%;">
  29. <a href="{{ user_url }}">
  30. <img src="{{ ranked|avatar:30 }}" alt="{% trans "Avatar" %}"class="avatar">
  31. </a>
  32. </td>
  33. <td>
  34. <a href="{{ user_url }}" class="item-title">{{ ranked }}</a>
  35. </td>
  36. <td class="lead text-center">
  37. #{{ forloop.counter }}
  38. </td>
  39. <td class="lead text-center">
  40. {{ ranked.num_posts }}
  41. </td>
  42. <td class="lead text-center">
  43. {% if ranked.num_posts > ranked.posts %}
  44. {{ ranked.num_posts }}
  45. {% else %}
  46. {{ ranked.posts }}
  47. {% endif %}
  48. </td>
  49. </tr>
  50. {% endfor %}
  51. </tbody>
  52. </table>
  53. {% else %}
  54. <p class="lead">
  55. {% blocktrans trimmed with days=tracked_period %}
  56. No users have posted any new messages during last {{ days }} days.
  57. {% endblocktrans %}
  58. </p>
  59. {% endif %}
  60. {% endblock users %}