|
1 | 1 | {% extends "one_column_body.html" %}
|
2 | 2 | {% import "macros.html" as macros %}
|
3 | 3 | {% block title %}
|
4 |
| - {% trans %}Moderation queue{% endtrans %} |
| 4 | + {% trans %}Moderation queue{% endtrans %} |
5 | 5 | {% endblock %}
|
6 |
| -{% block page_class %}moderation-queue-page{% endblock %} |
| 6 | +{% block layout_class %}moderation-queue-page{% endblock %} |
7 | 7 | {% block content %}
|
8 |
| - <h1 class="section-title">{% trans %}Moderation queue{% endtrans %}</h1> |
9 |
| - <div class="moderation-header"> |
10 |
| - <div class="tools"> |
11 |
| - <div class="js-approve-block"> |
12 |
| - <div class="js-label"> |
13 |
| - {% trans %}first post{% endtrans %} |
14 |
| - </div> |
15 |
| - <div class="buttons"> |
16 |
| - <a class="btn approve-posts">{% trans %}approve posts{% endtrans %}</a> |
17 |
| - <a class="btn approve-posts-users" id="re_approve_posts_users">{% trans %}approve posts and users{% endtrans %}</a> |
18 |
| - </div> |
19 |
| - </div> |
20 |
| - <div class="js-decline-block"> |
21 |
| - <div class="js-label"> |
22 |
| - {% trans %}visible posts{% endtrans %} |
23 |
| - </div> |
24 |
| - <div class="buttons"> |
25 |
| - <div class="btn-group dropdown decline-reasons-menu"> |
26 |
| - <span class="btn btn-info dropdown-toggle"> |
27 |
| - <span>{% trans %}decline and explain why{% endtrans %}</span> |
28 |
| - <span class="caret"></span> |
29 |
| - </span> |
30 |
| - <ul class="dropdown-menu"> |
31 |
| - {% for reason in post_reject_reasons %} |
32 |
| - <li> |
33 |
| - <a class="decline-with-reason" data-reason-id="{{ reason.id }}">{{ reason.title|escape }}</a> |
34 |
| - </li> |
35 |
| - {% endfor %} |
36 |
| - <li> |
37 |
| - <a class="manage-reasons">{% trans %}add/manage reject reasons{% endtrans %}</a> |
38 |
| - </li> |
39 |
| - </ul> |
40 |
| - </div> |
41 |
| - <a class="btn btn-danger decline-block-users">{% trans %}block spammers{% endtrans %}</a> |
42 |
| - {% if settings.IP_MODERATION_ENABLED %} |
43 |
| - <a class="btn btn-danger decline-block-users-ips">{% trans %}block spammers and IPs{% endtrans %}</a> |
44 |
| - {% endif %} |
45 |
| - </div> |
46 |
| - </div> |
47 |
| - </div> |
48 |
| - <ul class="mod-queue-info"> |
49 |
| - <li>If necessary, select individual posts</li> |
50 |
| - <li>Approval of users removes them from the queue and approves ALL of their posts.</li> |
51 |
| - <li>Blocking spammers denies them future access and deletes ALL their posts.</li> |
52 |
| - {% if settings.IP_MODERATION_ENABLED %} |
53 |
| - <li>Blocking IPs denies access by IP address and blocks all accounts using those IPs (and mass deletes content as above).</li> |
54 |
| - {% endif %} |
55 |
| - </ul> |
56 |
| - </div> |
57 |
| - {% include "moderation/manage_reject_reasons_dialog.html" %} |
58 |
| - <div class="action-status"><span></span></div> |
59 |
| - <div class="messages"> |
60 |
| - {% for message in messages %} |
61 |
| - <div class="js-message-container"> |
62 |
| - <div |
63 |
| - class="message{% if message.is_new %} highlight new{% else %} seen{% endif %}" |
64 |
| - data-message-id="{{ message.id }}" |
65 |
| - > |
66 |
| - {{ macros.moderation_queue_message(message) }} |
67 |
| - </div> |
68 |
| - <div class="js-expander">expand</div> |
69 |
| - </div> |
70 |
| - {% endfor %} |
71 |
| - </div> |
| 8 | + <h1>{% trans %}Moderation queue{% endtrans %}</h1> |
| 9 | + {% if queue %} |
| 10 | + {% include "moderation/moderation_header.html" %} |
| 11 | + {% include "moderation/messages.html" %} |
| 12 | + {% else %} |
| 13 | + {% include "moderation/blank_state.html" %} |
| 14 | + {% endif %} |
72 | 15 | {% endblock %}
|
73 | 16 | {% block endjs %}
|
74 |
| - {# todo: factor out moderation.js file #} |
75 |
| - {% compress js %} |
76 |
| - <script type="text/javascript" src="{{ '/js/user/response_notifs.js'|media }}"></script> |
77 |
| - <script type="text/javascript" src="{{ '/js/user/decline_and_explain_menu.js'|media }}"></script> |
78 |
| - <script type="text/javascript" src="{{ '/js/user/post_moderation_controls.js'|media }}"></script> |
79 |
| - <script type="text/javascript" src="{{ '/js/user/manage_reject_reasons_dialog.js'|media }}"></script> |
80 |
| - <script type="text/javascript" src="{{ '/js/user/user_group.js'|media }}"></script> |
81 |
| - <script type="text/javascript" src="{{ '/js/user/groups_container.js'|media }}"></script> |
82 |
| - <script type="text/javascript" src="{{ '/js/user/group_adder_widget.js'|media }}"></script> |
83 |
| - <script type="text/javascript" src="{{ '/js/user/user_groups_editor.js'|media }}"></script> |
84 |
| - <script type="text/javascript" src="{{ '/js/user/tweeting.js'|media }}"></script> |
85 |
| - <script type="text/javascript" src="{{ '/js/user/user_questions_paginator.js'|media }}"></script> |
86 |
| - <script type="text/javascript" src="{{ '/js/user.js'|media }}"></script> |
87 |
| - {% endcompress %} |
88 |
| - <script type="text/javascript"> |
89 |
| - (function() { |
90 |
| - askbot['urls']['save_post_reject_reason'] = '{{ url('save_post_reject_reason') }}'; |
91 |
| - askbot['urls']['delete_post_reject_reason'] = '{{ url('delete_post_reject_reason') }}'; |
92 |
| - {% if request.user.is_administrator_or_moderator() %} |
93 |
| - askbot['data']['postRejectReasons'] = [ |
94 |
| - {% for reason in post_reject_reasons %} |
95 |
| - {'id': {{reason.id}}, 'title': '{{reason.title|escapejs}}'}, |
96 |
| - {% endfor %} |
97 |
| - ]; |
98 |
| - {% endif %} |
99 |
| - askbot['urls']['moderatePostEdits'] = '{{ url('moderate_post_edits') }}'; |
100 |
| - var modControls = new PostModerationControls(); |
101 |
| - modControls.decorate($('body')); |
102 |
| - })(); |
103 |
| - </script> |
| 17 | + {% include "moderation/javascript.html" %} |
104 | 18 | {% endblock %}
|
0 commit comments