You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
3.0 KiB

<% this.title = '评测记录' %>
8 years ago
<% include header %>
<div class="padding">
<div class="ui two column grid">
<div class="twelve wide column">
<form action="<%= syzoj.utils.makeUrl(['judge_state']) %>" class="ui mini form" method="get" role="form">
<div class="inline field">
<input name="submitter" placeholder="提交者" style="margin: 0px;" type="text" value="<%= form.submitter %>"> <input name="problem_id" placeholder="题目编号" type="text" value="<%= form.problem_id %>"> <button class="ui mini button" type="submit">搜索</button>
8 years ago
</div>
</form>
8 years ago
</div>
<% if (user) { %>
<div class="four wide column padding">
<a class="ui mini button right floated" href="<%= syzoj.utils.makeUrl(['judge_state'], { submitter: user.username }) %>">我的提交</a>
8 years ago
</div>
<% } %>
</div><br>
<table class="ui very basic center aligned table">
<thead>
<tr>
<th>编号</th>
<th>题目</th>
<th>状态</th>
<th>分数</th>
<th>总时间</th>
<th>提交者</th>
<th>提交时间</th>
<th>代码</th>
</tr>
</thead>
<tbody>
<% for (let judge of judge_state) { %>
<tr>
<td><a href="<%= syzoj.utils.makeUrl(['judge_detail', judge.id]) %>">#<%= judge.id %></a></td>
<td><a href="<%= syzoj.utils.makeUrl(['problem', judge.problem_id]) %>">#<%= judge.problem_id %>. <%= judge.problem.title %></a></td>
<% if (!judge.hidden) { %>
<td><a href="<%= syzoj.utils.makeUrl(['judge_detail', judge.id]) %>">
<span class="status <%= judge.status.toLowerCase().split(' ').join('_') %>">
<%
let icon = {
'Accepted': 'checkmark',
'Wrong Answer': 'remove',
'Runtime Error': 'bomb',
'Time Limit Exceed': 'clock',
'Memory Limit Exceed': 'disk outline',
'Output Limit Exceed': 'expand',
'Waiting': 'spinner',
'Compile Error': 'code',
'System Error': 'server'
}
%>
<i class="<%= icon[judge.status] || 'remove' %> icon"></i>
<%= judge.status %>
</span>
</a></td>
<td><a href="<%= syzoj.utils.makeUrl(['judge_detail', judge.id]) %>"><span class="score score_<%= parseInt(judge.result.score / 10) || 0 %>"><%= judge.result.score %></span></a></td>
<td><%= judge.result.total_time %> ms</td>
<% } else { %>
<td>隐藏</td>
<td>隐藏</td>
<td>隐藏</td>
<% } %>
<td><a href="<%= syzoj.utils.makeUrl(['user', judge.user_id]) %>"><%= judge.user.username %></a><% if (judge.user.nameplate) { %><%- judge.user.nameplate %><% } %></td>
<td><%= syzoj.utils.formatDate(judge.submit_time) %></td>
<td><a href="<%= syzoj.utils.makeUrl(['judge_detail', judge.id]) %>"><i style="color: #000;" class="code icon"></i></a></td>
</tr>
<% } %>
</tbody>
</table>
<br>
<% include page %>
8 years ago
</div>
<% include footer %>