The version of vichan running on lainchan.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
2.8KB

  1. {% if bans|count == 0 %}
  2. <p style="text-align:center" class="unimportant">({% trans 'There are no active bans.' %})</p>
  3. {% else %}
  4. <form action="" method="post">
  5. <table class="mod" style="width:100%">
  6. <tr>
  7. <th>{% trans 'IP address/mask' %}</th>
  8. <th>{% trans 'Reason' %}</th>
  9. <th>{% trans 'Board' %}</th>
  10. <th>{% trans 'Set' %}</th>
  11. <th>{% trans 'Duration' %}</th>
  12. <th>{% trans 'Expires' %}</th>
  13. <th>{% trans 'Seen' %}</th>
  14. <th>{% trans 'Staff' %}</th>
  15. </tr>
  16. {% for ban in bans %}
  17. <tr{% if ban.expires != 0 and ban.expires < time() %} style="text-decoration:line-through"{% endif %}>
  18. <td style="white-space: nowrap">
  19. <input type="checkbox" name="ban_{{ ban.id }}">
  20. {% if ban.single_addr %}
  21. <a href="?/IP/{{ ban.mask }}">{{ ban.mask }}</a>
  22. {% else %}
  23. {{ ban.mask }}
  24. {% endif %}
  25. </td>
  26. <td>
  27. {% if ban.reason %}
  28. {{ ban.reason }}
  29. {% else %}
  30. -
  31. {% endif %}
  32. </td>
  33. <td style="white-space: nowrap">
  34. {% if ban.board %}
  35. {{ config.board_abbreviation|sprintf(ban.board) }}
  36. {% else %}
  37. <em>{% trans 'all boards' %}</em>
  38. {% endif %}
  39. </td>
  40. <td style="white-space: nowrap">
  41. <span title="{{ ban.created|date(config.post_date) }}">
  42. {{ ban.created|ago }} ago
  43. </span>
  44. </td>
  45. <td style="white-space: nowrap">
  46. {% if ban.expires == 0 %}
  47. -
  48. {% else %}
  49. {{ (ban.expires - ban.set + time()) | until }}
  50. {% endif %}
  51. </td>
  52. <td style="white-space: nowrap">
  53. {% if ban.expires == 0 %}
  54. <em>{% trans 'never' %}</em>
  55. {% else %}
  56. {{ ban.expires|date(config.post_date) }}
  57. {% if ban.expires > time() %}
  58. <small>(in {{ ban.expires|until }})</small>
  59. {% endif %}
  60. {% endif %}
  61. </td>
  62. <td>
  63. {% if ban.seen %}
  64. {% trans 'Yes' %}
  65. {% else %}
  66. {% trans 'No' %}
  67. {% endif %}
  68. </td>
  69. <td>
  70. {% if ban.username %}
  71. {% if mod|hasPermission(config.mod.view_banstaff) %}
  72. <a href="?/new_PM/{{ ban.username|e }}">{{ ban.username|e }}</a>
  73. {% else %}
  74. {% if mod|hasPermission(config.mod.view_banquestionmark) %}
  75. <em>?</em>
  76. {% else %}
  77. {% endif %}
  78. {% endif %}
  79. {% elseif ban.creator == -1 %}
  80. <em>system</em>
  81. {% else %}
  82. <em>{% trans 'deleted?' %}</em>
  83. {% endif %}
  84. </td>
  85. </tr>
  86. {% endfor %}
  87. </table>
  88. <p style="text-align:center">
  89. <input type="submit" name="unban" value="{% trans 'Unban selected' %}">
  90. </p>
  91. </form>
  92. {% endif %}
  93. {% if count > bans|count %}
  94. <p class="unimportant" style="text-align:center;word-wrap:break-word">
  95. {% for i in range(0, (count - 1) / config.mod.modlog_page) %}
  96. <a href="?/bans/{{ i + 1 }}">[{{ i + 1 }}]</a>
  97. {% endfor %}
  98. </p>
  99. {% endif %}