mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
core: 删除题目前检查是否已被比赛使用
This commit is contained in:
1 parent
e4c6cf258d
commit
26ded9d5df
9 files changed
+78
-62
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.8.32",
|
||||
"version": "4.8.33",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
@@ -251,7 +251,10 @@ const page = new NamedPage(['problem_detail', 'contest_detail_problem', 'homewor
|
||||
loadSubjective();
|
||||
|
||||
if (pagename === 'contest_detail_problem') return;
|
||||
UiContext.pdoc.stats = UiContext.pdoc.stats || {};
|
||||
if (!Object.keys(UiContext.pdoc.stats || {}).length) {
|
||||
$('#submission-status-placeholder').parent().hide();
|
||||
return;
|
||||
}
|
||||
const $status = document.getElementById('submission-status-placeholder');
|
||||
const statusChart = echarts.init($status);
|
||||
statusChart.setOption({
|
||||
|
||||
@@ -105,14 +105,14 @@
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
{% if page_name != 'problem_detail' and page_name != 'homework_detail_problem' %}
|
||||
{% if page_name != 'problem_detail' and page_name != 'homework_detail_problem' and page_name != 'contest_detail_problem' %}
|
||||
<div class="section side">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('Information') }}</h1>
|
||||
</div>
|
||||
{% include "partials/problem-sidebar-information.html" %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% elif page_name != 'contest_detail_problem' %}
|
||||
<div class="section side nojs-hide">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('Statistics') }}</h1>
|
||||
@@ -121,22 +121,22 @@
|
||||
<div id="submission-score-placeholder" style="width: 100%; height:230px"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if page_name == 'problem_detail' and (tdocs or ctdocs) %}
|
||||
{% if page_name == 'problem_detail' and (tdocs.length or ctdocs.length) %}
|
||||
<div class="section side">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('Related') }}</h1>
|
||||
</div>
|
||||
<div class="section__body typo">
|
||||
{% if tdocs %}
|
||||
{% if tdocs.length %}
|
||||
<p>{{ _('In following training plans') }}: </p>
|
||||
{%- for tdoc in tdocs -%}
|
||||
<p><a href="{{ url('training_detail', tid=tdoc.docId) }}">{{ tdoc.title }}</a></p>
|
||||
<p><a href="{{ url('training_detail', tid=tdoc.docId) }}">{{ tdoc.title }}</a></p>
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
{% if ctdocs %}
|
||||
{% if ctdocs.length %}
|
||||
<p>{{ _('In following contests') }}: </p>
|
||||
{%- for tdoc in ctdocs -%}
|
||||
<p><a href="{{ url('contest_detail', tid=tdoc.docId) }}">{{ tdoc.title }}</a></p>
|
||||
<p><a href="{{ url('contest_detail', tid=tdoc.docId) }}">{{ tdoc.title }}</a></p>
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user