core&ui: add contest/homework group filter (#589)

This commit is contained in:
panda authored and GitHub committed 2023-06-09 16:01:26 +08:00
1 parent 93bf79e6ad
commit 6f6bdee077
5 files changed
+47 -12

No files matched your search

@@ -14,6 +14,20 @@
<option value="list" selected>{{ _('List View') }}</option>
</select>
</span>
{% if groups.length %}
<form method="get" class="filter-form" name="filter-form">
{{ _('Show') }}:
<select class="inline compact select" name="group">
<option value=""{% if not group %} selected{% endif %}>{{ _('All') }}</option>
{%- for g in groups -%}
<option value="{{ g }}"{% if group == g %} selected{% endif %}>{{ g }}</option>
{%- endfor -%}
</select>
<button type="submit" class="compact button hasjs--hide">
{{ _('Search') }}
</button>
</form>
{% endif %}
{% if handler.user.hasPerm(perm.PERM_CREATE_HOMEWORK) %}
<a class="compact button" href="{{ url('homework_create') }}">{{ _('Create Homework') }}</a>
{% endif %}
@@ -51,7 +65,7 @@
</li>
{%- endfor -%}
</ol>
{{ paginator.render(page, tpcount) }}
{{ paginator.render(page, tpcount, add_qs=qs) }}
<div name="calendar_entry"></div>
{% endif %}
</div>