Skip to content

Commit

Permalink
paginate the moderation tool
Browse files Browse the repository at this point in the history
  • Loading branch information
escattone committed Dec 16, 2024
1 parent 71386f6 commit 678f8f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kitsune/flagit/jinja2/flagit/content_moderation.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h3 class="sumo-card-heading"><br>{{ _('Update Status:') }}</h3>
<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"
<input id="update-status-button-{{ object.content_object.id }}" type="submit"
class="sumo-button primary-button button-lg btn" value={{ _('Update') }} />
</form>
</div>
Expand All @@ -38,6 +38,7 @@ <h3 class="sumo-card-heading"><br>{{ _('Update Status:') }}</h3>
{% else %}
<p>{{ _('There is no content pending moderation.') }}</p>
{% endfor %}
{{ objects|paginator }}
{% endblock %}

{% block filter_dropdown %}
Expand Down
4 changes: 4 additions & 0 deletions kitsune/flagit/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from kitsune.questions.models import Answer, Question
from kitsune.sumo.templatetags.jinja_helpers import urlparams
from kitsune.sumo.urlresolvers import reverse
from kitsune.sumo.utils import paginate
from kitsune.tags.models import SumoTag


Expand Down Expand Up @@ -186,6 +187,9 @@ def moderate_content(request):
obj.available_topics = get_hierarchical_topics(question.product)
obj.available_tags = available_tags
obj.saved_tags = question.tags.values_list("id", flat=True)

objects = paginate(request, objects)

return render(
request,
"flagit/content_moderation.html",
Expand Down

0 comments on commit 678f8f7

Please sign in to comment.