mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-09-21 00:13:18 +00:00
[后端]去掉了用于生产序号的javascript,改为使用模板过滤器实现(我的所有提交)
This commit is contained in:
parent
4361f4d6e4
commit
35c4b09f57
@ -147,4 +147,4 @@ def my_submission_list_page(request, page=1):
|
||||
|
||||
return render(request, "oj/submission/my_submissions_list.html",
|
||||
{"submissions": current_page, "page": int(page),
|
||||
"previous_page": previous_page, "next_page": next_page})
|
||||
"previous_page": previous_page, "next_page": next_page, "startId":int(page)*20-20})
|
||||
|
@ -26,8 +26,8 @@
|
||||
<tbody>
|
||||
{% for item in submissions %}
|
||||
<tr class="{{ item.result|translate_result_class }}">
|
||||
<th scope="row"><a href="/my_submission/{{ item.id }}/" id="id_{{ forloop.counter }}">{{ forloop.counter
|
||||
}}</a></th>
|
||||
<th scope="row"><a href="/my_submission/{{ item.id }}/" id="id_{{ forloop.counter }}">
|
||||
{{ forloop.counter |add:startId }}</a></th>
|
||||
<td>{{ item.create_time }}</td>
|
||||
<td>{{ item.result|translate_result }}</td>
|
||||
<td>
|
||||
@ -63,12 +63,4 @@
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<script>
|
||||
for (var i = 1; true; i++) {
|
||||
if (!document.getElementById("id_"+i)) break;
|
||||
document.getElementById("id_"+i).innerHTML= ""+(i+{{page}}*20-20);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user