OnlineJudge/template/oj/problem/problem_list.html

83 lines
3.8 KiB
HTML
Raw Normal View History

{% extends "oj_base.html" %}
{% block body %}
2015-08-14 08:38:31 +00:00
{% load problem %}
2015-08-20 05:48:19 +00:00
<div class="container main">
<div class="row">
<div class="col-lg-9">
<div class="row">
2015-08-15 11:49:58 +00:00
<div class="right">
2015-08-21 07:28:03 +00:00
<form class="form-inline" method="get">
2015-08-14 08:38:31 +00:00
<div class="form-group-sm">
2015-08-21 07:28:03 +00:00
<input name="keyword" class="form-control" placeholder="请输入关键词">
<input type="submit" value="搜索" class="btn btn-primary">
2015-08-14 08:38:31 +00:00
</div>
</form>
</div>
</div>
<div>
<table class="table table-striped">
<thead>
<tr>
<th></th>
<th>#</th>
<th>题目</th>
<th><a href="/problems/?order_by=difficulty">难度</a></th>
2015-08-23 12:45:51 +00:00
<th><a href="/problems/?order_by=acceptance">通过率</a></th>
</tr>
</thead>
<tbody>
2015-08-14 08:38:31 +00:00
{% for item in problems %}
<tr>
<th><span class="glyphicon glyphicon-ok ac-flag"></span></th>
2015-08-23 12:45:51 +00:00
<th scope="row"><a href="/problem/{{ item.id }}/" target="_blank">{{ item.id }}</a></th>
<td><a href="/problem/{{ item.id }}/" target="_blank">{{ item.title }}</a></td>
2015-08-14 08:38:31 +00:00
<td>{{ item.difficulty }}</td>
<td>{{ item|accepted_radio }}</td>
2015-08-14 08:38:31 +00:00
</tr>
{% endfor %}
</tbody>
</table>
2015-08-14 08:38:31 +00:00
<nav>
<ul class="pager">
{% if previous_page %}
2015-08-15 05:54:30 +00:00
<li class="previous"><a
href="/problems/{{ previous_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if tag %}?tag={{ tag }}{% endif %}">
<span aria-hidden="true">&larr;</span> 上一页</a></li>
2015-08-14 08:38:31 +00:00
{% endif %}
{% if next_page %}
2015-08-15 05:54:30 +00:00
<li class="next"><a
href="/problems/{{ next_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if tag %}?tag={{ tag }}{% endif %}">下一页 <span
2015-08-14 08:38:31 +00:00
aria-hidden="true">&rarr;</span></a></li>
{% endif %}
</ul>
</nav>
</div>
</div>
2015-08-14 08:38:31 +00:00
<div class="col-lg-3">
2015-08-22 12:42:21 +00:00
{% include "oj/announcement/_announcement_panel.html" %}
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">
<span class="glyphicon glyphicon-tag" aria-hidden="true"></span>
分类
</h3>
</div>
<ul class="list-group">
{% for item in tags %}
<li class="list-group-item problem-tag" onclick="location.href='/problems/?tag={{ item.name }}'">
<span class="badge">{{ item.problem_number }}</span>
{{ item.name }}
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
{% endblock %}
{% block js_block %}
2015-08-14 08:38:31 +00:00
<script src="/static/js/app/oj/problem/problem_list.js"></script>
{% endblock %}