2020-01-21 06:35:58 +00:00
|
|
|
<div class="sidebox">
|
2023-09-06 00:30:05 +00:00
|
|
|
<h3 class="colored-text"><i class="fa fa-search"></i>{{ _('Problem search') }}</h3>
|
2023-01-27 23:11:10 +00:00
|
|
|
<div class="sidebox-content">
|
|
|
|
<form id="filter-form" name="form" action="" method="get">
|
|
|
|
<div>
|
|
|
|
<input id="search" type="text" name="search" value="{{ search_query or '' }}"
|
|
|
|
placeholder="{{ _('Search problems...') }}">
|
|
|
|
</div>
|
|
|
|
{% if feed_type != 'volunteer' and request.user.is_authenticated %}
|
|
|
|
<div>
|
|
|
|
<input id="hide_solved" type="checkbox" name="hide_solved" value="1"
|
|
|
|
{% if hide_solved %}checked{% endif %}>
|
|
|
|
<label for="hide_solved">{{ _('Hide solved problems') }}</label>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if feed_type == 'volunteer' and request.user.is_authenticated %}
|
|
|
|
<div>
|
|
|
|
<input id="show_solved_only" type="checkbox" name="show_solved_only" value="1"
|
|
|
|
{% if show_solved_only %}checked{% endif %}>
|
|
|
|
<label for="show_solved_only">{{ _('Show solved problems') }}</label>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% 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"
|
|
|
|
{% if show_editorial %} checked{% endif %}>
|
|
|
|
<label for="show_editorial">{{ _('Show editorial') }}</label>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if has_have_editorial_option %}
|
|
|
|
<div>
|
|
|
|
<input id="have_editorial" type="checkbox" name="have_editorial" value="1"
|
|
|
|
{% if have_editorial %} checked{% endif %}>
|
|
|
|
<label for="have_editorial">{{ _('Have editorial') }}</label>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if organizations %}
|
|
|
|
<div class="filter-form-group">
|
2023-09-06 00:30:05 +00:00
|
|
|
<label class="bold-text margin-label" for="type"><i class="non-italics">{{ _('Group') }}</i></label>
|
2023-01-27 23:11:10 +00:00
|
|
|
<select id="search-org" name="orgs" multiple>
|
|
|
|
{% for org in organizations %}
|
|
|
|
<option value="{{ org.id }}"{% if org.id in org_query %} selected{% endif %}>
|
|
|
|
{{ org.name }}
|
|
|
|
</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="filter-form-group">
|
2023-09-06 00:30:05 +00:00
|
|
|
<label class="bold-text margin-label" for="type"><i class="non-italics">{{ _('Author') }}</i></label>
|
2023-01-27 23:11:10 +00:00
|
|
|
<select id="search-author" name="authors" multiple>
|
|
|
|
{% for author in all_authors %}
|
|
|
|
<option value="{{ author.id }}"{% if author.id in author_query %} selected{% endif %}>
|
2023-02-18 22:38:47 +00:00
|
|
|
{{ author.user__username }}
|
2023-01-27 23:11:10 +00:00
|
|
|
</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
2023-09-06 00:30:05 +00:00
|
|
|
{% if show_types %}
|
|
|
|
<div class="filter-form-group">
|
|
|
|
<label class="bold-text margin-label" for="type"><i class="non-italics">{{ _('Problem types') }}</i></label>
|
|
|
|
<select id="types" name="type" multiple>
|
|
|
|
{% for type in problem_types %}
|
|
|
|
<option value="{{ type.id }}"{% if type.id in selected_types %} selected{% endif %}>
|
|
|
|
{{ type.full_name }}
|
|
|
|
</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2023-01-27 23:11:10 +00:00
|
|
|
<div class="filter-form-group">
|
2023-09-06 00:30:05 +00:00
|
|
|
<label class="bold-text margin-label" for="category"><i class="non-italics">{{ _('Category') }}</i></label>
|
2023-01-27 23:11:10 +00:00
|
|
|
<select id="category" name="category">
|
|
|
|
{% if category %}
|
|
|
|
<option value="" selected="selected">{{ _('All') }}</option>
|
|
|
|
{% else %}
|
|
|
|
<option value="">{{ _('All') }}</option>{% endif %}
|
|
|
|
<option disabled="disabled">---</option>
|
|
|
|
{% for group in categories %}
|
|
|
|
<option value="{{ group.id }}"{% if group.id == category %} selected{% endif %}>
|
|
|
|
{{ group.full_name }}
|
|
|
|
</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
{% if point_values %}
|
2023-09-06 00:30:05 +00:00
|
|
|
<div style="margin-top: 5px;" class="bold-text margin-label" class="form-label">{{ _('Point range') }}</div>
|
2023-01-27 23:11:10 +00:00
|
|
|
<div id="point-slider"></div>
|
|
|
|
{% endif %}
|
|
|
|
<input id="point-start" type="hidden" name="point_start" {% if point_start and point_start != point_values.min %}value="{{ point_start }}"{% else %}disabled{% endif %}>
|
|
|
|
<input id="point-end" type="hidden" name="point_end" {% if point_end and point_end != point_values.max %}value="{{ point_end }}"{% else %}disabled{% endif %}>
|
|
|
|
<div class="form-submit-group">
|
2023-09-06 00:30:05 +00:00
|
|
|
<a id="go" class="button small btn-darkGreen">{{ _('Go') }}</a>
|
|
|
|
<a id="random" class="button small btn-darkGreen">{{ _('Random') }}</a>
|
2023-01-27 23:11:10 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2020-01-21 06:35:58 +00:00
|
|
|
</div>
|