[后端]修改了我的提交列表的模板样式,整理格式
This commit is contained in:
@@ -2,59 +2,59 @@
|
|||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
{% load submission %}
|
{% load submission %}
|
||||||
<div class="container main">
|
<div class="container main">
|
||||||
<ul class="nav nav-tabs nav-tabs-google">
|
<ul class="nav nav-tabs nav-tabs-google">
|
||||||
<li role="presentation">
|
<li role="presentation">
|
||||||
<a href="/submission/">提交</a></li>
|
<a href="/submission/">提交</a></li>
|
||||||
<li role="presentation" class="active">
|
<li role="presentation" class="active">
|
||||||
<a href="/submission/my_submissions/">我的提交</a></li>
|
<a href="/submission/my_submissions/">我的提交</a></li>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
<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 }}/">{{ item.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 %}
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<nav>
|
||||||
|
<ul class="pager">
|
||||||
|
{% if previous_page %}
|
||||||
|
<li class="previous"><a
|
||||||
|
href="/my_submissions/{{ previous_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if tag %}?tag={{ tag }}{% endif %}">
|
||||||
|
<span aria-hidden="true">←</span> 上一页</a></li>
|
||||||
|
{% endif %}
|
||||||
|
{% if next_page %}
|
||||||
|
<li class="next"><a
|
||||||
|
href="/my_submissions/{{ next_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if tag %}?tag={{ tag }}{% endif %}">下一页 <span
|
||||||
|
aria-hidden="true">→</span></a></li>
|
||||||
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
</nav>
|
||||||
<table class="table table-bordered">
|
</div>
|
||||||
<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 }}/">{{ item.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 %}
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<nav>
|
|
||||||
<ul class="pager">
|
|
||||||
{% if previous_page %}
|
|
||||||
<li class="previous"><a
|
|
||||||
href="/my_submissions/{{ previous_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if tag %}?tag={{ tag }}{% endif %}">
|
|
||||||
<span aria-hidden="true">←</span> 上一页</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% if next_page %}
|
|
||||||
<li class="next"><a
|
|
||||||
href="/my_submissions/{{ next_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if tag %}?tag={{ tag }}{% endif %}">下一页 <span
|
|
||||||
aria-hidden="true">→</span></a></li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user