You cannot 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
1.9 KiB
HTML
55 lines
1.9 KiB
HTML
{% import "components/paginator.html" as paginator with context %}
|
|
{% import "components/record.html" as record with context %}
|
|
{% import "components/problem.html" as problem with context %}
|
|
{% import "components/nothing.html" as nothing with context %}
|
|
<div data-fragment-id="problem_list">
|
|
{% if not pdocs.length %}
|
|
{{ nothing.render('Sorry, there is no problem in the problem set') }}
|
|
{% else %}
|
|
<table class="data-table">
|
|
<colgroup>
|
|
{% if handler.hasPerm(perm.PERM_LOGGEDIN) %}
|
|
<col class="col--status">
|
|
{% endif %}
|
|
<col class="col--name">
|
|
<col class="col--submit_n">
|
|
<col class="col--ac_rate">
|
|
<col class="col--difficulty">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
{% if handler.hasPerm(perm.PERM_LOGGEDIN) %}
|
|
<th class="col--status record-status--border">{{ _('Status') }}</th>
|
|
{% endif %}
|
|
<th class="col--name">{{ _('Problem') }}</th>
|
|
<th class="col--submit_n">{{ _('Submit') }}</th>
|
|
<th class="col--ac_rate">% {{ _('AC') }}</th>
|
|
<th class="col--difficulty">{{ _('Difficulty') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for pdoc in pdocs %}
|
|
{% set psdoc = psdict[pdoc['_id']] %}
|
|
<tr>
|
|
{% if handler.hasPerm(perm.PERM_LOGGEDIN) %}
|
|
{% if psdoc['rid'] %}
|
|
{{ record.render_status_td(psdoc, rid_key='rid') }}
|
|
{% else %}
|
|
<td class="col--status record-status--border">
|
|
</td>
|
|
{% endif %}
|
|
{% endif %}
|
|
<td class="col--name col--problem-name">
|
|
{{ problem.render_problem_title(pdoc) }}
|
|
</td>
|
|
<td class="col--submit_n">{{ pdoc['nSubmit'] }}</td>
|
|
<td class="col--ac_rate">{{ (100 * pdoc['nAccept'] / pdoc['nSubmit'])|round|int if pdoc['nSubmit'] > 0 else _('?') }}</td>
|
|
<td class="col--difficulty">{{ pdoc['difficulty'] or _('(None)') }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{{ paginator.render(page, ppcount) }}
|
|
{% endif %}
|
|
</div>
|