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.
108 lines
4.2 KiB
HTML
108 lines
4.2 KiB
HTML
{% extends "layout/basic.html" %}
|
|
{% import "components/contest.html" as contest with context %}
|
|
{% import "components/record.html" as record with context %}
|
|
{% import "components/problem.html" as problem with context %}
|
|
{% block content %}
|
|
{{ set(UiContext, 'tdoc', tdoc) }}
|
|
{{ set(UiContext, 'tsdoc', tsdoc) }}
|
|
<div class="row">
|
|
<div class="medium-9 columns">
|
|
<div class="section">
|
|
<div class="section__header">
|
|
<h1 class="section__title">{{ _('Problems') }}</h1>
|
|
</div>
|
|
<div class="section__body no-padding">
|
|
<table class="data-table">
|
|
<colgroup>
|
|
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
|
<col class="col--status">
|
|
<col class="col--submit-at">
|
|
{% endif %}
|
|
<col class="col--problem">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
|
<th class="col--status record-status--border">{{ _('Status') }}</th>
|
|
<th class="col--submit-at">{{ _('Last Submit At') }}</th>
|
|
{% endif %}
|
|
<th class="col--problem">{{ _('Problem') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{%- for pid in tdoc.pids -%}
|
|
<tr>
|
|
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
|
{% if psdict[pid] and psdict[pid].rid %}
|
|
{% set rdoc = rdict[psdict[pid].rid] %}
|
|
{% if model.contest.canShowSelfRecord.call(handler, tdoc) %}
|
|
{{ record.render_status_td(rdoc) }}
|
|
{% else %}
|
|
<td class="col--status record-status--border"><a href="{{ url('record_detail', rid=rdoc._id) }}">{{ _('Submitted') }}</a></td>
|
|
{% endif %}
|
|
<td class="col--submit-at">{{ datetimeSpan(rdoc._id)|safe }}</td>
|
|
{% else %}
|
|
<td class="col--status record-status--border">{{ _('No Submissions') }}</td>
|
|
<td class="col--submit-at">-</td>
|
|
{% endif %}
|
|
{% endif %}
|
|
<td class="col--problem col--problem-name">
|
|
<a href="{{ url('problem_detail', pid=pid, query={tid:tdoc.docId}) }}">
|
|
<b>{{ String.fromCharCode(65+loop.index0) }}</b> {{ pdict[pid].title }}
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{%- endfor -%}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section">
|
|
<div class="section__header">
|
|
<h1 class="section__title">{{ _('Submissions') }}</h1>
|
|
</div>
|
|
<div class="section__body no-padding">
|
|
{% 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>
|
|
<col class="col--status">
|
|
<col class="col--problem">
|
|
<col class="col--submit-by">
|
|
<col class="col--time">
|
|
<col class="col--memory">
|
|
<col class="col--lang">
|
|
<col class="col--submit-at">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th class="col--status record-status--border">{{ _('Status') }}</th>
|
|
<th class="col--problem">{{ _('Problem') }}</th>
|
|
<th class="col--submit-by">{{ _('Submit By') }}</th>
|
|
<th class="col--time">{{ _('Time') }}</th>
|
|
<th class="col--memory">{{ _('Memory') }}</th>
|
|
<th class="col--lang">{{ _('Language') }}</th>
|
|
<th class="col--submit-at">{{ _('Submit At') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{%- for rdoc in rdocs -%}
|
|
{% set udoc = udict[rdoc['uid']] %}
|
|
{% set pdoc = pdict[rdoc['pid']] %}
|
|
{% include 'record_main_tr.html' %}
|
|
{%- endfor -%}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="medium-3 columns">
|
|
{% set owner_udoc = udict[tdoc.owner] %}
|
|
{% include "partials/contest_sidebar.html" %}
|
|
</div>
|
|
</div>
|
|
{% endblock %} |