The version of vichan running on lainchan.org
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

76 líneas
2.8KB

  1. <table class="modlog" style="width:auto">
  2. <tr>
  3. <th>{% trans 'ID' %}</th>
  4. <th>{% trans 'Username' %}</th>
  5. <th>{% trans 'Type' %}</th>
  6. <th>{% trans 'Boards' %}</th>
  7. {% if mod|hasPermission(config.mod.modlog) %}
  8. <th>{% trans 'Last action' %}</th>
  9. {% endif %}
  10. <th>&hellip;</th>
  11. </tr>
  12. {% for user in users %}
  13. <tr>
  14. <td><small>{{ user.id }}</small></td>
  15. <td>{{ user.username|e }}</td>
  16. <td>
  17. {% if config.mod.groups[user.type] %}
  18. {{ config.mod.groups[user.type] }}
  19. {% else %}
  20. <em>{% trans 'Unknown' %}</em> ({{ user.type }})
  21. {% endif %}
  22. </td>
  23. <td>
  24. {% if user.boards == '' %}
  25. <em>{% trans 'none' %}</em>
  26. {% elseif user.boards == '*' %}
  27. <em>{% trans 'all boards' %}</em>
  28. {% else %}
  29. {# This is really messy, but IMO it beats doing it in PHP. #}
  30. {% set boards = user.boards|split(',') %}
  31. {% set _boards = [] %}
  32. {% for board in boards %}
  33. {% set _boards = _boards|push(board == '*' ? '*' : config.board_abbreviation|sprintf(board)) %}
  34. {% endfor %}
  35. {% set _boards = _boards|sort %}
  36. {{ _boards|join(', ') }}
  37. {% endif %}
  38. </td>
  39. {% if mod|hasPermission(config.mod.modlog) %}
  40. <td>
  41. {% if user.last %}
  42. <span title="{{ user.action|e }}">{{ user.last|ago }}</span>
  43. {% else %}
  44. <em>{% trans 'never' %}</em>
  45. {% endif %}
  46. </td>
  47. {% endif %}
  48. <td>
  49. {% if mod|hasPermission(config.mod.promoteusers) and user.type < constant(config.mod.groups[0:-1]|last) %}
  50. <a style="float:left;text-decoration:none" href="?/users/{{ user.id }}/promote/{{ user.promote_token }}" title="{% trans 'Promote' %}">&#9650;</a>
  51. {% endif %}
  52. {% if mod|hasPermission(config.mod.promoteusers) and user.type > constant(config.mod.groups|first) %}
  53. <a style="float:left;text-decoration:none" href="?/users/{{ user.id }}/demote/{{ user.demote_token }}" title="{% trans 'Demote' %}"{% if mod.id == user.id %} onclick="return confirm('{% trans 'Are you sure you want to demote yourself?' %}')"{% endif %}>&#9660;</a>
  54. {% endif %}
  55. {% if mod|hasPermission(config.mod.modlog) %}
  56. <a class="unimportant" style="margin-left:5px;float:right" href="?/log:{{ user.username|e }}">[{% trans 'log' %}]</a>
  57. {% endif %}
  58. {% if mod|hasPermission(config.mod.editusers) or (mod|hasPermission(config.mod.change_password) and mod.id == user.id) %}
  59. <a class="unimportant" style="margin-left:5px;float:right" href="?/users/{{ user.id }}">[{% trans 'edit' %}]</a>
  60. {% endif %}
  61. {% if mod|hasPermission(config.mod.create_pm) %}
  62. <a class="unimportant" style="margin-left:5px;float:right" href="?/new_PM/{{ user.username|e }}">[{% trans 'PM' %}]</a>
  63. {% endif %}
  64. </td>
  65. </tr>
  66. {% endfor %}
  67. </table>
  68. {% if mod|hasPermission(config.mod.createusers) %}
  69. <p style="text-align:center">
  70. <a href="?/users/new">Create a new user</a>
  71. </p>
  72. {% endif %}