mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: contest_files
This commit is contained in:
1 parent
86d77625f6
commit
996ff2a9dd
16 files changed
+154
-32
No files matched your search
@@ -0,0 +1,27 @@
|
||||
{% extends "layout/basic.html" %}
|
||||
{% import "components/contest.html" as contest with context %}
|
||||
{% import "components/record.html" as record with context %}
|
||||
{% import "components/problem.html" as problem with context %}
|
||||
{% block content %}
|
||||
{{ set(UiContext, 'tdoc', tdoc) }}
|
||||
<div class="row">
|
||||
<div class="medium-9 columns">
|
||||
<div class="section">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('Files') }}</h1>
|
||||
<div class="section__tools">
|
||||
<button class="primary rounded button" name="upload_file">{{ _('Upload File') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
{{ noscript_note.render() }}
|
||||
{% include "partials/files.html" %}
|
||||
<div class="section__body">
|
||||
<button class="rounded button" name="remove_selected">{{ _('Remove Selected') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="medium-3 columns">
|
||||
{% include "partials/contest_sidebar.html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -8,7 +8,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{{ noscript_note.render() }}
|
||||
{% include "partials/home_files.html" %}
|
||||
{% include "partials/files.html" %}
|
||||
<div class="section__body">
|
||||
<button class="rounded button" name="remove_selected">{{ _('Remove Selected') }}</button>
|
||||
</div>
|
||||
|
||||
@@ -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) %}
|
||||
|
||||
+4
-4
@@ -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>
|
||||
Reference in new issue
Block a user