mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: add problem_config
Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
1 parent
0b71b089e0
commit
1f498484d2
20 files changed
+1128
-159
No files matched your search
@@ -0,0 +1,57 @@
|
||||
{% import "components/nothing.html" as nothing with context %}
|
||||
{% import "components/problem.html" as problem with context %}
|
||||
<div class="section side section--problem-sidebar-additional_file {{ 'expanded' if page_name == 'problem_edit' else 'collapsed'}}">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ additional_file.length if additional_file.length else 0 }} {{_('Testdata')}}</h1>
|
||||
</div>
|
||||
<ol class="menu">
|
||||
<li class="menu__item flex-row">
|
||||
<a class="menu__link half" href="javascript:;" name="create_file">
|
||||
<span class="icon icon-add"></span> {{ _('Create') }}
|
||||
</a>
|
||||
<a class="menu__link half" href="javascript:;" name="upload_file">
|
||||
<span class="icon icon-upload"></span> {{ _('Upload') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu__seperator"></li>
|
||||
<li class="menu__item">
|
||||
<a class="menu__link expanded--hidden" href="javascript:;" name="additional_file__section__expand">
|
||||
<span class="icon icon-expand_more"></span> {{ _('expand') }}
|
||||
</a>
|
||||
<a class="menu__link collapsed--hidden" href="javascript:;" name="additional_file__section__collapse">
|
||||
<span class="icon icon-expand_less"></span> {{ _('collapse') }}
|
||||
</a>
|
||||
</li>
|
||||
</ol>
|
||||
<div class="section__body no-padding problem-sidebar-additional_file__detail" data-fragment-id="problem-sidebar-additional_file">
|
||||
{% if additional_file.length %}
|
||||
<table class="data-table">
|
||||
<colgroup>
|
||||
<col class="col--name">
|
||||
<col class="col--size">
|
||||
<col class="col--operation">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col--name">{{ _('Filename') }}</th>
|
||||
<th class="col--size">{{ _('Size') }}</th>
|
||||
<th class="col--operation"><span class="icon icon-wrench"></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{%- for file in additional_file -%}
|
||||
<tr data-filename="{{ file.name }}" data-size="{{ file.size }}">
|
||||
<td class="col--name" title="{{ file.name }}">
|
||||
<a href="{{ url('problem_file_download', {pid: pdoc.docId, filename: file.name}) }}">{{ file.name }}</a>
|
||||
</td>
|
||||
<td class="col--size">{{ size(file.size) }}</td>
|
||||
<td class="col--operation"><a href="javascript:;" name="{{ file.name }}"><span class="icon icon-delete"></span></a></td>
|
||||
</tr>
|
||||
{%- endfor -%}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
{{ nothing.render('No additional file at current.',compact = true) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,6 +83,9 @@
|
||||
<li class="menu__item"><a class="menu__link{% if page_name == 'problem_edit' %} active{% endif %}" href="{{ url('problem_edit', pid=pdoc.pid|default(pdoc.docId)) }}">
|
||||
<span class="icon icon-edit"></span> {{ _('Edit') }}
|
||||
</a></li>
|
||||
<li class="menu__item"><a class="menu__link{% if page_name == 'problem_config' %} active{% endif %}" href="{{ url('problem_config', pid=pdoc.pid|default(pdoc.docId)) }}">
|
||||
<span class="icon icon-settings"></span> {{ _('Judge Config') }}
|
||||
</a></li>
|
||||
{% endif %}
|
||||
{% if page_name == 'problem_detail' %}
|
||||
<li class="menu__seperator nojs--hide"></li>
|
||||
@@ -100,14 +103,14 @@
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
{% if page_name != 'problem_detail' and page_name != 'homework_detail_problem' and page_name != 'contest_detail_problem' %}
|
||||
{% if page_name not in ['problem_config', 'problem_detail', 'homework_detail_problem', '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>
|
||||
{% elif page_name != 'contest_detail_problem' %}
|
||||
{% elif page_name != 'contest_detail_problem' and page_name != 'problem_config' %}
|
||||
<div class="section side nojs--hide">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('Statistics') }}</h1>
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
{% import "components/nothing.html" as nothing with context %}
|
||||
{% import "components/problem.html" as problem with context %}
|
||||
<div class="section side section--problem-sidebar-testdata collapsed">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ testdata.length if testdata.length else 0 }} {{_('Testdata')}}</h1>
|
||||
</div>
|
||||
<ol class="menu">
|
||||
<li class="menu__item flex-row">
|
||||
<a class="menu__link half" href="javascript:;" name="create_file">
|
||||
<span class="icon icon-add"></span> {{ _('Create') }}
|
||||
</a>
|
||||
<a class="menu__link half" href="javascript:;" name="upload_file">
|
||||
<span class="icon icon-upload"></span> {{ _('Upload') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu__seperator"></li>
|
||||
<li class="menu__item flex-row">
|
||||
<a class="menu__link half" href="javascript:;" name="upload_file">
|
||||
<span class="icon icon-download"></span> {{ _('Download All') }}
|
||||
</a>
|
||||
<a class="menu__link half expanded--hidden" href="javascript:;" name="testdata__section__expand">
|
||||
<span class="icon icon-expand_more"></span> {{ _('expand') }}
|
||||
</a>
|
||||
<a class="menu__link half collapsed--hidden" href="javascript:;" name="testdata__section__collapse">
|
||||
<span class="icon icon-expand_less"></span> {{ _('collapse') }}
|
||||
</a>
|
||||
</li>
|
||||
</ol>
|
||||
<div class="section__body no-padding problem-sidebar-testdata__detail" data-fragment-id="problem-sidebar-testdata">
|
||||
{% if testdata.length %}
|
||||
<table class="data-table">
|
||||
<colgroup>
|
||||
<col class="col--name">
|
||||
<col class="col--size">
|
||||
<col class="col--operation">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col--name">{{ _('Filename') }}</th>
|
||||
<th class="col--size">{{ _('Size') }}</th>
|
||||
<th class="col--operation"><span class="icon icon-wrench"></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{%- for file in testdata -%}
|
||||
<tr data-filename="{{ file.name }}" data-size="{{ file.size }}">
|
||||
<td class="col--name" title="{{ file.name }}"><a href="{{ url('problem_file_download', {pid: pdoc.docId, filename: file.name, query:{type:'testdata'} }) }}">{{ file.name }}</a></td>
|
||||
<td class="col--size">{{ size(file.size) }}</td>
|
||||
<td class="col--operation"><a href="javascript:;" name="{{ file.name }}"><span class="icon icon-delete"></span></a></td>
|
||||
</tr>
|
||||
{%- endfor -%}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
{{ nothing.render('No testdata at current.',compact = true) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user