core&ui: fix group filter display

This commit is contained in:
undefined committed 2023-06-30 01:06:19 +08:00
1 parent 9da4340a97
commit 4bb1e3a81f
5 files changed
+11 -6

No files matched your search

+1
View File
@@ -555,6 +555,7 @@ New: 创建
No {0} at current.: 当前没有{0}。
No comments so far...: 目前还没有评论...
No discussion yet...: 目前没有讨论…
No group available: 没有可用小组
No Permission to Attend Contest: 您没有权限参加比赛
No Permission to Claim Homework: 您没有权限认领作业
No Permission to Create a Discussion: 您没有权限创建讨论
@@ -60,14 +60,15 @@
<div class="section__tools">
<form method="get" name="filter-form">
{{ _('Show') }}:
{% if groups.length %}
<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>
<option value="{{ g }}"{% if group == g %} selected{% endif %}>{{ g }}</option>
{%- endfor -%}
{%- if not groups|length -%}
<option disabled>{{ _('No group available') }}</option>
{%- endif -%}
</select>
{% endif %}
<select class="inline compact select" name="rule">
<option value=""{% if not rule %} selected{% endif %}>{{ _('All') }}</option>
{%- for k, v in model.contest.RULES -%}
@@ -20,8 +20,11 @@
<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>
<option value="{{ g }}"{% if group == g %} selected{% endif %}>{{ g }}</option>
{%- endfor -%}
{%- if not groups|length -%}
<option disabled>{{ _('No group available') }}</option>
{%- endif -%}
</select>
<button type="submit" class="compact button hasjs--hide">
{{ _('Search') }}