[后端]修改了我的提交列表的模板样式,整理格式

This commit is contained in:
esp
2015-08-21 20:59:21 +08:00
parent d2242a78c6
commit 133371cbc5

View File

@@ -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> </ul>
<br>
<table class="table table-bordered"> <table class="table table-bordered">
<thead> <thead>
<tr class="" success> <tr class="" success>
<th>#</th> <th>#</th>
<th>提交时间</th> <th>提交时间</th>
<th>结果</th> <th>结果</th>
<th>运行时间</th> <th>运行时间</th>
<th>语言</th> <th>语言</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for item in submissions %} {% for item in submissions %}
<tr class="{{ item.result|translate_result_class }}"> <tr class="{{ item.result|translate_result_class }}">
<th scope="row"><a href="/my_submission/{{ item.id }}/">{{ item.id }}</a></th> <th scope="row"><a href="/my_submission/{{ item.id }}/">{{ item.id }}</a></th>
<td>{{ item.create_time }}</td> <td>{{ item.create_time }}</td>
<td>{{ item.result|translate_result }}</td> <td>{{ item.result|translate_result }}</td>
<td> <td>
{% if item.accepted_answer_time %} {% if item.accepted_answer_time %}
{{ item.accepted_answer_time }}ms {{ item.accepted_answer_time }}ms
{% else %} {% else %}
-- --
{% endif %} {% endif %}
</td> </td>
<td> <td>
{{ item.language|translate_language }} {{ item.language|translate_language }}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<nav> <nav>
<ul class="pager"> <ul class="pager">
{% if previous_page %} {% if previous_page %}
<li class="previous"><a <li class="previous"><a
href="/my_submissions/{{ previous_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if tag %}?tag={{ tag }}{% endif %}"> href="/my_submissions/{{ previous_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if tag %}?tag={{ tag }}{% endif %}">
<span aria-hidden="true">&larr;</span> 上一页</a></li> <span aria-hidden="true">&larr;</span> 上一页</a></li>
{% endif %} {% endif %}
{% if next_page %} {% if next_page %}
<li class="next"><a <li class="next"><a
href="/my_submissions/{{ next_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if tag %}?tag={{ tag }}{% endif %}">下一页 <span href="/my_submissions/{{ next_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if tag %}?tag={{ tag }}{% endif %}">下一页 <span
aria-hidden="true">&rarr;</span></a></li> aria-hidden="true">&rarr;</span></a></li>
{% endif %} {% endif %}
</ul> </ul>
</nav> </nav>
</div> </div>
{% endblock %} {% endblock %}