diff --git a/media/css/mkt/reviewers.less b/media/css/mkt/reviewers.less index 2c758c9cee..3e039ca952 100644 --- a/media/css/mkt/reviewers.less +++ b/media/css/mkt/reviewers.less @@ -571,73 +571,74 @@ div.editor-stats-table > div.editor-stats-dark { /* Moderated reviews css */ -#reviews-flagged .review-flagged { - border-top: 1px dotted @medium-gray; - padding: 1em; - margin: 0 0 1em 1em; +#reviews-flagged { + .review-flagged { + border-top: 1px dotted @medium-gray; + line-height: 20px; + margin: 0 0 1em 1em; + padding: 1em; + ul { + margin-bottom: 0; + } + } + &:first-child { + border-top: 0; + } + .reviews-flagged-reasons { + background-color: lighten(@red, 50%); + .border-radius(10px); + clear: both; + margin: 0; + padding: 0 10px; + li { + border-top: 1px dotted @light-gray; + padding: 10px 0; + &:first-child { + border-top: 0; + } + } + } + h3 { + margin: 0; + } + p { + margin-bottom: 1.5em; + } + .review-flagged-actions { + border-left: 1px dashed @medium-gray; + float: right; + margin-left: 10px; + padding-left: 10px; + width: 200px; + label { + font-weight: normal; + } + } + form { + margin: 0; + } + div.review-saved { + margin-bottom: 0; + padding: 10px; + text-align: right; + } + label[for$=action_0] { + color: @green; + } + label[for$=action_2] { + color: @maroon; + } + .stars { + float: left; + } + span.light { + color: @note-gray; + } } - -#reviews-flagged .review-flagged ul { - margin-bottom: 0; -} - -#reviews-flagged .review-flagged:first-child { - border-top: 0; -} - -#reviews-flagged .reviews-flagged-reasons { - background-color: #FFE4E4; - .border-radius(10px); - margin: 0; - padding: 0 10px; - clear: both; -} - -#reviews-flagged .reviews-flagged-reasons li { - padding: 10px 0; - border-top: 1px dotted #FFB1B1; -} - -#reviews-flagged .reviews-flagged-reasons li:first-child { - border-top: 0; -} - -#reviews-flagged h3 { - margin: 0; -} - -#reviews-flagged .review-flagged-actions { - float: right; - padding-left: 10px; - margin-left: 10px; - border-left: 1px dashed @medium-gray; - width: 200px; -} - -#reviews-flagged .review-flagged-actions label { - font-weight: normal; -} - -#reviews-flagged form { - margin: 0; -} - -#reviews-flagged div.review-saved { - padding: 10px; - text-align: right; - margin-bottom: 0; -} - -#reviews-flagged label[for$=action_0] { - color: #429341; -} - -#reviews-flagged label[for$=action_1] { - color: #4D80C6; -} - -#reviews-flagged label[for$=action_2] { - color: #9A2E2E; +.html-rtl #reviews-flagged { + .stars { + float: right; + } } /* data grid search form */ diff --git a/mkt/asset_bundles.py b/mkt/asset_bundles.py index bf57bad572..30f739ec4a 100644 --- a/mkt/asset_bundles.py +++ b/mkt/asset_bundles.py @@ -68,6 +68,7 @@ CSS = { ), 'mkt/reviewers': ( 'css/mkt/buttons.less', + 'css/mkt/ratings.less', 'css/mkt/reviewers.less', ), 'mkt/consumer': ( diff --git a/mkt/reviewers/helpers.py b/mkt/reviewers/helpers.py index 17c289cbd7..fd8aa7ca4b 100644 --- a/mkt/reviewers/helpers.py +++ b/mkt/reviewers/helpers.py @@ -26,7 +26,8 @@ def reviewers_breadcrumbs(context, queue=None, items=None): if queue: queues = {'pending': _('Apps'), 'rereview': _('Re-reviews'), - 'escalated': _('Escalations')} + 'escalated': _('Escalations'), + 'moderated': _('Moderated Reviews')} if items: url = reverse('reviewers.apps.queue_%s' % queue) @@ -67,4 +68,7 @@ def queue_tabnav(context): ('escalated', 'queue_escalated', _('Escalations ({0})', counts['escalated']).format(counts['escalated'])), + ('moderated', 'queue_moderated', + _('Moderated Reviews ({0})', + counts['moderated']).format(counts['moderated'])), ] diff --git a/mkt/reviewers/templates/reviewers/queue.html b/mkt/reviewers/templates/reviewers/queue.html index ee6ea3089c..04d55043d3 100644 --- a/mkt/reviewers/templates/reviewers/queue.html +++ b/mkt/reviewers/templates/reviewers/queue.html @@ -20,6 +20,62 @@
+ {% if tab == 'moderated' %} +
+
+ {% if queue_counts[tab] != 0 %} +
+ +
+ {% endif %} + {{ csrf() }} + {{ reviews_formset.management_form }} + {% for review in reviews_formset.forms %} +
+
+ {{ review.errors }} + {{ _('Moderation actions:') }} + {{ review.id }} + {{ review.action }} +
+

+ {{ review.instance.addon.name }} + {%- if review.instance.title %}: {{ review.instance.title }}{% endif %} +

+

+ {% trans user=review.instance.user|user_link, date=review.instance.created|datetime, + stars=review.instance.rating|stars, locale=review.instance.title.locale %} + by {{ user }} on {{ date }} + {{ stars }} ({{ locale }}) + {% endtrans %} +

+

{{ review.instance.body|nl2br }}

+
    + {% for reason in review.instance.reviewflag_set.all() %} +
  • +
    + {% trans user=reason.user|user_link, date=reason.modified|babel_datetime, + reason=flags[reason.flag] %} + {{ reason }} + Flagged by {{ user }} on {{ date }} + {% endtrans %} +
    + {{ reason.note }} +
  • + {% endfor %} +
+
+ {% endfor %} + {% if queue_counts[tab] == 0 %} +
{{ _('All reviews have been moderated. Good work!') }}
+ {% else %} +
+ +
+ {% endif %} +
+
+ {% else %} @@ -58,7 +114,7 @@
- {% if pager.paginator.count == 0 %} + {% if queue_counts[tab] == 0 %}
{{ _('There are currently no items of this type to review.') }}
@@ -66,6 +122,8 @@ {{ pager|impala_paginator }} {% endif %} + {% endif %} +