home.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {% extends "admin/layout.html" %}
  2. {% load i18n %}
  3. {% load humanize %}
  4. {% load url from future %}
  5. {% from "admin/macros.html" import page_title %}
  6. {% block title %}{{ page_title(title=_('Admin Home')) }}{% endblock %}
  7. {% block content %}
  8. <div class="page-header">
  9. <h1>{% trans %}Admin Home{% endtrans %} <small>{% trans %}Misago {{version}}{% endtrans %}</small></h1>
  10. </div>
  11. {% if monitor.users_inactive|int > 0 %}
  12. <div class="alert alert-info alert-form">
  13. <div class="alert-icon"><span><i class="icon-info-sign icon-white"></i></span></div>
  14. <p><a href="{% url 'admin_users_inactive' %}">{%- trans count=monitor.users_inactive|int, total=monitor.users_inactive|int|intcomma -%}
  15. There is one inactive user.
  16. {%- pluralize -%}
  17. There are {{ total }} inactive users.
  18. {%- endtrans -%}</a></p>
  19. </div>
  20. {% endif %}
  21. <div class="row">
  22. <div class="span8">
  23. <h2>Administrators Online</h2>
  24. <table class="table table-striped table-users list-tiny">
  25. <thead>
  26. <tr>
  27. <th{% if admins|length > 1 %} colspan="2"{% endif %}>{% trans count=admins|length, total=admins|length|intcomma -%}
  28. One Administrator Online
  29. {%- pluralize -%}
  30. {{ total }} Administrators Online
  31. {%- endtrans %}</th>
  32. </tr>
  33. </thead>
  34. <tbody>
  35. <tr>{% for session in admins %}
  36. <td {% if admins|length > 1 %} {% if loop.last and loop.index is odd %}colspan="2"{% else %}class="span4"{% endif %}{% endif %}>
  37. <a href="{% url 'user' username=session.user.username_slug, user=session.user.pk %}"><img src="{{ session.user.get_avatar('medium') }}" class="avatar" alt="{% trans %}Admin's Avatar{% endtrans %}" title="{% trans %}Admin's Avatar{% endtrans %}"> <strong>{{ session.user.username }}</strong></a>
  38. <div class="muted" style="float: right;">{% trans start=session.start|timesince %}started {{ start }} ago{% endtrans %} <span class="info-popover tooltip-top" title="{% trans last=session.last|timesince %}Last click was {{ last }} ago{% endtrans %}"><i class="icon-time"></i></span></div>
  39. </td>{% if not loop.last and loop.index is even %}
  40. </tr>
  41. <tr>{% endif %}
  42. {% endfor %}</tr>
  43. </tbody>
  44. </table>
  45. <hr>
  46. <h3>{% trans %}Board Statistics{% endtrans %}</h3>
  47. <table class="table table-striped">
  48. <tbody>
  49. <tr>
  50. <td class="span2 stat-title"><strong>{% trans %}Users{% endtrans %}</strong></td>
  51. <td>{{ users|intcomma }}</td>
  52. </tr>
  53. <tr>
  54. <td class="span2 stat-title"><strong>{% trans %}Posts{% endtrans %}</strong></td>
  55. <td>{{ posts|intcomma }}</td>
  56. </tr>
  57. <tr>
  58. <td class="span2 stat-title"><strong>{% trans %}Threads{% endtrans %}</strong></td>
  59. <td>{{ threads|intcomma }}</td>
  60. </tr>
  61. </tbody>
  62. </table>
  63. </div>
  64. <div class="span4">
  65. <h3>{% trans %}Quick Action{% endtrans %}</h3>
  66. <form>
  67. <div class="side-search quick-action">
  68. <div class="control-group">
  69. <label class="control-label" for="inputEmail">User to find:</label>
  70. <div class="controls">
  71. <input type="text" id="inputEmail" class="span4" placeholder="Email">
  72. </div>
  73. </div>
  74. <div class="control-group">
  75. <label class="control-label">Actions to run:</label>
  76. <select class="span4">
  77. <option>Dont change account state</option>
  78. <option>Activate user account</option>
  79. <option>Reset user password</option>
  80. <option>Ban user for 15 minutes</option>
  81. <option>Ban user permanently</option>
  82. </select>
  83. <label class="checkbox">
  84. <input type="checkbox" value="">
  85. Remove and block user avatar
  86. </label>
  87. <label class="checkbox">
  88. <input type="checkbox" value="">
  89. Remove and block user signature
  90. </label>
  91. </div>
  92. <div class="form-actions">
  93. <button type="submit" class="btn btn-primary">Run Action</button>
  94. </div>
  95. </div>
  96. </form>
  97. </div>
  98. </div>
  99. {% endblock %}