mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: Add problem_detail lang tab (#319)
This commit is contained in:
1 parent
5f344e140f
commit
29fbb08b4b
3 files changed
+46
-1
No files matched your search
@@ -75,6 +75,19 @@
|
||||
<div class="section__header non-scratchpad--hide">
|
||||
<h1 class="section__title">{{ pdoc.title }}</h1>
|
||||
</div>
|
||||
{% if pdoc.content|contentLang %}
|
||||
<div class="section__tab-container">
|
||||
<div class="section__tab-header-wrapper">
|
||||
<ul class="section__tab-header">
|
||||
{% for k in pdoc.content|contentLang %}
|
||||
<a class="section__tab-header-item {{'tab--active' if (handler.request.query.lang or handler.user.viewLang or handler.session.viewLang) == k }}" data-lang="{{ k }}" href="./{{pdoc.pid|default(pdoc.docId)}}?lang={{k}}">
|
||||
{{ model.setting.SETTINGS_BY_KEY['viewLang'].range[k] }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="section__body typo">
|
||||
{% if not pdoc.data.length and not pdoc.reference %}
|
||||
<blockquote class="warn">
|
||||
@@ -91,7 +104,7 @@
|
||||
<p>{{ _('You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.') }}</p>
|
||||
</blockquote>
|
||||
{% endif %}
|
||||
{{ pdoc.content|content(handler.user.viewLang or handler.session.viewLang, pdoc.html)|safe }}
|
||||
{{ pdoc.content|content(handler.request.query.lang or handler.user.viewLang or handler.session.viewLang, pdoc.html)|safe }}
|
||||
</div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user