You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.8 KiB
HTML
48 lines
1.8 KiB
HTML
{% import "components/nothing.html" as nothing with context %}
|
|
<div class="section__body no-padding problem-files-testdata" data-fragment-id="problem-files-testdata">
|
|
{% if reference %}
|
|
<blockquote class="note">
|
|
<p>{{ _('This is a copy of another problem.') }}</p>
|
|
</blockquote>
|
|
{% elif testdata.length %}
|
|
<table class="data-table">
|
|
<colgroup>
|
|
<col class="col--checkbox">
|
|
<col class="col--name">
|
|
<col class="col--size">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th class="col--checkbox">
|
|
<label class="compact checkbox">
|
|
<input type="checkbox" name="select_all" data-checkbox-toggle="testdata">
|
|
</label>
|
|
</th>
|
|
<th class="col--name">{{ _('Filename') }}</th>
|
|
<th class="col--size">{{ _('Size') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{%- for file in testdata -%}
|
|
<tr data-filename="{{ file.name }}" data-size="{{ file.size }}">
|
|
<td class="col--checkbox">
|
|
<label class="compact checkbox">
|
|
<input type="checkbox" data-checkbox-group="testdata" data-checkbox-range>
|
|
</label>
|
|
</td>
|
|
<td class="col--name">
|
|
{% if handler.user.own(pdoc) or handler.user.hasPriv(PRIV.PRIV_READ_PROBLEM_DATA) or handler.user.hasPerm(perm.PERM_READ_PROBLEM_DATA) %}
|
|
<a href="{{ url('problem_file_download', {pid: pdoc.docId, filename: file.name, query:{type:'testdata'} }) }}">{{ file.name }}</a>
|
|
{% else %}
|
|
<p>{{ file.name }}</p>
|
|
{% endif %}
|
|
</td>
|
|
<td class="col--size">{{ size(file.size) }}</td>
|
|
</tr>
|
|
{%- endfor -%}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
{{ nothing.render('No testdata at current.') }}
|
|
{% endif %}
|
|
</div> |