完善筛选的交互
This commit is contained in:
3
template/src/oj/contest/_contest_auto_refresh_check.html
Normal file
3
template/src/oj/contest/_contest_auto_refresh_check.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<input type="checkbox" id="auto-refresh" {% if auto_refresh %}checked{% endif %}
|
||||
onchange="if(this.checked){location.href+='?auto_refresh=true'}else{location.href=location.href.replace('?auto_refresh=true', '')}">
|
||||
自动刷新
|
||||
5
template/src/oj/contest/_contest_filter.html
Normal file
5
template/src/oj/contest/_contest_filter.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<div class="form-group">
|
||||
<label>仅显示当前可参加的比赛
|
||||
<input id="join" type="checkbox" {% if join %}checked{% endif %} onchange="if(this.checked){location.href='/contests/?join=True'}else{location.href='/contests/'}">
|
||||
</label>
|
||||
</div>
|
||||
@@ -55,11 +55,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
{% if request.user.is_authenticated %}
|
||||
<div class="form-group">
|
||||
<label>仅显示当前可参加的比赛
|
||||
<input id="join" type="checkbox" {% if join %}checked{% endif %} onchange="if(this.checked){location.href='/contests/?join=True'}else{location.href='/contests/'}">
|
||||
</label>
|
||||
</div>
|
||||
{% include "oj/contest/_contest_filter.html" %}
|
||||
{% endif %}
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
@@ -77,6 +73,7 @@
|
||||
</nav>
|
||||
{% else %}
|
||||
<p>当前没有合适的比赛,你可以尝试到<a href="/groups/">小组列表</a>申请加入一些小组,以便参加小组内部的比赛</p>
|
||||
{% include "oj/contest/_contest_filter.html" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -70,14 +70,10 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="checkbox" id="auto-refresh" {% if auto_refresh %}checked{% endif %}
|
||||
onchange="if(this.checked){location.href+='?auto_refresh=true'}else{location.href=location.href.replace('?auto_refresh=true', '')}">
|
||||
自动刷新
|
||||
{% include "oj/contest/_contest_auto_refresh_check.html" %}
|
||||
{% else %}
|
||||
<p>还没有结果</p>
|
||||
<input type="checkbox" id="auto-refresh" {% if auto_refresh %}checked{% endif %}
|
||||
onchange="if(this.checked){location.href+='?auto_refresh=true'}else{location.href=location.href.replace('?auto_refresh=true', '')}">
|
||||
自动刷新
|
||||
{% include "oj/contest/_contest_auto_refresh_check.html" %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user