mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
58 lines
2.6 KiB
HTML
58 lines
2.6 KiB
HTML
{% 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> |