-
Notifications
You must be signed in to change notification settings - Fork 727
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6354 from akatsoulas/extract-moderation-tool
Extract moderation tool to a separate url
- Loading branch information
Showing
10 changed files
with
230 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{% extends "flagit/flagit_base.html" %} | ||
|
||
{% block flagged_items %} | ||
{% for object in objects %} | ||
<li class="{{ object.content_type }}"> | ||
<div class="flagged-item-content"> | ||
<hgroup> | ||
<h2 class="sumo-card-heading">{{ _('Flagged {t} (Reason: {r})')|f(t=object.content_type, r=object.get_reason_display()) }}</h2> | ||
{% if object.notes %} | ||
<p class="notes">{{ _('Other reason:') }} {{ object.notes }}</p> | ||
{% endif %} | ||
</hgroup> | ||
<div class="wrap"> | ||
{% if object.content_object %} | ||
{% include 'flagit/includes/flagged_%s.html' % object.content_type.model %} | ||
{% else %} | ||
<p>{{ _('{t} with id={id} no longer exists.')|f(t=object.content_type, id=object.object_id) }}</p> | ||
{% endif %} | ||
<h3 class="sumo-card-heading"><br>{{ _('Update Status:') }}</h3> | ||
<form class="update inline-form" action="{{ object.form_action }}" method="post"> | ||
{% csrf_token %} | ||
<select name="status"> | ||
<option value="">{{ _('Please select...') }}</option> | ||
<option value="1">{{ _('Content categorization is updated.') }}</option> | ||
<option value="2">{{ _('Content is appropriately categorized.') }}</option> | ||
</select> | ||
<input id="update-status-button-{{ object.content_object.id }}" type="submit" | ||
class="sumo-button primary-button button-lg btn" value={{ _('Update') }} /> | ||
</form> | ||
</div> | ||
</div> | ||
</li> | ||
{% else %} | ||
<p>{{ _('There is no content pending moderation.') }}</p> | ||
{% endfor %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{% extends "questions/base.html" %} {# TODO: liberate - remove questions dependency #} | ||
{% from "includes/common_macros.html" import for_contributors_sidebar %} | ||
{% set title = _('Flagged Content Pending Moderation') %} | ||
{% set classes = 'flagged' %} | ||
{% set scripts = ('flagit', ) %} | ||
|
||
{% block content %} | ||
<div id="flagged-queue" class="sumo-page-section"> | ||
<h1 class="sumo-page-heading">{{ _('Content Pending Moderation') }}</h1> | ||
|
||
<ul class="flagged-items"> | ||
{% block flagged_items %} | ||
{% endblock %} | ||
</ul> | ||
{% block deactivation_log %} | ||
<div class="sumo-button-wrap"></div> | ||
<a class="sumo-button primary-button" rel="nofollow" href="{{ url('users.deactivation_log') }}">{{ _('View all deactivated users') }}</a> | ||
</div> | ||
{% endblock %} | ||
</div> | ||
{% endblock %} | ||
|
||
{% block side_top %} | ||
<nav id="doc-tools"> | ||
<ul class="sidebar-nav sidebar-folding"> | ||
{{ for_contributors_sidebar(user, settings.WIKI_DEFAULT_LANGUAGE, active="flagit.flagged_queue", menu="contributor-tools", locale=locale) }} | ||
</ul> | ||
|
||
{% block side_top_reason %} | ||
{% endblock %} | ||
</nav> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,65 @@ | ||
{% extends "questions/base.html" %} {# TODO: liberate - remove questions dependency #} | ||
{% from "includes/common_macros.html" import for_contributors_sidebar %} | ||
{% set title = _('Flagged Content Pending Moderation') %} | ||
{% set classes = 'flagged' %} | ||
{% set scripts = ('flagit', ) %} | ||
{% extends "flagit/flagit_base.html" %} | ||
|
||
{% block content %} | ||
<div id="flagged-queue" class="sumo-page-section"> | ||
<h1 class="sumo-page-heading">{{ _('Content Pending Moderation') }}</h1> | ||
|
||
<ul class="flagged-items"> | ||
{% for object in objects %} | ||
<li class="{{ object.content_type }}"> | ||
<div class="flagged-item-content"> | ||
<hgroup> | ||
<h2 class="sumo-card-heading">{{ _('Flagged {t} (Reason: {r})')|f(t=object.content_type, r=object.get_reason_display()) }}</h2> | ||
{% if object.notes %} | ||
<p class="notes">{{ _('Other reason:') }} {{ object.notes }}</p> | ||
{% endif %} | ||
</hgroup> | ||
<div class="wrap"> | ||
{% if object.content_object %} | ||
{% include 'flagit/includes/flagged_%s.html' % object.content_type.model %} | ||
{% else %} | ||
<p>{{ _('{t} with id={id} no longer exists.')|f(t=object.content_type, id=object.object_id) }}</p> | ||
{% endif %} | ||
<h3 class="sumo-card-heading"><br>{{ _('Update Status:') }}</h3> | ||
<form class="update inline-form" action="{{ object.form_action }}" method="post"> | ||
{% csrf_token %} | ||
<select name="status"> | ||
<option value="">{{ _('Please select...') }}</option> | ||
{% if object.reason == "spam" %} | ||
<option value="1">{{ _('Removed spam content.') }}</option> | ||
<option value="2">{{ _('No spam found.') }}</option> | ||
{% elif object.reason == "abuse" %} | ||
<option value="1">{{ _('Addressed abusive content.') }}</option> | ||
<option value="2">{{ _('No abuse detected.') }}</option> | ||
{% elif object.reason == "bug_support" %} | ||
<option value="1">{{ _('Redirected support request.') }}</option> | ||
<option value="2">{{ _('Content is appropriately placed.') }}</option> | ||
{% elif object.reason == "language" %} | ||
<option value="1">{{ _('Corrected language.') }}</option> | ||
<option value="2">{{ _('Language is appropriate.') }}</option> | ||
{% else %} | ||
<option value="1">{{ _('Issue resolved.') }}</option> | ||
<option value="2">{{ _('No issues found.') }}</option> | ||
{% endif %} | ||
</select> | ||
<input id="update-status-button-{{ object.content_object.id }}" type="submit" | ||
class="sumo-button primary-button button-lg btn" value={{ _('Update') }} /> | ||
</form> | ||
</div> | ||
{% block flagged_items %} | ||
{% for object in objects %} | ||
<li class="{{ object.content_type }}"> | ||
<div class="flagged-item-content"> | ||
<hgroup> | ||
<h2 class="sumo-card-heading">{{ _('Flagged {t} (Reason: {r})')|f(t=object.content_type, r=object.get_reason_display()) }}</h2> | ||
{% if object.notes %} | ||
<p class="notes">{{ _('Other reason:') }} {{ object.notes }}</p> | ||
{% endif %} | ||
</hgroup> | ||
<div class="wrap"> | ||
{% if object.content_object %} | ||
{% include 'flagit/includes/flagged_%s.html' % object.content_type.model %} | ||
{% else %} | ||
<p>{{ _('{t} with id={id} no longer exists.')|f(t=object.content_type, id=object.object_id) }}</p> | ||
{% endif %} | ||
<h3 class="sumo-card-heading"><br>{{ _('Update Status:') }}</h3> | ||
<form class="update inline-form" action="{{ object.form_action }}" method="post"> | ||
{% csrf_token %} | ||
<select name="status"> | ||
<option value="">{{ _('Please select...') }}</option> | ||
{% if object.reason == "spam" %} | ||
<option value="1">{{ _('Removed spam content.') }}</option> | ||
<option value="2">{{ _('No spam found.') }}</option> | ||
{% elif object.reason == "abuse" %} | ||
<option value="1">{{ _('Addressed abusive content.') }}</option> | ||
<option value="2">{{ _('No abuse detected.') }}</option> | ||
{% elif object.reason == "bug_support" %} | ||
<option value="1">{{ _('Request moved.') }}</option> | ||
<option value="2">{{ _('Request is appropriately placed.') }}</option> | ||
{% elif object.reason == "language" %} | ||
<option value="1">{{ _('Corrected language.') }}</option> | ||
<option value="2">{{ _('Language is appropriate.') }}</option> | ||
{% else %} | ||
<option value="1">{{ _('Issue resolved.') }}</option> | ||
<option value="2">{{ _('No issues found.') }}</option> | ||
{% endif %} | ||
</select> | ||
<input id="update-status-button-{{ object.content_object.id }}" type="submit" | ||
class="sumo-button primary-button button-lg btn" value={{ _('Update') }} /> | ||
</form> | ||
</div> | ||
</li> | ||
{% else %} | ||
<p>{{ _('There is no content pending moderation.') }}</p> | ||
{% endfor %} | ||
</ul> | ||
|
||
<div class="sumo-button-wrap"> | ||
<a class="sumo-button primary-button" rel="nofollow" href="{{ url('users.deactivation_log') }}">{{ _('View all deactivated users') }}</a> | ||
</div> | ||
</div> | ||
</div> | ||
</li> | ||
{% else %} | ||
<p>{{ _('There is no content pending moderation.') }}</p> | ||
{% endfor %} | ||
{% endblock %} | ||
|
||
{% block side_top %} | ||
<nav id="doc-tools"> | ||
<ul class="sidebar-nav sidebar-folding"> | ||
{{ for_contributors_sidebar(user, settings.WIKI_DEFAULT_LANGUAGE, active="flagit.flagged_queue", menu="contributor-tools", locale=locale) }} | ||
</ul> | ||
<!-- Dropdown filter for reasons --> | ||
<div class="filter-reasons"> | ||
<form id="reason-filter-form" method="get" action=""> | ||
<label for="reason">{{ _('Filter by reason:') }}</label> | ||
<select name="reason" id="flagit-reason-filter"> | ||
<option value="">{{ _('All reasons') }}</option> | ||
{% for value, display in reasons %} | ||
<option value="{{ value }}" {% if selected_reason == value %}selected{% endif %}>{{ display }}</option> | ||
{% endfor %} | ||
</select> | ||
</form> | ||
</div> | ||
</nav> | ||
{% block side_top_reason %} | ||
<!-- Dropdown filter for reasons --> | ||
<div class="filter-reasons"> | ||
<form id="reason-filter-form" method="get" action=""> | ||
<label for="reason">{{ _('Filter by reason:') }}</label> | ||
<select name="reason" id="flagit-reason-filter"> | ||
<option value="">{{ _('All reasons') }}</option> | ||
{% for value, display in reasons %} | ||
<option value="{{ value }}" {% if selected_reason == value %}selected{% endif %}>{{ display }}</option> | ||
{% endfor %} | ||
</select> | ||
</form> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.