算法评测平台前端。
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.

55 lines
2.2 KiB

<% this.title = '排名' %>
8 years ago
<% include header %>
<div class="padding">
<form action="<%= syzoj.utils.makeUrl(['find_user']) %>" class="ui mini form" method="get" role="form" style="margin-bottom: 25px; text-align: right; ">
<div class="ui action left icon input inline" style="width: 180px; margin-right: 77px; ">
8 years ago
<i class="search icon"></i><input name="nickname" placeholder="用户名" type="text">
<button class="ui mini button" type="submit">查找用户</button>
</div>
</form>
<table class="ui very basic center aligned table" style="table-layout: fixed; ">
8 years ago
<thead>
<tr>
<th style="width: 60px; ">#</th>
<th style="width: 150px; ">用户</th>
<th style="width: 100px; "><%- createSortableTitle('ac_num', '通过数量', false) %></th>
<th style="width: 150px; "><%- createSortableTitle('submit_num', '提交数量', true) %></th>
<th style="width: 150px; ">通过率</th>
6 years ago
<th style="width: 100px; "><%- createSortableTitle('rating', '积分', false) %></th>
8 years ago
</tr>
</thead>
<script>
var lineHeight = 0;
(function () {
var div = document.createElement('div');
div.style.position = 'fixed';
div.style.left = -10000;
div.style.visibility = 'hidden';
div.innerText = '测试,Test.';
document.body.appendChild(div);
lineHeight = div.clientHeight;
})();
</script>
8 years ago
<tbody>
<%
8 years ago
let i = (paginate.currPage - 1) * paginate.perPage;
for (let user of ranklist) {
++i;
%>
<tr>
6 years ago
<td><b><%= i %></b></td>
<td><a href="<%= syzoj.utils.makeUrl(['user', user.id]) %>"><%= user.nickname %></a><% if (user.nameplate) { %><%- user.nameplate %><% } %></td>
8 years ago
<td><%= user.ac_num %></td>
<td><%= user.submit_num %></td>
<td><%= user.ac_num && user.submit_num ? Math.round(user.ac_num / user.submit_num * 10000) / 100.00 + "%" : 0%></td>
<td><%= user.rating %></td>
8 years ago
</tr>
<% } %>
8 years ago
</tbody>
</table>
<br>
8 years ago
<% include page %>
</div>
8 years ago
<% include footer %>