core&ui: only show code on contest record (#457)

This commit is contained in:
panda authored and GitHub committed 2022-11-04 01:24:12 +08:00
1 parent 865f30fe42
commit e92cbeb1ee
2 files changed
+14 -6

No files matched your search

@@ -1,10 +1,14 @@
{% import "components/problem.html" as problem with context %}
{% extends "layout/basic.html" %}
{% block content %}
{{ set(UiContext, 'socketUrl', "record-detail-conn?domainId=" + rdoc.domainId + "&rid=" + rdoc._id) }}
{% if typeof(rdoc['status']) === 'number' %}
{{ set(UiContext, 'socketUrl', "record-detail-conn?domainId=" + rdoc.domainId + "&rid=" + rdoc._id) }}
{% endif %}
<div class="row">
<div class="medium-9 columns">
{% include 'record_detail_status.html' %}
{% if typeof(rdoc['status']) === 'number' %}
{% include 'record_detail_status.html' %}
{% endif %}
{% if rdoc['code'] or rdoc.files.code %}
<div class="section">
<div class="section__header">
@@ -90,7 +94,9 @@
<dd>{{ user.render_inline(judge_udoc, badge=false) }}</dd>
{% endif %}
</dl>
{% include 'record_detail_summary.html' %}
{% if typeof(rdoc['status']) === 'number' %}
{% include 'record_detail_summary.html' %}
{% endif %}
</div>
</div>
</div>