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["feed_type"] = self.feed_type
context["has_show_editorial_option"] = False context["has_show_editorial_option"] = False
context["has_have_editorial_option"] = False context["has_have_editorial_option"] = False
if self.feed_type == "volunteer":
context["problem_types"] = ProblemType.objects.all()
return context return context
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):

View file

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