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.
74 lines
2.9 KiB
HTML
74 lines
2.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.user.hasPerm(perm.PERM_EDIT_PROBLEM) %}
|
|
<col class="col--checkbox display-mode-hide">
|
|
<col class="col--pid display-mode-hide">
|
|
{% endif %}
|
|
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
|
<col class="col--status edit-mode-hide">
|
|
{% endif %}
|
|
<col class="col--name">
|
|
<col class="col--tried">
|
|
<col class="col--ac">
|
|
<col class="col--difficulty">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
{% if handler.user.hasPerm(perm.PERM_EDIT_PROBLEM) %}
|
|
<th class="col--checkbox display-mode-hide">
|
|
<label class="compact checkbox">
|
|
<input type="checkbox" name="select_all" data-checkbox-toggle="problem">
|
|
</label>
|
|
</th>
|
|
<th class="col--pid display-mode-hide">{{ _('ID') }}</th>
|
|
{% endif %}
|
|
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
|
<th class="col--status record-status--border edit-mode-hide">{{ _('Status') }}</th>
|
|
{% endif %}
|
|
<th class="col--name">{{ _('Problem') }}<span style="float:right" id="hideTags">{{ _('Hide tags') }}</span></th>
|
|
<th class="col--tried">{{ _('Tried') }}</th>
|
|
<th class="col--ac">{{ _('AC') }}</th>
|
|
<th class="col--difficulty">{{ _('Difficulty') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{%- for pdoc in pdocs -%}
|
|
{% set psdoc = psdict[pdoc['docId']] %}
|
|
<tr data-pid="{{ pdoc.docId }}">
|
|
{% if handler.user.hasPerm(perm.PERM_EDIT_PROBLEM) %}
|
|
<td class="col--checkbox display-mode-hide">
|
|
<label class="compact checkbox">
|
|
<input type="checkbox" data-checkbox-group="problem" data-checkbox-range>
|
|
</label>
|
|
</td>
|
|
<td class="col--pid display-mode-hide">{{ pdoc.docId }}</td>
|
|
{% endif %}
|
|
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
|
{% if psdoc['rid'] %}
|
|
{{ record.render_status_td(psdoc, rid_key='rid', class="edit-mode-hide") }}
|
|
{% else %}
|
|
<td class="col--status record-status--border edit-mode-hide"></td>
|
|
{% endif %}
|
|
{% endif %}
|
|
<td class="col--name col--problem-name">
|
|
{{ problem.render_problem_title(pdoc) }}
|
|
</td>
|
|
<td class="col--tried">{{ pdoc.nSubmit }}</td>
|
|
<td class="col--ac">{{ pdoc.nAccept }}</td>
|
|
<td class="col--difficulty">{{ pdoc['difficulty'] or _('(None)') }}</td>
|
|
</tr>
|
|
{%- endfor -%}
|
|
</tbody>
|
|
</table>
|
|
{{ paginator.render(page, ppcount) }}
|
|
{% endif %}
|
|
</div>
|