Merge branch 'dev-sxw' of https://git.coding.net/virusdefender/qduoj
Conflicts: contest/views.py template/src/oj/contest/contest_rank.html template/src/oj/contest/submissions_list.html
This commit is contained in:
@@ -2,68 +2,73 @@
|
||||
{% block body %}
|
||||
{% load submission %}
|
||||
<div class="container main">
|
||||
<div class="col-lg-12 contest-tab">
|
||||
<ul class="nav nav-tabs nav-tabs-google">
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/">比赛详情</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/problems/">题目</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/submissions/">提交</a>
|
||||
</li>
|
||||
<li role="presentation" class="active">
|
||||
<a href="/contest/{{ contest.id }}/rank/">排名</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-google contest-tab">
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/">比赛详情</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/problems/">题目</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/submissions/">提交</a>
|
||||
</li>
|
||||
<li role="presentation" class="active">
|
||||
<a href="/contest/{{ contest.id }}/rank/">排名</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2 class="text-center">排名(
|
||||
{% if real_time_rank %}
|
||||
实时
|
||||
实时
|
||||
{% else %}
|
||||
已封榜
|
||||
{% endif %})
|
||||
</h2>
|
||||
{% if result %}
|
||||
<table class="table table-bordered text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th class="text-center">用户名</th>
|
||||
<th class="text-center">AC / 总提交</th>
|
||||
<th class="text-center">用时 + 罚时</th>
|
||||
{% for item in contest_problems %}
|
||||
<th class="text-center"><a href="/contest/{{ contest.id }}/problem/{{ item.id }}/">{{ item.sort_index }}</a>
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="rank">
|
||||
{% for item in result %}
|
||||
已封榜
|
||||
{% endif %})
|
||||
</h2>
|
||||
{% if result %}
|
||||
<table class="table table-bordered text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="row">{{ forloop.counter }}</th>
|
||||
<td>{{ item.username }}</td>
|
||||
<td>{{ item.total_ac }} / {{ item.total_submit }}</td>
|
||||
<td>{% if item.total_time %}{{ item.total_time }}{% else %}--{% endif %}</td>
|
||||
{% for problem in item.problems %}
|
||||
<td class="{% if problem %}{% if problem.ac %}{% if problem.first_achieved %}first-achieved{% else %}alert-success{% endif %}{% else %}alert-danger{% endif %}{% endif %}">
|
||||
{% if problem.ac %}{{ problem.ac_time }}{% endif %}
|
||||
{% if problem.failed_number %}
|
||||
(-{{ problem.failed_number }})
|
||||
{% endif %}
|
||||
</td>
|
||||
<th>#</th>
|
||||
<th class="text-center">用户名</th>
|
||||
<th class="text-center">AC / 总提交</th>
|
||||
<th class="text-center">用时 + 罚时</th>
|
||||
{% for item in contest_problems %}
|
||||
<th class="text-center"><a
|
||||
href="/contest/{{ contest.id }}/problem/{{ item.id }}/">{{ item.sort_index }}</a>
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% 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.split('?')[0]}"> 自动刷新
|
||||
</thead>
|
||||
<tbody class="rank">
|
||||
{% for item in result %}
|
||||
<tr>
|
||||
<th scope="row">{{ forloop.counter }}</th>
|
||||
<td>{{ item.username }}</td>
|
||||
<td>{{ item.total_ac }} / {{ item.total_submit }}</td>
|
||||
<td>{% if item.total_time %}{{ item.total_time }}{% else %}--{% endif %}</td>
|
||||
{% for problem in item.problems %}
|
||||
<td class="
|
||||
{% if problem %}{% if problem.ac %}{% if problem.first_achieved %}first-achieved{% else %}alert-success{% endif %}{% else %}alert-danger{% endif %}{% endif %}">
|
||||
{% if problem.ac %}{{ problem.ac_time }}{% endif %}
|
||||
{% if problem.failed_number %}
|
||||
(-{{ problem.failed_number }})
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% 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.split('?')[0]}">
|
||||
自动刷新
|
||||
{% else %}
|
||||
<p>还没有结果</p>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -71,11 +76,11 @@
|
||||
|
||||
|
||||
{% block js_block %}
|
||||
{% if auto_refresh %}
|
||||
<script>
|
||||
setTimeout(function(){
|
||||
location.reload();
|
||||
}, 5000);
|
||||
</script>
|
||||
{% if auto_refresh %}
|
||||
<script>
|
||||
setTimeout(function () {
|
||||
location.reload();
|
||||
}, 5000);
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user