|
1 |
| -{% extends "questions/base.html" %} {# TODO: liberate - remove questions dependency #} |
2 |
| -{% from "includes/common_macros.html" import for_contributors_sidebar %} |
3 |
| -{% set title = _('Flagged Content Pending Moderation') %} |
4 |
| -{% set classes = 'flagged' %} |
5 |
| -{% set scripts = ('flagit', ) %} |
| 1 | +{% extends "flagit/flagit_base.html" %} |
6 | 2 |
|
7 |
| -{% block content %} |
8 |
| - <div id="flagged-queue" class="sumo-page-section"> |
9 |
| - <h1 class="sumo-page-heading">{{ _('Content Pending Moderation') }}</h1> |
10 |
| - |
11 |
| - <ul class="flagged-items"> |
12 |
| - {% for object in objects %} |
13 |
| - <li class="{{ object.content_type }}"> |
14 |
| - <div class="flagged-item-content"> |
15 |
| - <hgroup> |
16 |
| - <h2 class="sumo-card-heading">{{ _('Flagged {t} (Reason: {r})')|f(t=object.content_type, r=object.get_reason_display()) }}</h2> |
17 |
| - {% if object.notes %} |
18 |
| - <p class="notes">{{ _('Other reason:') }} {{ object.notes }}</p> |
19 |
| - {% endif %} |
20 |
| - </hgroup> |
21 |
| - <div class="wrap"> |
22 |
| - {% if object.content_object %} |
23 |
| - {% include 'flagit/includes/flagged_%s.html' % object.content_type.model %} |
24 |
| - {% else %} |
25 |
| - <p>{{ _('{t} with id={id} no longer exists.')|f(t=object.content_type, id=object.object_id) }}</p> |
26 |
| - {% endif %} |
27 |
| - <h3 class="sumo-card-heading"><br>{{ _('Update Status:') }}</h3> |
28 |
| - <form class="update inline-form" action="{{ object.form_action }}" method="post"> |
29 |
| - {% csrf_token %} |
30 |
| - <select name="status"> |
31 |
| - <option value="">{{ _('Please select...') }}</option> |
32 |
| - {% if object.reason == "spam" %} |
33 |
| - <option value="1">{{ _('Removed spam content.') }}</option> |
34 |
| - <option value="2">{{ _('No spam found.') }}</option> |
35 |
| - {% elif object.reason == "abuse" %} |
36 |
| - <option value="1">{{ _('Addressed abusive content.') }}</option> |
37 |
| - <option value="2">{{ _('No abuse detected.') }}</option> |
38 |
| - {% elif object.reason == "bug_support" %} |
39 |
| - <option value="1">{{ _('Redirected support request.') }}</option> |
40 |
| - <option value="2">{{ _('Content is appropriately placed.') }}</option> |
41 |
| - {% elif object.reason == "language" %} |
42 |
| - <option value="1">{{ _('Corrected language.') }}</option> |
43 |
| - <option value="2">{{ _('Language is appropriate.') }}</option> |
44 |
| - {% else %} |
45 |
| - <option value="1">{{ _('Issue resolved.') }}</option> |
46 |
| - <option value="2">{{ _('No issues found.') }}</option> |
47 |
| - {% endif %} |
48 |
| - </select> |
49 |
| - <input id="update-status-button-{{ object.content_object.id }}" type="submit" |
50 |
| - class="sumo-button primary-button button-lg btn" value={{ _('Update') }} /> |
51 |
| - </form> |
52 |
| - </div> |
| 3 | +{% block flagged_items %} |
| 4 | + {% for object in objects %} |
| 5 | + <li class="{{ object.content_type }}"> |
| 6 | + <div class="flagged-item-content"> |
| 7 | + <hgroup> |
| 8 | + <h2 class="sumo-card-heading">{{ _('Flagged {t} (Reason: {r})')|f(t=object.content_type, r=object.get_reason_display()) }}</h2> |
| 9 | + {% if object.notes %} |
| 10 | + <p class="notes">{{ _('Other reason:') }} {{ object.notes }}</p> |
| 11 | + {% endif %} |
| 12 | + </hgroup> |
| 13 | + <div class="wrap"> |
| 14 | + {% if object.content_object %} |
| 15 | + {% include 'flagit/includes/flagged_%s.html' % object.content_type.model %} |
| 16 | + {% else %} |
| 17 | + <p>{{ _('{t} with id={id} no longer exists.')|f(t=object.content_type, id=object.object_id) }}</p> |
| 18 | + {% endif %} |
| 19 | + <h3 class="sumo-card-heading"><br>{{ _('Update Status:') }}</h3> |
| 20 | + <form class="update inline-form" action="{{ object.form_action }}" method="post"> |
| 21 | + {% csrf_token %} |
| 22 | + <select name="status"> |
| 23 | + <option value="">{{ _('Please select...') }}</option> |
| 24 | + {% if object.reason == "spam" %} |
| 25 | + <option value="1">{{ _('Removed spam content.') }}</option> |
| 26 | + <option value="2">{{ _('No spam found.') }}</option> |
| 27 | + {% elif object.reason == "abuse" %} |
| 28 | + <option value="1">{{ _('Addressed abusive content.') }}</option> |
| 29 | + <option value="2">{{ _('No abuse detected.') }}</option> |
| 30 | + {% elif object.reason == "bug_support" %} |
| 31 | + <option value="1">{{ _('Request moved.') }}</option> |
| 32 | + <option value="2">{{ _('Request is appropriately placed.') }}</option> |
| 33 | + {% elif object.reason == "language" %} |
| 34 | + <option value="1">{{ _('Corrected language.') }}</option> |
| 35 | + <option value="2">{{ _('Language is appropriate.') }}</option> |
| 36 | + {% else %} |
| 37 | + <option value="1">{{ _('Issue resolved.') }}</option> |
| 38 | + <option value="2">{{ _('No issues found.') }}</option> |
| 39 | + {% endif %} |
| 40 | + </select> |
| 41 | + <input id="update-status-button-{{ object.content_object.id }}" type="submit" |
| 42 | + class="sumo-button primary-button button-lg btn" value={{ _('Update') }} /> |
| 43 | + </form> |
53 | 44 | </div>
|
54 |
| - </li> |
55 |
| - {% else %} |
56 |
| - <p>{{ _('There is no content pending moderation.') }}</p> |
57 |
| - {% endfor %} |
58 |
| - </ul> |
59 |
| - |
60 |
| - <div class="sumo-button-wrap"> |
61 |
| - <a class="sumo-button primary-button" rel="nofollow" href="{{ url('users.deactivation_log') }}">{{ _('View all deactivated users') }}</a> |
62 |
| - </div> |
63 |
| - </div> |
| 45 | + </div> |
| 46 | + </li> |
| 47 | + {% else %} |
| 48 | + <p>{{ _('There is no content pending moderation.') }}</p> |
| 49 | + {% endfor %} |
64 | 50 | {% endblock %}
|
65 | 51 |
|
66 |
| -{% block side_top %} |
67 |
| - <nav id="doc-tools"> |
68 |
| - <ul class="sidebar-nav sidebar-folding"> |
69 |
| - {{ for_contributors_sidebar(user, settings.WIKI_DEFAULT_LANGUAGE, active="flagit.flagged_queue", menu="contributor-tools", locale=locale) }} |
70 |
| - </ul> |
71 |
| - <!-- Dropdown filter for reasons --> |
72 |
| - <div class="filter-reasons"> |
73 |
| - <form id="reason-filter-form" method="get" action=""> |
74 |
| - <label for="reason">{{ _('Filter by reason:') }}</label> |
75 |
| - <select name="reason" id="flagit-reason-filter"> |
76 |
| - <option value="">{{ _('All reasons') }}</option> |
77 |
| - {% for value, display in reasons %} |
78 |
| - <option value="{{ value }}" {% if selected_reason == value %}selected{% endif %}>{{ display }}</option> |
79 |
| - {% endfor %} |
80 |
| - </select> |
81 |
| - </form> |
82 |
| - </div> |
83 |
| - </nav> |
| 52 | +{% block side_top_reason %} |
| 53 | + <!-- Dropdown filter for reasons --> |
| 54 | + <div class="filter-reasons"> |
| 55 | + <form id="reason-filter-form" method="get" action=""> |
| 56 | + <label for="reason">{{ _('Filter by reason:') }}</label> |
| 57 | + <select name="reason" id="flagit-reason-filter"> |
| 58 | + <option value="">{{ _('All reasons') }}</option> |
| 59 | + {% for value, display in reasons %} |
| 60 | + <option value="{{ value }}" {% if selected_reason == value %}selected{% endif %}>{{ display }}</option> |
| 61 | + {% endfor %} |
| 62 | + </select> |
| 63 | + </form> |
| 64 | + </div> |
84 | 65 | {% endblock %}
|
0 commit comments