blob: ea112aa69f09316b3b9233dde399d2b26f5e762d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{% set pipe=joiner('<span class="sep">|</span>') %}
{% if request.user|can_edit_post(question) %}{{ pipe() }}
<a class="question-edit" href="{% url edit_question question.id %}">{% trans %}edit{% endtrans %}</a>
{% endif %}
{% if request.user|can_retag_question(question) %}{{ pipe() }}
<a id="retag" class="question-retag"href="{% url retag_question question.id %}">{% trans %}retag{% endtrans %}</a>
<script type="text/javascript">
var retagUrl = "{% url retag_question question.id %}";
</script>
{% endif %}
{% if question.closed %}
{% if request.user|can_reopen_question(question) %}{{ pipe() }}
<a class="question-close" href="{% url reopen question.id %}">{% trans %}reopen{% endtrans %}</a>
{% endif %}
{% else %}
{% if request.user|can_close_question(question) %}{{ pipe() }}
<a class="question-close" href="{% url close question.id %}">{% trans %}close{% endtrans %}</a>
{% endif %}
{% endif %}
{% if request.user|can_flag_offensive(question) %}{{ pipe() }}
<span id="question-offensive-flag-{{ question.id }}" class="offensive-flag"
title="{% trans %}report as offensive (i.e containing spam, advertising, malicious text, etc.){% endtrans %}">
<a class="question-flag">{% trans %}flag offensive{% endtrans %}</a>
{% if request.user|can_see_offensive_flags(question) %}
<span class="darkred">{% if question.offensive_flag_count > 0 %}({{ question.offensive_flag_count }}){% endif %}</span>
{% endif %}
</span>
{% elif request.user|can_remove_flag_offensive(question)%}{{ pipe() }}
<span id="question-offensive-flag-remove-{{ question.id }}" class="offensive-flag"
title="{% trans %}report as offensive (i.e containing spam, advertising, malicious text, etc.){% endtrans %}">
<a class="question-flag">{% trans %}remove flag{% endtrans %}</a>
{% if request.user|can_see_offensive_flags(question) %}
<span class="darkred">{% if question.offensive_flag_count > 0 %}({{ question.offensive_flag_count }}){% endif %}</span>
{% endif %}
</span>
{% endif %}
{% if request.user|can_delete_post(question) %}{{ pipe() }}
<a id="question-delete-link-{{question.id}}" class="question-delete">{% if question.deleted %}{% trans %}undelete{% endtrans %}{% else %}{% trans %}delete{% endtrans %}{% endif %}</a>
{% endif %}
|