online.html 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. {% extends "misago/userslists/base.html" %}
  2. {% load humanize i18n misago_avatars misago_capture %}
  3. {% block meta-description %}{% trans "List of signed in users currently browsing forums." %}{% endblock meta-description %}
  4. {% block user-card %}
  5. <a href="{% url USER_PROFILE_URL user_slug=card.user.slug user_id=card.user.id %}" class="user-card {% if card.user.rank.css_class %}card-{{ card.user.rank.css_class }}{% endif %}">
  6. <img src="{{ card.user|avatar:400 }}" alt="{% trans "Avatar" %}">
  7. <div class="card-footer">
  8. <h4 class="user-name">{{ card.user }}</h4>
  9. <small>
  10. <abbr class="tooltip-top dynamic time-ago" title="{% blocktrans with last_click=card.last_click|date:"TIME_FORMAT" %}Last click on {{ last_click }}{% endblocktrans %}" data-timestamp="{{ card.last_click|date:"c" }}">
  11. {{ card.last_click|date }}
  12. </abbr>
  13. </small>
  14. </div>
  15. </a>
  16. {% endblock user-card %}
  17. {% block users %}
  18. {% if users.paginator.count %}
  19. <p class="lead">
  20. {% capture trimmed as data_age %}
  21. <abbr class="tooltip-top" title="{{ data_from|date:"DATE_FORMAT" }}">{{ data_from|date:"TIME_FORMAT" }}</abbr>
  22. {% endcapture %}
  23. {% blocktrans trimmed with online=users.paginator.count|intcomma date=data_age|safe count counter=users.paginator.count %}
  24. {{ online }} user is online as of {{ date }}.
  25. {% plural %}
  26. {{ online }} users are online as of {{ date }}.
  27. {% endblocktrans %}
  28. </p>
  29. <table class="table users-ranking">
  30. <thead>
  31. <tr>
  32. <th colspan="2">{% trans "User" %}</th>
  33. <th>{% trans "Last click" %}</th>
  34. {% if user.acl.can_see_hidden_users %}
  35. <th>{% trans "Hidden" %}</th>
  36. {% endif %}
  37. </tr>
  38. </thead>
  39. <tbody>
  40. {% for online in users %}
  41. {% url USER_PROFILE_URL user_slug=online.slug user_id=online.user.id as user_url %}
  42. <tr {% if online.user.pk == user.pk %}class="highlight"{% endif %}>
  43. <td style="width: 1%;">
  44. <a href="{{ user_url }}">
  45. <img src="{{ online.user|avatar:30 }}" alt="{% trans "Avatar" %}"class="avatar">
  46. </a>
  47. </td>
  48. <td>
  49. <a href="{{ user_url }}" class="item-title">{{ online.user }}</a>
  50. </td>
  51. <td>
  52. <abbr class="tooltip-top dynamic time-ago" title="{% blocktrans with last_click=online.last_click|date:"TIME_FORMAT" %}Last click on {{ last_click }}{% endblocktrans %}" data-timestamp="{{ online.last_click|date:"c" }}">
  53. {{ online.last_click|date }}
  54. </abbr>
  55. </td>
  56. {% if user.acl.can_see_hidden_users %}
  57. <td>
  58. {% if online.user.is_hiding_presence %}
  59. <div class="text-warning">
  60. <span class="fa fa-fw fa-lg fa-eye-slash"></span>
  61. {% trans "Yes" %}
  62. </div>
  63. {% else %}
  64. <div class="text-success">
  65. <span class="fa fa-fw fa-lg fa-check"></span>
  66. {% trans "No" %}
  67. </div>
  68. {% endif %}
  69. </td>
  70. {% endif %}
  71. </tr>
  72. {% endfor %}
  73. </tbody>
  74. </table>
  75. {% else %}
  76. <p class="lead">
  77. {% trans "No registered users are signed in at the moment or you can't see them." %}
  78. </p>
  79. {% endif %}
  80. {% endblock users %}