mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
修复一些错误
This commit is contained in:
1 parent
747cb1b9b5
commit
b19f948fdd
30 files changed
+306
-132
No files matched your search
@@ -27,7 +27,7 @@
|
||||
{%- if pdoc['tag']|length > 0 %}
|
||||
<ul class="problem__tags">
|
||||
{%- for tag in pdoc['tag'] %}
|
||||
<li class="problem__tag"><a class="problem__tag-link" href="/p?category={{ tag }}">{{ tag }}</a></li>
|
||||
<li class="problem__tag"><a class="problem__tag-link" href="/p/category/{{ tag }}">{{ tag }}</a></li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
{%- else %}
|
||||
|
||||
@@ -1,11 +1,32 @@
|
||||
{% set page_name = "manage_module" %}
|
||||
{% extends "manage_base.html" %}
|
||||
{% block manage_content %}
|
||||
<div style="display: none" class="dialog__body--add-module">
|
||||
<div>
|
||||
<div class="row"><div class="columns">
|
||||
<h1>{{ _('Add Module') }}</h1>
|
||||
</div></div>
|
||||
<div class="row">
|
||||
<div class="medium-6 columns">
|
||||
<label>
|
||||
{{ _('URL') }}
|
||||
<input name="url" type="text" class="textbox" autocomplete="off" data-autofocus>
|
||||
</label>
|
||||
</div>
|
||||
<div class="medium-6 columns">
|
||||
<label>
|
||||
{{ _('ID (Optional)') }}
|
||||
<input name="id" type="text" class="textbox" autocomplete="off">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('Installed Modules') }}</h1>
|
||||
<div class="section__tools">
|
||||
<a class="primary rounded button" href="/manage/module/add" target="_blank"><span class="icon icon-add"></span> {{ _('Add module') }}</a>
|
||||
<button class="primary rounded button" name="add_module"><span class="icon icon-add"></span> {{ _('Add module') }}</button>
|
||||
<a class="tool-button" href="/wiki/help#module"><span class="icon icon-help"></span> {{ _("What's module?") }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,12 +51,12 @@
|
||||
<tbody>
|
||||
{% for module in installed %}
|
||||
<tr>
|
||||
<td class="col--id">{{ module.id }}{{ _('(Active)') if active.includes(module.id) else '' }}</td>
|
||||
<td class="col--id">{{ module.id }}</td>
|
||||
<td class="col--desc">{{ _(module.description|default(_('None'))) }}</td>
|
||||
<td class="col--size">{{ size(module.size) if module.size else '?' }}</td>
|
||||
<td class="col--version">{{ module.version|default('?') }}</td>
|
||||
<td class="col--action">
|
||||
<a class="typo-a" href="/manage/module/download/{{ module.id }}">{{ _('Download') }}</a>
|
||||
<a class="typo-a" href="/manage/module/download/{{ module.filename }}">{{ _('Download') }}</a>
|
||||
<form method="post">
|
||||
<input type="hidden" name="operation" value="delete">
|
||||
<input type="hidden" name="id" value="{{ module.id }}">
|
||||
|
||||
@@ -64,12 +64,6 @@
|
||||
<span class="icon icon-comment--text"></span> {{ _('Solutions') }}
|
||||
</a></li>
|
||||
{% endif %}
|
||||
{% if page_name == 'problem_detail' and handler.hasPerm(perm.PERM_LOGGEDIN) %}
|
||||
<li class="menu__seperator"></li>
|
||||
<li class="menu__item"><a class="menu__link" name="problem-sidebar__copy-to" href="javascript:;">
|
||||
<span class="icon icon-copy"></span> {{ _('Copy Problem') }}
|
||||
</a></li>
|
||||
{% endif %}
|
||||
{% if user._id == pdoc.owner or handler.hasPerm(perm.PERM_EDIT_PROBLEM) %}
|
||||
<li class="menu__seperator"></li>
|
||||
<li class="menu__item"><a class="menu__link{% if page_name == 'problem_edit' %} active{% endif %}" href="/p/{{ pdoc.pid }}/edit">
|
||||
@@ -113,13 +107,9 @@
|
||||
{% if pdoc['category'] %}
|
||||
<span class="hasjs--hide" name="problem-sidebar__categories">
|
||||
{% for category in pdoc['category'] %}
|
||||
<a href="/p?category={{ category }}">{{ category }}</a>
|
||||
<a href="/p/category/{{ category }}">{{ category }}</a>
|
||||
{% if loop.index < pdoc['category']|length %}
|
||||
{% if category in vj4.model.builtin.PROBLEM_CATEGORIES %}
|
||||
{{ _('problem-category-delim') }}
|
||||
{% else %}
|
||||
{{ _('problem-subcategory-delim') }}
|
||||
{% endif %}
|
||||
{{ _('problem-subcategory-delim') }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</span>
|
||||
@@ -146,10 +136,6 @@
|
||||
<dd>{{ pdoc.nAccept }}</dd>
|
||||
<dt>{{ _('Accepted Ratio') }}</dt>
|
||||
<dd>{% if pdoc.nSubmit > 0 %}{{ (100 * pdoc.nAccept / pdoc.nSubmit)|round|int }}%{% else %}{{ _('?') }}{% endif %}</dd>
|
||||
{% if pdoc['num_be_copied'] %}
|
||||
<dt>{{ _('Be Copied') }}</dt>
|
||||
<dd>{{ pdoc['num_be_copied'] }}</dd>
|
||||
{% endif %}
|
||||
<dt>{{ _('Uploaded By') }}</dt>
|
||||
<dd>{{ user.render_inline(owner_udoc, badge=false) }}</dd>
|
||||
</dl>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{% block content %}
|
||||
<script>
|
||||
var Context = {
|
||||
getProblemUrlWithCategory: "/p?category={{category}}",
|
||||
getProblemUrlWithCategory: "/p/category/{category}",
|
||||
getProblemUrlWithoutCategory: "/p",
|
||||
currentCategory: "{{category}}"
|
||||
};
|
||||
@@ -28,13 +28,13 @@
|
||||
{% for category, sub_categories in model.builtin.CATEGORIES %}
|
||||
<li class="group-list__item">
|
||||
<h2 class="section__title">
|
||||
<a href="/p?category={{ category|urlencode }}">{{ category }}</a>
|
||||
<a href="/p/category/{{ category|urlencode }}">{{ category }}</a>
|
||||
</h2>
|
||||
{% if sub_categories | length > 0 %}
|
||||
<ol class="chip-list">
|
||||
{% for sub_category in sub_categories %}
|
||||
<li class="chip-list__item">
|
||||
<a class="typo-a" href="/p?category={{ category|urlencode + ',' + sub_category|urlencode }}">{{ sub_category }}</a>
|
||||
<a class="typo-a" href="/p/category/{{ category|urlencode + ',' + sub_category|urlencode }}">{{ sub_category }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
|
||||
Reference in new issue
Block a user