core&ui: contest_files

This commit is contained in:
undefined committed 2022-07-09 18:08:42 +08:00
1 parent 86d77625f6
commit 996ff2a9dd
16 files changed
+154 -32

No files matched your search

@@ -72,6 +72,9 @@
<li class="menu__item"><a class="menu__link" href="{{ url('contest_edit', tid=tdoc.docId) }}">
<span class="icon icon-edit"></span> {{ _('Edit Contest') }}
</a></li>
<li class="menu__item"><a class="menu__link" href="{{ url('contest_files', tid=tdoc.docId) }}">
<span class="icon icon-file"></span> {{ _('Files') }}
</a></li>
{% endif %}
{% if handler.user.own(tdoc) or handler.user.hasPriv(PRIV.PRIV_READ_RECORD_CODE) or handler.user.hasPerm(perm.PERM_READ_RECORD_CODE) %}
{% if model.contest.canShowRecord.call(handler, tdoc, true) %}
@@ -1,5 +1,5 @@
{% import "components/nothing.html" as nothing with context %}
<div class="section__body no-padding home-files" data-fragment-id="home-files">
<div class="section__body no-padding files" data-fragment-id="files">
{% if files.length %}
<table class="data-table">
<colgroup>
@@ -11,7 +11,7 @@
<tr>
<th class="col--checkbox">
<label class="compact checkbox">
<input type="checkbox" name="select_all" data-checkbox-toggle="user_files">
<input type="checkbox" name="select_all" data-checkbox-toggle="files">
</label>
</th>
<th class="col--name">{{ _('Filename') }}</th>
@@ -23,11 +23,11 @@
<tr data-filename="{{ file.name }}" data-size="{{ file.size }}">
<td class="col--checkbox">
<label class="compact checkbox">
<input type="checkbox" data-checkbox-group="user_files" data-checkbox-range>
<input type="checkbox" data-checkbox-group="files" data-checkbox-range>
</label>
</td>
<td class="col--name">
<a href="{{ url('fs_download', {uid: handler.user._id, filename: file.name}) }}">{{ file.name }}</a>
<a href="{{ urlForFile(file.name) }}">{{ file.name }}</a>
</td>
<td class="col--size">{{ size(file.size) }}</td>
</tr>