[前端]添加比赛列表为空的判断

This commit is contained in:
esp 2015-08-27 22:28:30 +08:00
parent f8677f4966
commit abd7933a5a

View File

@ -3,7 +3,7 @@
{% load contest %} {% load contest %}
<div class="container main"> <div class="container main">
<div class="row"> <div class="row">
<div class="col-lg-9"> <div class="col-md-9 col-lg-9">
<div class="row"> <div class="row">
<div class="right"> <div class="right">
<form class="form-inline" method="get"> <form class="form-inline" method="get">
@ -15,6 +15,7 @@
</div> </div>
</div> </div>
<div> <div>
{% if contests %}
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
@ -47,6 +48,7 @@
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<div class="form-group"> <div class="form-group">
<label>仅显示当前可参加的比赛 <label>仅显示当前可参加的比赛
<input id="join" type="checkbox" {% if join %}checked{% endif %} onchange="if(this.checked){location.href='/contests/?join=True'}else{location.href='/contests/'}"> <input id="join" type="checkbox" {% if join %}checked{% endif %} onchange="if(this.checked){location.href='/contests/?join=True'}else{location.href='/contests/'}">
@ -66,10 +68,13 @@
{% endif %} {% endif %}
</ul> </ul>
</nav> </nav>
{% else %}
<p>当前没有合适的比赛</p>
{% endif %}
</div> </div>
</div> </div>
<div class="col-lg-3"> <div class="col-md-3 col-lg-3">
{% include "oj/announcement/_announcement_panel.html" %} {% include "oj/announcement/_announcement_panel.html" %}
</div> </div>
</div> </div>