diff --git a/generic/views.py b/generic/views.py index 4124abfe..e6ed0df8 100644 --- a/generic/views.py +++ b/generic/views.py @@ -3073,6 +3073,13 @@ class GenericViewBase: # Read filters category = request.POST.get("category") or request.GET.get("category") status = request.POST.get("status") or request.GET.get("status") or "ANY" + # How many matching questions to skip (useful for Skip button). Expected integer >= 0. + try: + skip = int(request.POST.get("skip") or request.GET.get("skip") or 0) + if skip < 0: + skip = 0 + except Exception: + skip = 0 # Build base queryset of questions for this app qs = self.question_object.objects.all().order_by("pk") @@ -3120,6 +3127,10 @@ class GenericViewBase: match = True if match: + # If caller asked us to skip N matches, decrement and continue until skip==0 + if skip and skip > 0: + skip -= 1 + continue form = QuestionReviewForm() return render(request, f"{self.app_name}/question_review_question.html", {"question": question, "form": form, "app_name": self.app_name, "filters": {"category": category, "status": status}}) diff --git a/sbas/templates/sbas/base.html b/sbas/templates/sbas/base.html index e3d9861d..f08cd894 100644 --- a/sbas/templates/sbas/base.html +++ b/sbas/templates/sbas/base.html @@ -23,7 +23,7 @@
diff --git a/sbas/templates/sbas/question_review_question.html b/sbas/templates/sbas/question_review_question.html index c55ebfe5..2cac89fc 100644 --- a/sbas/templates/sbas/question_review_question.html +++ b/sbas/templates/sbas/question_review_question.html @@ -117,6 +117,48 @@ {% comment %} The included partial contains its own