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.

70 lines
5.2KB

  1. {% if mod %}
  2. <span class="controls {% if not post.thread %}op{% endif %}">
  3. {% if mod|hasPermission(config.mod.warning, board.uri) %}
  4. <a title="{% trans %}Warn{% endtrans %}" href="?/{{ board.dir }}warning/{{ post.id }}{% if post.thread %}&amp;thread={{ post.thread }}{% endif %}">{{ config.mod.link_warning }}</a>&nbsp;
  5. {% endif %}
  6. {% if mod|hasPermission(config.mod.delete, board.uri) %}
  7. <a title="{% trans %}Delete{% endtrans %}" onclick="if (event.which==2) return true;if (confirm('{% trans %}Are you sure you want to delete this?{% endtrans %}')) document.location='?/{{ secure_link(board.dir ~ 'delete/' ~ post.id) }}{% if post.thread %}&amp;thread={{ post.thread }}{% endif %}';return false;" href="?/{{ board.dir }}delete/{{ post.id }}{% if post.thread %}&amp;thread={{ post.thread }}{% endif %}">{{ config.mod.link_delete }}</a>&nbsp;
  8. {% endif %}
  9. {% if mod|hasPermission(config.mod.deletebyip, board.uri) %}
  10. <a title="{% trans %}Delete all posts by IP{% endtrans %}" onclick="if (event.which==2) return true;if (confirm('{% trans %}Are you sure you want to delete all posts by this IP address?{% endtrans %}')) document.location='?/{{ secure_link(board.dir ~ 'deletebyip/' ~ post.id) }}{% if post.thread %}&amp;thread={{ post.thread }}{% endif %}';return false;" href="?/{{ board.dir }}deletebyip/{{ post.id }}{% if post.thread %}&amp;thread={{ post.thread }}{% endif %}">{{ config.mod.link_deletebyip }}</a>&nbsp;
  11. {% endif %}
  12. {% if mod|hasPermission(config.mod.deletebyip_global, board.uri) %}
  13. <a title="{% trans %}Delete all posts by IP across all boards{% endtrans %}" onclick="if (event.which==2) return true;if (confirm('{% trans %}Are you sure you want to delete all posts by this IP address, across all boards?{% endtrans %}')) document.location='?/{{ secure_link(board.dir ~ 'deletebyip/' ~ post.id ~ '/global') }}{% if post.thread %}&amp;thread={{ post.thread }}{% endif %}';return false;" href="?/{{ board.dir }}deletebyip/{{ post.id }}/global{% if post.thread %}&amp;thread={{ post.thread }}{% endif %}">{{ config.mod.link_deletebyip_global }}</a>&nbsp;
  14. {% endif %}
  15. {% if mod|hasPermission(config.mod.ban, board.uri) %}
  16. <a title="{% trans %}Ban{% endtrans %}" href="?/{{ board.dir }}ban/{{ post.id }}{% if post.thread %}&amp;thread={{ post.thread }}{% endif %}">{{ config.mod.link_ban }}</a>&nbsp;
  17. {% endif %}
  18. {% if mod|hasPermission(config.mod.bandelete, board.uri) %}
  19. <a title="{% trans %}Ban & Delete{% endtrans %}" href="?/{{ board.dir }}ban&amp;delete/{{ post.id }}{% if post.thread %}&amp;thread={{ post.thread }}{% endif %}">{{ config.mod.link_bandelete }}</a>&nbsp;
  20. {% endif %}
  21. {% if not post.thread %}
  22. {% if mod|hasPermission(config.mod.sticky, board.uri) %}
  23. {% if post.sticky %}
  24. <a title="{% trans %}Make thread not sticky{% endtrans %}" href="?/{{ secure_link(board.dir ~ 'unsticky/' ~ post.id) }}">{{ config.mod.link_desticky }}</a>&nbsp;
  25. {% else %}
  26. <a title="{% trans %}Make thread sticky{% endtrans %}" href="?/{{ secure_link(board.dir ~ 'sticky/' ~ post.id) }}">{{ config.mod.link_sticky }}</a>&nbsp;
  27. {% endif %}
  28. {% endif %}
  29. {% if mod|hasPermission(config.mod.bumplock, board.uri) %}
  30. {% if post.sage %}
  31. <a title="{% trans %}Allow thread to be bumped{% endtrans %}" href="?/{{ secure_link(board.dir ~ 'bumpunlock/' ~ post.id) }}">{{ config.mod.link_bumpunlock }}</a>&nbsp;
  32. {% else %}
  33. <a title="{% trans %}Prevent thread from being bumped{% endtrans %}" href="?/{{ secure_link(board.dir ~ 'bumplock/' ~ post.id) }}">{{ config.mod.link_bumplock }}</a>&nbsp;
  34. {% endif %}
  35. {% endif %}
  36. {% if mod|hasPermission(config.mod.lock, board.uri) %}
  37. {% if post.locked %}
  38. <a title="{% trans %}Unlock thread{% endtrans %}" href="?/{{ secure_link(board.dir ~ 'unlock/' ~ post.id) }}">{{ config.mod.link_unlock }}</a>&nbsp;
  39. {% else %}
  40. <a title="{% trans %}Lock thread{% endtrans %}" href="?/{{ secure_link(board.dir ~ 'lock/' ~ post.id) }}">{{ config.mod.link_lock }}</a>&nbsp;
  41. {% endif %}
  42. {% endif %}
  43. {% endif %}
  44. {% if mod|hasPermission(config.mod.move, board.uri) %}
  45. {% if not post.thread %}
  46. <a title="{% trans %}Move thread to another board{% endtrans %}" href="?/{{ board.dir }}move/{{ post.id }}">{{ config.mod.link_move }}</a>&nbsp;
  47. {% else %}
  48. <a title="{% trans %}Move reply to another board{% endtrans %}" href="?/{{ board.dir }}move_reply/{{ post.id }}">{{ config.mod.link_move }}</a>&nbsp;
  49. {% endif %}
  50. {% endif %}
  51. {% if mod|hasPermission(config.mod.merge, board.uri) %}
  52. <a title="{% trans %}Merge thread with another thread {% endtrans %}" href="?/{{ board.dir }}merge/{{ post.id }}">{{ config.mod.link_merge }}</a>&nbsp;
  53. {% endif %}
  54. {% if mod|hasPermission(config.mod.cycle, board.uri) %}
  55. {% if post.cycle %}
  56. <a title="{% trans %}Make thread not cycle{% endtrans %}" href="?/{{ secure_link(board.dir ~ 'uncycle/' ~ post.id) }}">{{ config.mod.link_uncycle }}</a>&nbsp;
  57. {% else %}
  58. <a title="{% trans %}Make thread cycle{% endtrans %}" href="?/{{ secure_link(board.dir ~ 'cycle/' ~ post.id) }}">{{ config.mod.link_cycle }}</a>&nbsp;
  59. {% endif %}
  60. {% endif %}
  61. {% if mod|hasPermission(config.mod.editpost, board.uri) %}
  62. <a title="{% trans %}Edit post{% endtrans %}" href="?/{{ board.dir }}edit{% if config.mod.raw_html_default %}_raw{% endif %}/{{ post.id }}">{{ config.mod.link_editpost }}</a>&nbsp;
  63. {% endif %}
  64. </span>
  65. {% endif %}