From 4adb1c0b0ce3888e691083c74f7c34dbc060b72a Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Tue, 25 Aug 2015 10:57:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E6=A0=BC=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8F=90=E4=BA=A4=E5=88=97=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oj/contest/contest_problems_list.html | 7 +- template/oj/contest/submissions_list.html | 148 +++++++++--------- utils/templatetags/user.py | 17 ++ 3 files changed, 97 insertions(+), 75 deletions(-) create mode 100644 utils/templatetags/user.py diff --git a/template/oj/contest/contest_problems_list.html b/template/oj/contest/contest_problems_list.html index 4dd68c5..2a863dd 100644 --- a/template/oj/contest/contest_problems_list.html +++ b/template/oj/contest/contest_problems_list.html @@ -41,10 +41,11 @@ {% for item in contest_problems %}
| # | -提交时间 | -结果 | -运行时间 | -语言 | -|||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| # | +用户 | +提交时间 | +结果 | +运行时间 | +语言 | +||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| - {{ forloop.counter |add:start_id }} | - {% else %} -{{ forloop.counter |add:start_id }} | - {% endifequal %} + {% ifequal item.user_id request.user.id %} ++ {{ forloop.counter |add:start_id }} | + {% else %} +{{ forloop.counter |add:start_id }} | + {% endifequal %} -{{ item.create_time }} | -{{ item.result|translate_result }} | -- {% if item.accepted_answer_time %} - {{ item.accepted_answer_time }}ms - {% else %} - -- + | {{ item.user_id|get_username }} | + +{{ item.create_time }} | +{{ item.result|translate_result }} | ++ {% if item.accepted_answer_time %} + {{ item.accepted_answer_time }}ms + {% else %} + -- + {% endif %} + | ++ {{ item.language|translate_language }} + | +
你还没有提交记录!
+ {% endif %} +你还没有提交记录!
- {% endif %} - -