更新我的提交列表页面

This commit is contained in:
virusdefender
2015-08-13 21:02:17 +08:00
parent 58f9014688
commit 94282f3ed8
8 changed files with 101 additions and 60 deletions

View File

@@ -1,53 +0,0 @@
{% extends 'oj_base.html' %}
{% block body %}
<div class="container main">
<ul class="nav nav-tabs nav-tabs-google">
<li role="presentation">
<a href="/problem/1/">题目</a></li>
<li role="presentation" class="active"><a href="my_solutions_list.html">我的提交</a></li>
</ul>
<h2 class="text-center">Battle Over Cities - Hard Version</h2>
<p class="text-muted text-center">cpu: 1000ms 内存: 256M</p>
<table class="table table-bordered">
<thead>
<tr class=""success>
<th>#</th>
<th>提交时间</th>
<th>结果</th>
<th>运行时间</th>
<th>运行内存</th>
<th>语言</th>
</tr>
</thead>
<tbody>
<tr class="warning">
<th scope="row">1</th>
<td>1</td>
<td>Error Format</td>
<td>3</td>
<td>3</td>
<td>3</td>
</tr>
<tr class="danger">
<th scope="row">2</th>
<td>Wrong</td>
<td>Wrong Answer</td>
<td>@fat</td>
<td>3</td>
<td>3</td>
</tr>
<tr class="success">
<th scope="row">3</th>
<td>Larry</td>
<td>Accepted</td>
<td>@twitter</td>
<td>3</td>
<td>3</td>
</tr>
</tbody>
</table>
</div>
{% endblock %}

View File

@@ -0,0 +1,64 @@
{% extends 'oj_base.html' %}
{% block body %}
{% load submission %}
<div class="container main">
<ul class="nav nav-tabs nav-tabs-google">
<li role="presentation">
<a href="/problem/1/">题目</a></li>
<li role="presentation" class="active"><a href="my_solutions_list.html">我的提交</a></li>
</ul>
<h2 class="text-center">Battle Over Cities - Hard Version</h2>
<p class="text-muted text-center">cpu: 1000ms 内存: 256M</p>
<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 %}
{% ifequal item.result 0 %}
<tr class="success">
{% else %}
{% ifequal item.result 8 %}
<tr class="info">
{% else %}
<tr class="danger">
{% endifequal %}
{% endifequal %}
<th scope="row"><a href="/my_solution/{{ item|translate_id }}/">{{ forloop.counter }}</a></th>
<td>{{ item.create_time }}</td>
<td>{{ item.result|translate_result }}</td>
<td>
{% if item.accepted_answer_info.time %}
{{ item.accepted_answer_info.time }}ms
{% else %}
--
{% endif %}
</td>
<td>
{% ifequal item.language 1 %}
C
{% else %}
{% ifequal item.language 2 %}
C++
{% else %}
Java
{% endifequal %}
{% endifequal %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}

View File

@@ -67,10 +67,10 @@
<div>
<label class="radio-inline">
<input type="radio" name="language" value="1" checked> c (gcc 4.8)
<input type="radio" name="language" value="1" checked> C (gcc 4.8)
</label>
<label class="radio-inline">
<input type="radio" name="language" value="2"> c++ (g++ 4.3)
<input type="radio" name="language" value="2"> C++ (g++ 4.3)
</label>
<label class="radio-inline">
<input type="radio" name="language" value="3"> Java (jre 1.7)