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.
Hydro/packages/ui-default/templates/problem_files.html

55 lines
2.7 KiB
HTML

{% extends "layout/basic.html" %}
{% block content %}
<div class="row">
<div class="medium-5 columns">
<div class="section">
<div class="section__header">
<h1 class="section__title">{{ _('Testdata') }}</h1>
<div class="section__tools">
{% if not reference and (handler.user.own(pdoc, perm.PERM_EDIT_PROBLEM_SELF) or handler.user.hasPerm(perm.PERM_EDIT_PROBLEM)) %}
<a href="{{ url('problem_config', pid=pdoc.docId) }}" class="primary rounded button">{{ _('Config') }}</a>
<button class="primary rounded button" name="create_testdata">{{ _('Create') }}</button>
<button class="primary rounded button" name="upload_testdata">{{ _('Upload') }}</button>
{% endif %}
</div>
</div>
{{ noscript_note.render() }}
{% set filetype = "testdata" %}
{% include "partials/problem_files.html" %}
{% if not reference and (handler.user.own(pdoc) or handler.user.hasPerm(perm.PERM_READ_PROBLEM_DATA) or handler.user.hasPriv(PRIV.PRIV_READ_PROBLEM_DATA)) %}
<div class="section__body">
<button class="rounded button" name="download_selected_testdata">{{ _('Download Selected') }}</button>
{% if handler.user.own(pdoc, perm.PERM_EDIT_PROBLEM_SELF) or handler.user.hasPerm(perm.PERM_EDIT_PROBLEM) %}
<button class="rounded button" name="remove_selected_testdata">{{ _('Remove Selected') }}</button>
{% endif %}
</div>
{% endif %}
</div>
</div>
<div class="medium-4 columns">
<div class="section">
<div class="section__header">
<h1 class="section__title">{{ _('Files') }}</h1>
<div class="section__tools">
{% if (handler.user.own(pdoc, perm.PERM_EDIT_PROBLEM_SELF) or handler.user.hasPerm(perm.PERM_EDIT_PROBLEM)) and not reference %}
<button class="primary rounded button" name="create_file">{{ _('Create File') }}</button>
<button class="primary rounded button" name="upload_file">{{ _('Upload File') }}</button>
{% endif %}
</div>
</div>
{% set filetype = "additional_file" %}
{% include "partials/problem_files.html" %}
<div class="section__body">
<button class="rounded button" name="download_selected_file">{{ _('Download Selected') }}</button>
{% if (handler.user.own(pdoc, perm.PERM_EDIT_PROBLEM_SELF) or handler.user.hasPerm(perm.PERM_EDIT_PROBLEM)) and not reference %}
<button class="rounded button" name="remove_selected_file">{{ _('Remove Selected') }}</button>
{% endif %}
</div>
</div>
</div>
<div class="medium-3 columns">
{% include "partials/problem_sidebar.html" %}
</div>
</div>
{% endblock %}