ui&core: pjax load problem content

This commit is contained in:
undefined committed 2022-03-19 16:30:49 +08:00
1 parent 29fbb08b4b
commit 985fcd18f5
7 files changed
+45 -23

No files matched your search

@@ -75,10 +75,10 @@
<div class="section__header non-scratchpad--hide">
<h1 class="section__title">{{ pdoc.title }}</h1>
</div>
{% if pdoc.content|contentLang %}
{% if pdoc.content|contentLang|length %}
<div class="section__tab-container">
<div class="section__tab-header-wrapper">
<ul class="section__tab-header">
<ul class="section__tab-header flex-row">
{% 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] }}
@@ -88,24 +88,7 @@
</div>
</div>
{% endif %}
<div class="section__body typo">
{% if not pdoc.data.length and not pdoc.reference %}
<blockquote class="warn">
<p>{{ _('No testdata at current.') }}</p>
</blockquote>
{% endif %}
{% if typeof(pdoc.config) == 'string' %}
<blockquote class="warn">
<p>{{ pdoc.config }}</p>
</blockquote>
{% endif %}
{% if tdoc and tdoc.docType == model.document.TYPE_CONTEST and model.contest.isDone(tdoc) %}
<blockquote class="note">
<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.request.query.lang or handler.user.viewLang or handler.session.viewLang, pdoc.html)|safe }}
</div>
{% include "partials/problem_description.html" %}
</div></div>
</div>
</div>