ui: update pid display

pull/472/head
undefined 2 years ago
parent a6f48233d1
commit f4127a806a

@ -8,7 +8,7 @@ contest_detail: Contest Detail
contest_edit: Contest Edit
contest_files: Contest Files
contest_main: Contest
contest_problemlist: Proble List
contest_problemlist: Problem List
contest_scoreboard: Scoreboard
discussion_create: Create Discussion
discussion_detail: Discussion Detail

@ -252,8 +252,9 @@ export class ContestProblemListHandler extends ContestDetailBaseHandler {
if (contest.canShowSelfRecord.call(this, this.tdoc)) {
[this.response.body.rdict, this.response.body.rdocs] = await Promise.all([
record.getList(domainId, psdocs.map((i: any) => i.rid)),
await record.getMulti(domainId, { tid, uid: this.user._id }).toArray(),
await record.getMulti(domainId, { tid, uid: this.user._id }).sort({ _id: -1 }).toArray(),
]);
this.response.body.canViewRecord = true;
} else {
for (const i of psdocs) this.response.body.rdict[i.rid] = { _id: i.rid };
}

@ -46,7 +46,9 @@
{% endif %}
{% endif %}
<td class="col--problem col--problem-name">
{{ problem.render_problem_title(pdict[pid], tdoc=tdoc, show_invisible_flag=false, show_tags=false) }}
<a href="{{ url('problem_detail', pid=pid, query={tid:tdoc.docId}) }}">
<b>{{ String.fromCharCode(65+loop.index0) }}</b>&nbsp;&nbsp;{{ pdict[pid].title }}
</a>
</td>
</tr>
{%- endfor -%}
@ -54,10 +56,12 @@
</table>
</div>
</div>
<div class="section">
<div class="section">
<div class="section__body no-padding">
{% if not rdocs.length %}
{{ nothing.render('Oh, there is no task in the queue!') }}
{% if not canViewRecord %}
{{ nothing.render('According to the contest rules, you cannot view your submission details at current.') }}'
{% elif not rdocs.length %}
{{ nothing.render('Oh, there is no submission!') }}
{% else %}
<table class="data-table record_main__table">
<colgroup>
@ -93,8 +97,8 @@
</div>
</div>
<div class="medium-3 columns">
{% set owner_udoc = udict[tdoc.owner] %}
{% include "partials/contest_sidebar.html" %}
{% set owner_udoc = udict[tdoc.owner] %}
{% include "partials/contest_sidebar.html" %}
</div>
</div>
{% endblock %}

@ -44,7 +44,7 @@
</button>
</form>
{% endif %}
#{{ pdoc.pid|default(pdoc.docId) }}. {{ pdoc.title }}
#{{ String.fromCharCode(65+tdoc.pids.indexOf(pdoc.docId)) if tdoc else pdoc.pid|default(pdoc.docId) }}. {{ pdoc.title }}
</h1>
{% if tdoc %}
<div class="section__tools contest-problems">

Loading…
Cancel
Save