ui: problem_edit tools

This commit is contained in:
undefined committed 2021-04-30 01:34:52 +08:00
1 parent 1910a57dbb
commit 3664df4202
10 files changed
+187 -58

No files matched your search

@@ -8,8 +8,12 @@
{% 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">
<col class="col--status edit-mode-hide">
{% endif %}
<col class="col--name">
<col class="col--submit_n">
@@ -18,8 +22,16 @@
</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">{{ _('Status') }}</th>
<th class="col--status record-status--border edit-mode-hide">{{ _('Status') }}</th>
{% endif %}
<th class="col--name">{{ _('Problem') }}</th>
<th class="col--submit_n">{{ _('Submit') }}</th>
@@ -28,17 +40,24 @@
</tr>
</thead>
<tbody>
{%- for pdoc in pdocs -%}
{% set psdoc = psdict[pdoc['docId']] %}
<tr>
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
{% if psdoc['rid'] %}
{{ record.render_status_td(psdoc, rid_key='rid') }}
{% else %}
<td class="col--status record-status--border">
</td>
{% endif %}
{% endif %}
{%- 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>