mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui: fix bugs (#672)
Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
1 parent
afbf3b6174
commit
f305cbfc60
6 files changed
+15
-7
No files matched your search
@@ -13,6 +13,9 @@
|
||||
{% include "partials/problem_sidebar.html" %}
|
||||
{% elif vnode.type == model.document.TYPE_CONTEST %}
|
||||
{% set tdoc = vnode %}
|
||||
{%- if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) -%}
|
||||
{% set tsdoc = { attend: tdoc.attend } %}
|
||||
{%- endif -%}
|
||||
{% set owner_udoc = udict[vnode.owner] %}
|
||||
{% include "partials/contest_sidebar.html" %}
|
||||
{% else %}
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
<blockquote class="note">
|
||||
<p>{{ _('This is a copy of another problem.') }}</p>
|
||||
</blockquote>
|
||||
{% elif _files.length %}
|
||||
{% endif %}
|
||||
{% if _files.length %}
|
||||
<table class="data-table {{ filetype }}-table">
|
||||
<colgroup>
|
||||
{% if not sidebar %}<col class="col--checkbox">{% endif %}
|
||||
@@ -53,7 +54,7 @@
|
||||
{%- endfor -%}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
{% elif not reference %}
|
||||
{{ nothing.render('No {0} at current.', compact=sidebar, args=[_(filetype)]) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -31,7 +31,7 @@
|
||||
<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) %}
|
||||
{% 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 %}
|
||||
@@ -41,7 +41,7 @@
|
||||
{% 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) %}
|
||||
{% 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>
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
</div>
|
||||
<div class="balancer__body">
|
||||
<div class="numbox">
|
||||
<div class="numbox__num medium">{{ udoc.nLiked or 0 }}</div>
|
||||
<div class="numbox__num medium">{{ udoc.nLike or 0 }}</div>
|
||||
<div class="numbox__text">{{ _('Solutions Liked') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user