修改比赛ranklist页面样式,以及计算方式,为了便于缓存,稍微修改了显示的样式

This commit is contained in:
sxw@401
2015-09-13 19:50:49 +08:00
parent 49b4068757
commit de6ed31216
2 changed files with 36 additions and 9 deletions

View File

@@ -41,16 +41,33 @@
{% endfor %}
</tr>
</thead>
<tbody>
<tbody class="rank">
{% for item in result %}
<tr>
<th scope="row">{{ forloop.counter }}</th>
<td>{{ item.user.username }}</td>
<td>{{ item.username }}</td>
<td>{{ item.total_ac }} / {{ item.total_submit }}</td>
<td>{% if item.total_time %}{{ item.total_time }} min{% else %}--{% endif %}</td>
{% for problem in contest_problems %}
<td class="{% submission_problem_result_class problem item.submissions %}">
{% submission_problem problem item.submissions %}
{% for problem in item.problem %}
<td class="
{% if problem %}
{% if problem.ac %}
{% if problem.first_achieve %}
first-achieved
{% else %}
ac
{% endif %}
{% else %}
failed
{% endif %}
{% endif %}
">
{% if problem.ac %}
{{ problem.ac_time }}min
{% endif %}
{% if problem.failed_number %}
(-{{ problem.failed_number }})
{% endif %}
</td>
{% endfor %}
</tr>