mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix #74 (multi-lang edit for problem)
This commit is contained in:
1 parent
ef5ee468bd
commit
ebaa3f290b
10 files changed
+117
-85
No files matched your search
@@ -1,21 +0,0 @@
|
||||
{% extends 'layout/simple.html' %}
|
||||
{% block body %}
|
||||
{% if fdoc %}
|
||||
<p>{{ _('Uploaded file info') }}:</p>
|
||||
<p>{{ _('ID') }}: {{ fdoc['_id'] }}</p>
|
||||
<p>{{ _('Userfile doc_id') }}: {{ ufid }}</p>
|
||||
<p>{{ _('MD5') }}: {{ fdoc['md5'] }}</p>
|
||||
<p>{{ _('URL') }}: {{ model.file.url(fdoc) }}</p>
|
||||
{% endif %}
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="csrfToken" value="{{ handler.csrfToken }}">
|
||||
<p>
|
||||
{{ _('New file') }}:
|
||||
<input type="text" name="title" placeholder="{{ _('Description') }}">
|
||||
<input type="file" name="file">
|
||||
<input type="submit" value="{{ _('Upload') }}" class="rounded primary button">
|
||||
</p>
|
||||
<p>{{ _('Note: file size should be less than or equal to {0}, and file type should be in {1}. Empty files are not allowed.').format(size(FILE_MAX_LENGTH), ALLOWED_MIMETYPE_PREFIX) }}</p>
|
||||
<p>{{ _('Usage: {0}, Quota: {1}').format(size(usage), size(quota)) }}</p>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -37,12 +37,31 @@
|
||||
name:'tag',
|
||||
value:pdoc['tag']|default([])|join(', ')
|
||||
}) }}
|
||||
<div class="row"><div class="columns">
|
||||
<label>
|
||||
{{ _('Content') }}
|
||||
<textarea name="content" class="textbox" data-markdown-upload style="height: 500px">{% if pdoc %}{{ pdoc['content']|toString }}{% else %}{% include 'partials/problem_default.md' %}{% endif %}</textarea>
|
||||
</label>
|
||||
</div></div>
|
||||
<div class="section__tab-container nojs--hide">
|
||||
<ul class="section__tabs immersive">
|
||||
<li class="section__tab-item">
|
||||
<h1 class="section__tab-title">{{ _('__langname') }}</h1>
|
||||
<div class="section__tab-main">
|
||||
<div class="section__body">
|
||||
<textarea data-content="{{ _('__id') }}" class="textbox" style="height: 500px"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% for k, v in model.setting.SETTINGS_BY_KEY['viewLang'].range %}
|
||||
{% if k != handler.user.viewLang %}
|
||||
<li class="section__tab-item">
|
||||
<h1 class="section__tab-title">{{ v }}</h1>
|
||||
<div class="section__tab-main">
|
||||
<div class="section__body">
|
||||
<textarea data-content="{{ k }}" class="textbox" style="height: 500px"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<textarea name="content" class="textbox hasjs--hide" data-markdown-upload style="height: 500px">{% if pdoc %}{{ pdoc['content']|toString }}{% else %}{% include 'partials/problem_default.md' %}{% endif %}</textarea>
|
||||
<div class="row"><div class="columns">
|
||||
<input type="hidden" name="csrfToken" value="{{ handler.csrfToken }}">
|
||||
{% if page_name == 'problem_edit' %}
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<div class="profile-content">
|
||||
<div class="section__tab-container immersive">
|
||||
<ul class="section__tabs">
|
||||
<li class="section__tab-item">
|
||||
<li class="section__tab-item">
|
||||
<h1 class="section__tab-title">{{ _('Bio') }}</h1>
|
||||
<div class="section__tab-main">
|
||||
{% if not udoc.bio %}
|
||||
|
||||
Reference in new issue
Block a user