From d1e5aaa3e15a69a5064ae75aade3f4d68f64b64f Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Mon, 18 Jul 2022 11:35:51 +0700 Subject: [PATCH] Always show problem types for volunteer --- judge/views/problem.py | 3 +++ templates/problem/search-form.html | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/judge/views/problem.py b/judge/views/problem.py index a05936f..cf78b9c 100644 --- a/judge/views/problem.py +++ b/judge/views/problem.py @@ -885,6 +885,9 @@ class ProblemFeed(ProblemList): context["feed_type"] = self.feed_type context["has_show_editorial_option"] = False context["has_have_editorial_option"] = False + + if self.feed_type == "volunteer": + context["problem_types"] = ProblemType.objects.all() return context def get(self, request, *args, **kwargs): diff --git a/templates/problem/search-form.html b/templates/problem/search-form.html index 9f0c910..403c48d 100644 --- a/templates/problem/search-form.html +++ b/templates/problem/search-form.html @@ -14,11 +14,13 @@ {% endif %} -
- - -
+ {% if feed_type != 'volunteer' %} +
+ + +
+ {% endif %} {% if has_show_editorial_option %}