mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
core&ui: support file renaming (#688)
Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
1 parent
746efef9bf
commit
01cb6944b7
19 files changed
+496
-144
No files matched your search
@@ -15,12 +15,14 @@
|
||||
</div>
|
||||
{{ noscript_note.render() }}
|
||||
{% set filetype = "testdata" %}
|
||||
{% set can_edit = (handler.user.own(pdoc, perm.PERM_EDIT_PROBLEM_SELF) or handler.user.hasPerm(perm.PERM_EDIT_PROBLEM)) and not reference %}
|
||||
{% 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>
|
||||
<button class="rounded button" name="rename_selected_testdata">{{ _('Rename Selected') }}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -38,11 +40,13 @@
|
||||
</div>
|
||||
</div>
|
||||
{% set filetype = "additional_file" %}
|
||||
{% set can_edit = (handler.user.own(pdoc, perm.PERM_EDIT_PROBLEM_SELF) or handler.user.hasPerm(perm.PERM_EDIT_PROBLEM)) and not reference %}
|
||||
{% 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>
|
||||
<button class="rounded button" name="rename_selected_file">{{ _('Rename Selected') }}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user