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.
Hydro/templates/record_detail.html

110 lines
4.0 KiB
HTML

{% set page_name = "record_detail" %}
{% import "components/problem.html" as problem with context %}
{% extends "layout/basic.html" %}
{% block content %}
<script>
var Context = {
'socketUrl': "/record-detail-conn?rid={{ rdoc._id }}"
};
</script>
<div class="row">
<div class="medium-9 columns">
{% if show_status %}
{% include 'record_detail_status.html' %}
{% endif %}
{% if rdoc['code'] %}
<div class="section">
<div class="section__header">
<h1 class="section__title">{{ _('Code') }}</h1>
</div>
<div class="section__body" data-syntax-hl-show-line-number>
<pre><code class="language-{{ builtin.LANG_HIGHLIGHT_ID[rdoc['lang']] }}">{{ rdoc['code'] }}</code></pre>
</div>
</div>
{% endif %}
</div>
<div class="medium-3 columns">
<div class="section side">
<div class="section__header">
<h1 class="section__title">{{ _('Information') }}</h1>
</div>
{% if handler.hasPerm(perm.PERM_REJUDGE) %}
<div class="section__body no-padding">
<ol class="menu">
<li class="menu__item">
<form method="post" action="/r/{{ rdoc._id }}/rejudge">
<input type="hidden" name="csrf_token" value="{{ handler.csrf_token }}">
<button type="submit" class="menu__link">
<span class="icon icon-refresh"></span> {{ _('Rejudge') }}
</button>
</form>
</li>
<li class="menu__item">
<form method="post" action="/judge/end">
<input type="hidden" name="rid" value="{{ rdoc._id }}">
<input type="hidden" name="csrf_token" value="{{ handler.csrf_token }}">
<input type="hidden" name="score" value="0">
<input type="hidden" name="message" value="{{ _('score canceled') }}">
<button type="submit" class="menu__link">
<span class="icon icon-close"></span> {{ _('Cancel Score') }}
</button>
</form>
</li>
</ol>
</div>
{% endif %}
<div class="section__body typo">
<dl class="large horizontal">
<dt>{{ _('Submit By') }}</dt>
<dd>{{ user.render_inline(udoc, dudoc, modbadge=false) }}</dd>
{% if pdoc %}
<dt>{{ _('Problem') }}</dt>
<dd>
{{ problem.render_problem_title(pdoc, tdoc, show_tags=false, show_invisible_flag=false, rp=none) }}
</dd>
{% endif %}
{% if tdoc %}
{% if tdoc['doc_type'] == vj4.model.document.TYPE_CONTEST %}
<dt>{{ _('Contest') }}</dt>
<dd>
<a href="/t/{{ tdoc._id }}">{{ tdoc['title'] }}</a>
</dd>
{% else %}{# tdoc['doc_type'] == vj4.model.document.TYPE_CONTEST #}
<dt>{{ _('Homework') }}</dt>
<dd>
<a href="{{ reverse_url('homework_detail', tid=tdoc['doc_id']) }}">{{ tdoc['title'] }}</a>
</dd>
{% endif %}{# tdoc['doc_type'] == vj4.model.document.TYPE_CONTEST #}
{% endif %}{# tdoc #}
{% if pdoc and (user._id == pdoc.owner or handler.hasPerm(perm.PERM_READ_PROBLEM_DATA)) %}
<dt>{{ _('Problem Data') }}</dt>
<dd><a href="/p/{{ pdoc.pid }}/data"><span class="icon icon-download"></span> {{ _('Download') }}</a></dd>
{% endif %}
<dt>{{ _('Language') }}</dt>
<dd>
{{ builtin.LANG_TEXTS[rdoc['lang']] }}
</dd>
<dt>
{{ _('Submit At') }}
</dt>
<dd>
{{ datetime_span(rdoc._id)|safe }}
</dd>
{% if rdoc.judgeAt %}
<dt>{{ _('Judged At') }}</dt>
<dd>{{ datetime_span(rdoc.judgeAt)|safe }}</dd>
{% endif %}
{% if judge_udoc %}
<dt>{{ _('Judged By') }}</dt>
<dd>{{ user.render_inline(judge_udoc, badge=false) }}</dd>
{% endif %}
</dl>
{% if show_status %}
{% include 'record_detail_summary.html' %}
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}