Always show problem types for volunteer

This commit is contained in:
cuom1999 2022-07-18 11:35:51 +07:00
parent 1ef68e0fdb
commit d1e5aaa3e1
2 changed files with 10 additions and 5 deletions

View file

@ -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):

View file

@ -14,11 +14,13 @@
<label for="hide_solved">{{ _('Hide solved problems') }}</label>
</div>
{% endif %}
<div>
<input id="show_types" type="checkbox" name="show_types" value="1"
{% if show_types %} checked{% endif %}>
<label for="show_types">{{ _('Show problem types') }}</label>
</div>
{% if feed_type != 'volunteer' %}
<div>
<input id="show_types" type="checkbox" name="show_types" value="1"
{% if show_types %} checked{% endif %}>
<label for="show_types">{{ _('Show problem types') }}</label>
</div>
{% endif %}
{% if has_show_editorial_option %}
<div>
<input id="show_editorial" type="checkbox" name="show_editorial" value="1"