mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
testdata.convert
This commit is contained in:
1 parent
26f780ddee
commit
0d7d6ea12a
15 files changed
+199
-127
No files matched your search
@@ -1,9 +1,10 @@
|
||||
{% macro render_problem_title(pdoc, tdoc=none, prefix='/c', show_tags=true, show_invisible_flag=true, rp=none, invalid=false) %}
|
||||
{% macro render_problem_title(pdoc, tdoc=none, show_tags=true, show_invisible_flag=true, rp=none, invalid=false) %}
|
||||
{%- if not invalid %}
|
||||
<a
|
||||
{%- if tdoc %}
|
||||
{# TODO(masnn) use url() #}
|
||||
href="{{ prefix }}/{{ tdoc.docId }}/p/{{ pdoc.docId }}"
|
||||
{%- if tdoc and tdoc.docType == model.document.TYPE_CONTEST %}
|
||||
href="{{ url('contest_detail_problem', tid=tdoc.docId, pid=pdoc.docId) }}"
|
||||
{%- elif tdoc and tdoc.docType == model.document.TYPE_HOMEWORK %}
|
||||
href="{{ url('homework_detail_problem', tid=tdoc.docId, pid=pdoc.docId) }}"
|
||||
{%- else %}
|
||||
href="{{ url('problem_detail', pid=pdoc.pid) }}"
|
||||
{%- endif %}
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
{% endif %}
|
||||
<td class="col--problem col--problem-name">
|
||||
#{{ loop.index }}:
|
||||
{{ problem.render_problem_title(pdict[pid], tdoc=tdoc, prefix='/homework', show_invisible_flag=false, show_tags=false) }}
|
||||
{{ problem.render_problem_title(pdict[pid], tdoc=tdoc, show_invisible_flag=false, show_tags=false) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
@@ -14,6 +14,29 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('Testdata Config') }}</h1>
|
||||
</div>
|
||||
<div class="section__body">
|
||||
<form method="post">
|
||||
{{ form.form_textarea({
|
||||
columns:null,
|
||||
label:'Config',
|
||||
name:'yaml',
|
||||
value:pdoc['config']|default(''),
|
||||
yaml:true
|
||||
}) }}
|
||||
<div class="row"><div class="columns">
|
||||
<input type="hidden" name="operation" value="config">
|
||||
<input type="hidden" name="csrfToken" value="{{ handler.csrfToken }}">
|
||||
<button type="submit" class="rounded primary button">
|
||||
{{ _('Update') }}
|
||||
</button>
|
||||
</div></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('Settings') }}</h1>
|
||||
@@ -41,6 +64,7 @@
|
||||
value:pdoc['tag']|join(', ')
|
||||
}) }}
|
||||
<div class="row"><div class="columns">
|
||||
<input type="hidden" name="operation" value="settings">
|
||||
<input type="hidden" name="csrfToken" value="{{ handler.csrfToken }}">
|
||||
<button type="submit" class="rounded primary button">
|
||||
{{ _('Update') }}
|
||||
|
||||
Reference in new issue
Block a user