OnlineJudge/template/oj/contest/contest_list.html

81 lines
3.7 KiB
HTML
Raw Normal View History

2015-08-22 08:08:39 +00:00
{% extends "oj_base.html" %}
{% block body %}
2015-08-22 12:42:21 +00:00
{% load contest %}
2015-08-22 08:08:39 +00:00
<div class="container main">
<div class="row">
<div class="col-lg-9">
<div class="row">
<div class="right">
<form class="form-inline" method="get">
<div class="form-group-sm">
<input name="keyword" class="form-control" placeholder="请输入关键词">
<input type="submit" value="搜索" class="btn btn-primary">
</div>
</form>
</div>
</div>
<div>
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>比赛名称</th>
<th>开始时间</th>
<th>比赛类型</th>
<th>状态</th>
</tr>
</thead>
<tbody>
{% for item in contests %}
<tr>
<th scope="row"><a href="/contest/{{ item.id }}/">{{ item.id }}</a></th>
<td><a href="/contest/{{ item.id }}/">{{ item.title }}</a></td>
<td>{{ item.start_time }}</td>
{% ifequal item.contest_type 0 %}
<td>小组赛</td>
{% endifequal %}
{% ifequal item.contest_type 1 %}
<td>公开赛</td>
{% endifequal %}
{% ifequal item.contest_type 2 %}
<td>公开赛(密码保护)</td>
{% endifequal %}
2015-08-22 12:42:21 +00:00
<td class="{{ item|contest_status_color }}">{{ item|contest_status }}</td>
2015-08-22 08:08:39 +00:00
</tr>
{% endfor %}
</tbody>
</table>
2015-08-22 12:42:21 +00:00
<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>
2015-08-22 08:08:39 +00:00
<nav>
<ul class="pager">
{% if previous_page %}
2015-08-22 12:42:21 +00:00
<li class="previous">
<a href="/contests/{{ previous_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if join %}?join={{ join }}{% endif %}">
2015-08-22 08:08:39 +00:00
<span aria-hidden="true">&larr;</span> 上一页</a></li>
{% endif %}
{% if next_page %}
2015-08-22 12:42:21 +00:00
<li class="next">
<a href="/contests/{{ next_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if join %}?join={{ join }}{% endif %}">下一页 <span
2015-08-22 08:08:39 +00:00
aria-hidden="true">&rarr;</span></a></li>
{% endif %}
</ul>
</nav>
</div>
</div>
<div class="col-lg-3">
2015-08-22 12:42:21 +00:00
{% include "oj/announcement/_announcement_panel.html" %}
2015-08-22 08:08:39 +00:00
</div>
</div>
</div>
{% endblock %}
2015-08-22 12:42:21 +00:00
2015-08-22 08:08:39 +00:00
{% block js_block %}
{% endblock %}