Browse Source

Explicitly build post mod delete links

pull/40/head
Michael Walker 9 years ago
parent
commit
9ae357facb
  1. 6
      templates/post/post_controls.html

6
templates/post/post_controls.html

@ -2,13 +2,13 @@
<span class="controls {% if not post.thread %}op{% endif %}">
{% if mod|hasPermission(config.mod.delete, board.uri) %}
{{ secure_link_confirm(config.mod.link_delete, 'Delete'|trans, 'Are you sure you want to delete this?'|trans, board.dir ~ 'delete/' ~ post.id) }}&nbsp;
<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) }}';return false;" href="?/{{ board.dir }}delete/{{ post.id }}">{{ config.mod.link_delete }}</a>&nbsp;
{% endif %}
{% if mod|hasPermission(config.mod.deletebyip, board.uri) %}
{{ secure_link_confirm(config.mod.link_deletebyip, 'Delete all posts by IP'|trans, 'Are you sure you want to delete all posts by this IP address?'|trans, board.dir ~ 'deletebyip/' ~ post.id) }}&nbsp;
<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) }}';return false;" href="?/{{ board.dir }}deletebyip/{{ post.id }}">{{ config.mod.link_deletebyip }}</a>&nbsp;
{% endif %}
{% if mod|hasPermission(config.mod.deletebyip_global, board.uri) %}
{{ secure_link_confirm(config.mod.link_deletebyip_global, 'Delete all posts by IP across all boards'|trans, 'Are you sure you want to delete all posts by this IP address, across all boards?'|trans, board.dir ~ 'deletebyip/' ~ post.id ~ '/global') }}&nbsp;
<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') }}';return false;" href="?/{{ board.dir }}deletebyip/{{ post.id }}/global">{{ config.mod.link_deletebyip_global }}</a>&nbsp;
{% endif %}
{% if mod|hasPermission(config.mod.ban, board.uri) %}
<a title="{% trans %}Ban{% endtrans %}" href="?/{{ board.dir }}ban/{{ post.id }}">{{ config.mod.link_ban }}</a>&nbsp;

Loading…
Cancel
Save