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