active_posters.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. {% extends "misago/userslists/base.html" %}
  2. {% load i18n misago_avatars %}
  3. {% block title %}{% trans "Active posters" %} | {{ block.super }}{% endblock %}
  4. {% block meta-description %}
  5. {% if users_count %}
  6. {% blocktrans trimmed with posters=users_count days=tracked_period count counter=users_count %}
  7. {{ posters }} most active poster from last {{ days }} days.
  8. {% plural %}
  9. {{ posters }} most active posters from last {{ days }} days.
  10. {% endblocktrans %}
  11. {% else %}
  12. {% blocktrans trimmed with days=tracked_period %}
  13. No users have posted any new messages during last {{ days }} days.
  14. {% endblocktrans %}
  15. {% endif %}
  16. {% endblock meta-description %}
  17. {% block og-title %}{% trans "Active posters" %}{% endblock %}
  18. {% block og-description %}
  19. {% if users_count %}
  20. {% blocktrans trimmed with posters=users_count days=tracked_period count counter=users_count %}
  21. {{ posters }} most active poster from last {{ days }} days.
  22. {% plural %}
  23. {{ posters }} most active posters from last {{ days }} days.
  24. {% endblocktrans %}
  25. {% else %}
  26. {% blocktrans trimmed with days=tracked_period %}
  27. No users have posted any new messages during last {{ days }} days.
  28. {% endblocktrans %}
  29. {% endif %}
  30. {% endblock og-description %}
  31. {% block og-url %}{{ SITE_ADDRESS }}{{ REQUEST_PATH }}{% endblock %}
  32. {% block content %}
  33. {{ block.super }}
  34. <div class="active-posters-list">
  35. <div class="container">
  36. {% if users_count %}
  37. <p class="lead">
  38. {% blocktrans trimmed with posters=users_count days=tracked_period count counter=users_count %}
  39. {{ posters }} most active poster from last {{ days }} days.
  40. {% plural %}
  41. {{ posters }} most active posters from last {{ days }} days.
  42. {% endblocktrans %}
  43. </p>
  44. <div class="active-posters ui-ready">
  45. <ul class="list-group" itemscope itemtype="http://schema.org/ItemList">
  46. {% for ranked in users %}
  47. {% url 'misago:user' slug=ranked.slug pk=ranked.pk as user_url %}
  48. <li class="list-group-item{% if ranked.rank.css_class %} list-group-rank-{{ ranked.rank.css_class }}{% endif %}" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
  49. <div class="rank-user-avatar">
  50. <a href="{{ user_url }}">
  51. <img src="{{ ranked|avatar:50 }}" alt="{% trans "Avatar" %}" class="avatar">
  52. </a>
  53. </div>
  54. <div class="rank-user">
  55. <div class="user-name">
  56. <a href="{{ user_url }}" class="item-title" itemprop="url">
  57. <span itemprop="name">{{ ranked }}</span>
  58. </a>
  59. </div>
  60. <div class="user-details">
  61. {% if ranked.rank.is_tab %}
  62. <a href="{% url 'misago:users-rank' slug=ranked.rank.slug %}" class="rank-name item-title">
  63. {{ ranked.rank.name }}
  64. </a>
  65. {% else %}
  66. <span class="rank-name item-title">
  67. {{ ranked.rank.name }}
  68. </span>
  69. {% endif %}
  70. {% if ranked.title %}
  71. <span class="user-title hidden-xs hidden-sm">
  72. {{ ranked.title }}
  73. </span>
  74. {% endif %}
  75. </div>
  76. <div class="user-compact-stats visible-xs-block">
  77. <span class="rank-position">
  78. <strong>#{{ forloop.counter }}</strong>
  79. <small>{% trans "Rank" %}</small>
  80. </span>
  81. <span class="rank-posts-counted">
  82. <strong>{{ ranked.score }}</strong>
  83. <small>{% trans "Ranked posts" %}</small>
  84. </span>
  85. </div>
  86. </div>
  87. <div class="rank-position hidden-xs">
  88. <strong>#{{ forloop.counter }}</strong>
  89. <small>{% trans "Rank" %}</small>
  90. </div>
  91. <div class="rank-posts-counted hidden-xs">
  92. <strong>{{ ranked.score }}</strong>
  93. <small>{% trans "Ranked posts" %}</small>
  94. </div>
  95. <div class="rank-posts-total hidden-xs">
  96. <strong>{{ ranked.posts }}</strong>
  97. <small>{% trans "Total posts" %}</small>
  98. </div>
  99. <meta itemprop="position" content="{{ forloop.counter }}" />
  100. </li>
  101. {% endfor %}
  102. <meta itemprop="numberOfItems" content="{{ users|length }}">
  103. <meta itemprop="itemListOrder" content="http://schema.org/ItemListOrderDescending">
  104. </ul>
  105. </div>
  106. {% else %}
  107. <p class="lead">
  108. {% blocktrans trimmed with days=tracked_period %}
  109. No users have posted any new messages during last {{ days }} days.
  110. {% endblocktrans %}
  111. </p>
  112. {% endif %}
  113. </div>
  114. </div>
  115. {% endblock content %}