summaryrefslogtreecommitdiffstats
path: root/askbot/skins/common/templates/question/question_controls.html
blob: 3d08b28419f35b5345aa23868e21ac8d6e54f5d7 (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
{% 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 %}
    {% if request.user|can_see_offensive_flags(question) %}
        <span class="darkred">{% if question.offensive_flag_count > 0 %}({{ question.offensive_flag_count }}){% endif %}</span>
    {% endif %}
    </a>
</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 %}