2015-08-20 13:23:53 +00:00
|
|
|
{% extends 'oj_base.html' %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
|
2015-08-22 13:03:00 +00:00
|
|
|
{% load submission %}
|
|
|
|
<div class="container main">
|
|
|
|
{% if submissions %}
|
|
|
|
<table class="table table-bordered">
|
|
|
|
<thead>
|
|
|
|
<tr class="" success>
|
|
|
|
<th>#</th>
|
|
|
|
<th>提交时间</th>
|
|
|
|
<th>结果</th>
|
|
|
|
<th>运行时间</th>
|
|
|
|
<th>语言</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for item in submissions %}
|
|
|
|
<tr class="{{ item.result|translate_result_class }}">
|
|
|
|
<th scope="row"><a href="/my_submission/{{ item.id }}/" id="id_{{ forloop.counter }}">
|
|
|
|
{{ forloop.counter |add:start_id }}</a></th>
|
|
|
|
<td>{{ item.create_time }}</td>
|
|
|
|
<td>{{ item.result|translate_result }}</td>
|
|
|
|
<td>
|
|
|
|
{% if item.accepted_answer_time %}
|
|
|
|
{{ item.accepted_answer_time }}ms
|
|
|
|
{% else %}
|
|
|
|
--
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ item.language|translate_language }}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
[后端]前台我的提交页面 增强提交序号的显示,原来是显示真实id即随机的散列值,不好看,现在改成自然数序列,但需要结合javascript生成,且是相对值,因为数据库里没有这个字段,有点别扭了. 第二,添加了用户没有提交记录的反馈. 第三,本打算增加筛选功能,但因为URL难以统一作罢,只有在增加新的url才能较好的处理,下次再说拜
2015-08-22 05:45:24 +00:00
|
|
|
|
2015-08-22 13:03:00 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% else %}
|
|
|
|
<p>你还没有提交记录!</p>
|
|
|
|
{% endif %}
|
|
|
|
<nav>
|
|
|
|
<ul class="pager">
|
|
|
|
{% if previous_page %}
|
|
|
|
<li class="previous"><a
|
2015-08-24 13:03:30 +00:00
|
|
|
href="/submissions/{{ previous_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if tag %}?tag={{ tag }}{% endif %}">
|
2015-08-22 13:03:00 +00:00
|
|
|
<span aria-hidden="true">←</span> 上一页</a></li>
|
2015-08-21 12:59:21 +00:00
|
|
|
{% endif %}
|
2015-08-22 13:03:00 +00:00
|
|
|
{% if next_page %}
|
|
|
|
<li class="next"><a
|
2015-08-24 13:03:30 +00:00
|
|
|
href="/submissions/{{ next_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if tag %}?tag={{ tag }}{% endif %}">下一页 <span
|
2015-08-22 13:03:00 +00:00
|
|
|
aria-hidden="true">→</span></a></li>
|
|
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
2015-08-20 13:23:53 +00:00
|
|
|
{% endblock %}
|