修改源码模板路径
This commit is contained in:
38
template/src/oj/contest/_contest_header.html
Normal file
38
template/src/oj/contest/_contest_header.html
Normal file
@@ -0,0 +1,38 @@
|
||||
{% load contest %}
|
||||
<h2 class="text-center">{{ contest.title }}</h2>
|
||||
|
||||
<hr>
|
||||
<div>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>开始时间</th>
|
||||
<th>结束时间</th>
|
||||
<th>状态</th>
|
||||
<th>比赛类型</th>
|
||||
<th>创建者</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ contest.start_time }}</td>
|
||||
<td>{{ contest.end_time }}</td>
|
||||
<td>{{ contest|contest_status }}</td>
|
||||
{% ifequal contest.contest_type 0 %}
|
||||
<td>小组赛</td>
|
||||
{% endifequal %}
|
||||
{% ifequal contest.contest_type 1 %}
|
||||
<td>公开赛</td>
|
||||
{% endifequal %}
|
||||
{% ifequal contest.contest_type 2 %}
|
||||
<td>公开赛(密码保护)</td>
|
||||
{% endifequal %}
|
||||
|
||||
<td>{{ contest.created_by.username }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<div>{{ contest.description|safe }}</div>
|
||||
</div>
|
||||
<p class="text-center"></p>
|
||||
21
template/src/oj/contest/contest_index.html
Normal file
21
template/src/oj/contest/contest_index.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% extends 'oj_base.html' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container main">
|
||||
<ul class="nav nav-tabs nav-tabs-google">
|
||||
<li role="presentation" class="active">
|
||||
<a href="/contest/{{ contest.id }}/">比赛详情</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/problems/">题目</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/submissions/">提交</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/rank/">排名</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% include "oj/contest/_contest_header.html" %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
81
template/src/oj/contest/contest_list.html
Normal file
81
template/src/oj/contest/contest_list.html
Normal file
@@ -0,0 +1,81 @@
|
||||
{% extends "oj_base.html" %}
|
||||
{% block body %}
|
||||
{% load contest %}
|
||||
<div class="container main">
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
<div class="right">
|
||||
<form class="form-inline" method="get">
|
||||
<div class="form-group-sm">
|
||||
<input name="keyword" class="form-control" placeholder="请输入关键词">
|
||||
<input type="submit" value="搜索" class="btn btn-primary">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>比赛名称</th>
|
||||
<th>开始时间</th>
|
||||
<th>比赛类型</th>
|
||||
<th>状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in contests %}
|
||||
<tr>
|
||||
<th scope="row"><a href="/contest/{{ item.id }}/">{{ item.id }}</a></th>
|
||||
<td><a href="/contest/{{ item.id }}/">{{ item.title }}</a></td>
|
||||
<td>{{ item.start_time }}</td>
|
||||
|
||||
{% ifequal item.contest_type 0 %}
|
||||
<td>小组赛</td>
|
||||
{% endifequal %}
|
||||
{% ifequal item.contest_type 1 %}
|
||||
<td>公开赛</td>
|
||||
{% endifequal %}
|
||||
{% ifequal item.contest_type 2 %}
|
||||
<td>公开赛(密码保护)</td>
|
||||
{% endifequal %}
|
||||
|
||||
<td class="{{ item|contest_status_color }}">{{ item|contest_status }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="form-group">
|
||||
<label>仅显示当前可参加的比赛
|
||||
<input id="join" type="checkbox" {% if join %}checked{% endif %} onchange="if(this.checked){location.href='/contests/?join=True'}else{location.href='/contests/'}">
|
||||
</label>
|
||||
</div>
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
{% if previous_page %}
|
||||
<li class="previous">
|
||||
<a href="/contests/{{ previous_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if join %}?join={{ join }}{% endif %}">
|
||||
<span aria-hidden="true">←</span> 上一页</a></li>
|
||||
{% endif %}
|
||||
{% if next_page %}
|
||||
<li class="next">
|
||||
<a href="/contests/{{ next_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if join %}?join={{ join }}{% endif %}">下一页 <span
|
||||
aria-hidden="true">→</span></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3">
|
||||
{% include "oj/announcement/_announcement_panel.html" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block js_block %}
|
||||
{% endblock %}
|
||||
110
template/src/oj/contest/contest_problem.html
Normal file
110
template/src/oj/contest/contest_problem.html
Normal file
@@ -0,0 +1,110 @@
|
||||
{% extends 'oj_base.html' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container main">
|
||||
<ul class="nav nav-tabs nav-tabs-google">
|
||||
<li role="presentation" class="active">
|
||||
<a href="/contest/{{ contest_problem.contest.id }}/problem/{{ contest_problem.id }}/">题目</a></li>
|
||||
<li role="presentation"><a
|
||||
href="/contest/{{ contest_problem.contest.id }}/problem/{{ contest_problem.id }}/submissions/">我的提交</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 class="text-center">{{ contest_problem.title }}</h2>
|
||||
|
||||
<p class="text-muted text-center">发布时间 : {{ contest_problem.create_time }}
|
||||
时间限制 : {{ contest_problem.time_limit }}ms
|
||||
内存限制 : {{ contest_problem.memory_limit }}M
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<div class="problem-section">
|
||||
<label class="problem-label">描述</label>
|
||||
|
||||
<p class="problem-detail">{{ contest_problem.description|safe }}</p>
|
||||
</div>
|
||||
<div class="problem-section">
|
||||
<label class="problem-label">输入</label>
|
||||
|
||||
<p class="problem-detail">{{ contest_problem.input_description }}</p>
|
||||
|
||||
<div>
|
||||
|
||||
<div class="problem-section">
|
||||
<label class="problem-label">输出</label>
|
||||
|
||||
<p class="problem-detail">{{ contest_problem.output_description }}</p>
|
||||
</div>
|
||||
{% for item in samples %}
|
||||
<div class="problem-section">
|
||||
<label class="problem-label">样例输入{{ forloop.counter }}</label>
|
||||
<pre>
|
||||
{{ item.input }}</pre>
|
||||
|
||||
</div>
|
||||
<div class="problem-section">
|
||||
|
||||
<label class="problem-label">样例输出{{ forloop.counter }}</label>
|
||||
<pre>
|
||||
{{ item.output }}</pre>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if problem.hint %}
|
||||
<div class="problem-section hide">
|
||||
<label class="problem-label">提示</label>
|
||||
|
||||
<p class="problem-detail">{{ contest_problem.hint|safe }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if contest_problem.hint %}
|
||||
<div class="problem-section hide">
|
||||
<label class="problem-label">提示</label>
|
||||
|
||||
<p class="problem-detail">{{ contest_problem.hint|safe }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% ifequal contest.status 0 %}
|
||||
<div>
|
||||
<label>选择语言</label>
|
||||
|
||||
<div>
|
||||
<label class="radio-inline">
|
||||
<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)
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="language" value="3"> Java (jre 1.7)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="code-field">
|
||||
<label class="problem-label">提交代码</label>
|
||||
<textarea id="code-editor"></textarea>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div id="submit-code">
|
||||
<button type="button" class="btn btn-primary" id="submit-code-button">
|
||||
提交代码
|
||||
</button>
|
||||
<img src="/static/img/loading.gif" id="loading-gif">
|
||||
|
||||
</div>
|
||||
{% endifequal %}
|
||||
|
||||
{% if show_warning %}
|
||||
<div class="alert alert-success" role="alert">{{ warning }}</div>
|
||||
{% endif %}
|
||||
|
||||
<div id="result">
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script src="/static/js/app/oj/problem/problem.js"></script>
|
||||
{% endblock %}
|
||||
67
template/src/oj/contest/contest_problems_list.html
Normal file
67
template/src/oj/contest/contest_problems_list.html
Normal file
@@ -0,0 +1,67 @@
|
||||
{% extends "oj_base.html" %}
|
||||
{% block body %}
|
||||
{% load problem %}
|
||||
<div class="container main">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12 contest-tab">
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-google">
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/">比赛详情</a>
|
||||
</li>
|
||||
<li role="presentation" class="active">
|
||||
<a href="/contest/{{ contest.id }}/problems/">题目</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/submissions/">提交</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/rank/">排名</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-9">
|
||||
<div>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>#</th>
|
||||
<th>题目</th>
|
||||
<th>通过率</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in contest_problems %}
|
||||
<tr>
|
||||
<th><span class="glyphicon glyphicon-ok ac-flag"></span></th>
|
||||
<th scope="row">
|
||||
<a href="/contest/{{ item.contest.id }}/problem/{{ item.id }}/" target="_blank">{{ item.sort_index }}</a>
|
||||
</th>
|
||||
<td>
|
||||
<a href="/contest/{{ item.contest.id }}/problem/{{ item.id }}/" target="_blank">{{ item.title }}</a>
|
||||
</td>
|
||||
<td>{{ item|accepted_radio }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
{% include "oj/announcement/_announcement_panel.html" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block js_block %}
|
||||
<script src="/static/js/app/oj/problem/problem_list.js"></script>
|
||||
{% endblock %}
|
||||
59
template/src/oj/contest/contest_rank.html
Normal file
59
template/src/oj/contest/contest_rank.html
Normal file
@@ -0,0 +1,59 @@
|
||||
{% extends "oj_base.html" %}
|
||||
{% block body %}
|
||||
{% load submission %}
|
||||
<div class="container main">
|
||||
<div class="col-lg-12 contest-tab">
|
||||
<ul class="nav nav-tabs nav-tabs-google">
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/">比赛详情</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/problems/">题目</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/submissions/">提交</a>
|
||||
</li>
|
||||
<li role="presentation" class="active">
|
||||
<a href="/contest/{{ contest.id }}/rank/">排名</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>用户名</th>
|
||||
<th>AC / 总提交</th>
|
||||
<th>用时 + 罚时</th>
|
||||
{% for item in contest_problems %}
|
||||
<th><a href="/contest/{{ contest.id }}/problem/{{ item.id }}/">{{ item.sort_index }}</a>
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in result %}
|
||||
<tr>
|
||||
<th scope="row">{{ forloop.counter }}</th>
|
||||
<td>{{ item.user.username }}</td>
|
||||
<td>{{ item.total_ac }} / {{ item.total_submit }}</td>
|
||||
<td>{% if item.total_time %}{{ item.total_time }} min{% else %}--{% endif %}</td>
|
||||
{% for problem in contest_problems %}
|
||||
<td class="{% submission_problem_result_class problem item.submissions %}">
|
||||
{% submission_problem problem item.submissions %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block js_block %}
|
||||
{% endblock %}
|
||||
71
template/src/oj/contest/my_submission.html
Normal file
71
template/src/oj/contest/my_submission.html
Normal file
@@ -0,0 +1,71 @@
|
||||
{% extends 'oj_base.html' %}
|
||||
{% block css_block %}
|
||||
<style>
|
||||
.CodeMirror {
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
{% load submission %}
|
||||
<div class="container main">
|
||||
<ul class="nav nav-tabs nav-tabs-google">
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ problem.contest.id }}/problem/{{ problem.id }}/">题目</a></li>
|
||||
<li role="presentation" class="active">
|
||||
<a href="/contest/{{ problem.contest.id }}/problem/{{ problem.id }}/submissions/">
|
||||
我的提交</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% include "oj/problem/_problem_header.html" %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<h4>运行结果 : <span class="text-{{ submission.result|translate_result_class }}">
|
||||
{{ submission.result|translate_result }}
|
||||
</span>
|
||||
</h4>
|
||||
{% ifequal submission.result 0 %}
|
||||
<p>时间 : {{ submission.accepted_answer_time }}ms 语言 :
|
||||
{{ submission.language|translate_language }}
|
||||
</p>
|
||||
{% endifequal %}
|
||||
{% ifequal submission.result 4 %}
|
||||
<p>{{ submission.info }}</p>
|
||||
{% endifequal %}
|
||||
<p>提交时间 : {{ submission.create_time }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% ifequal request.user.admin_type 2 %}
|
||||
<p>本调试信息仅超级管理员可见</p>
|
||||
{% ifequal submission.result 7 %}
|
||||
<pre>System Error: {{ submission.info }}</pre>
|
||||
{% else %}
|
||||
<pre>{{ info }}</pre>
|
||||
{% endifequal %}
|
||||
|
||||
{% endifequal %}
|
||||
|
||||
|
||||
<div id="code-field">
|
||||
<textarea id="code-editor">{{ submission.code }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script>
|
||||
require(["jquery", "codeMirror"], function ($, codeMirror) {
|
||||
{% ifequal submission.language 1 %}
|
||||
var language = "text/x-csrc";
|
||||
{% else %}
|
||||
{% ifequal submission.language 2 %}
|
||||
var language = "text/x-c++src";
|
||||
{% else %}
|
||||
var language = "text/x-java";
|
||||
{% endifequal %}
|
||||
{% endifequal %}
|
||||
var codeEditor = codeMirror($("#code-editor")[0], language);
|
||||
codeEditor.setOption("readOnly", true);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
48
template/src/oj/contest/my_submissions_list.html
Normal file
48
template/src/oj/contest/my_submissions_list.html
Normal file
@@ -0,0 +1,48 @@
|
||||
{% 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="/contest/{{ problem.contest.id }}/problem/{{ problem.id }}/">题目</a></li>
|
||||
<li role="presentation" class="active">
|
||||
<a href="/contest/{{ problem.contest.id }}/problem/{{ problem.id }}/submissions/">
|
||||
我的提交</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% include "oj/problem/_problem_header.html" %}
|
||||
<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="/submission/{{ item.id }}/">{{ forloop.counter }}</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>
|
||||
</div>
|
||||
{% endblock %}
|
||||
41
template/src/oj/contest/no_contest_permission.html
Normal file
41
template/src/oj/contest/no_contest_permission.html
Normal file
@@ -0,0 +1,41 @@
|
||||
{% extends 'oj_base.html' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container main">
|
||||
<ul class="nav nav-tabs nav-tabs-google">
|
||||
<li role="presentation" class="active">
|
||||
<a href="/contest/{{ contest.id }}/">比赛详情</a>
|
||||
</li>
|
||||
{% if show_tab %}
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/problems/">题目</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/submissions/">提交</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/rank/">排名</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% include "oj/contest/_contest_header.html" %}
|
||||
{% ifequal reason "password_protect" %}
|
||||
<div class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>密码</label>
|
||||
<input type="password" class="form-control" id="contest-password" placeholder="请输入密码">
|
||||
</div>
|
||||
<button type="button" id="contest-password-btn" class="btn btn-primary">提交</button>
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal reason "group_limited" %}
|
||||
<div class="alert alert-danger" role="alert">比赛仅指定小组可以参加,你不在这些小组中。</div>
|
||||
{% endifequal %}
|
||||
{% ifequal reason "contest_not_start" %}
|
||||
<div class="alert alert-danger" role="alert">比赛还没有开始。</div>
|
||||
{% endifequal %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script src="/static/js/app/oj/contest/contest_password.js"></script>
|
||||
{% endblock %}
|
||||
84
template/src/oj/contest/submissions_list.html
Normal file
84
template/src/oj/contest/submissions_list.html
Normal file
@@ -0,0 +1,84 @@
|
||||
{% extends 'oj_base.html' %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
{% load submission %}
|
||||
{% load user %}
|
||||
<div class="container main">
|
||||
<div class="contest-tab">
|
||||
<ul class="nav nav-tabs nav-tabs-google">
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/">比赛详情</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/problems/">题目</a>
|
||||
</li>
|
||||
<li role="presentation" class="active">
|
||||
<a href="/contest/{{ contest.id }}/submissions/">提交</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="/contest/{{ contest.id }}/rank/">排名</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% if submissions %}
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr class="" success>
|
||||
<th>#</th>
|
||||
<td>用户</td>
|
||||
<th>提交时间</th>
|
||||
<th>结果</th>
|
||||
<th>运行时间</th>
|
||||
<th>语言</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in submissions %}
|
||||
<tr class="{{ item.result|translate_result_class }}">
|
||||
|
||||
{% ifequal item.user_id request.user.id %}
|
||||
<th scope="row"><a href="/submission/{{ item.id }}/" id="id_{{ forloop.counter }}">
|
||||
{{ forloop.counter |add:start_id }}</a></th>
|
||||
{% else %}
|
||||
<th scope="row">{{ forloop.counter |add:start_id }}</th>
|
||||
{% endifequal %}
|
||||
|
||||
<td>{{ item.user_id|get_username }}</td>
|
||||
|
||||
<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>
|
||||
{% else %}
|
||||
<p>你还没有提交记录!</p>
|
||||
{% endif %}
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
{% if previous_page %}
|
||||
<li class="previous"><a
|
||||
href="/contest/{{ contest.id }}/submissions/{{ previous_page }}/">
|
||||
<span aria-hidden="true">←</span> 上一页</a></li>
|
||||
{% endif %}
|
||||
{% if next_page %}
|
||||
<li class="next">
|
||||
<a href="/contest/{{ contest.id }}/submissions/{{ next_page }}/">下一页 <span
|
||||
aria-hidden="true">→</span></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user