Files
Hydro/packages/ui-default/templates/partials/problem_description.html
T

33 lines
1.4 KiB
HTML

<div class="section__body typo richmedia" data-fragment-id="problem-description">
{% if not pdoc.data.length and not pdoc.reference %}
<blockquote class="warn">
<p>{{ _('No {0} at current.').format(_("testdata")) }}</p>
</blockquote>
{% endif %}
{% if typeof(pdoc.config) == 'string' %}
<blockquote class="warn">
<p>{{ pdoc.config }}</p>
</blockquote>
{% endif %}
{% if pdoc.config.langs and not pdoc.config.langs|length %}
<blockquote class="warn">
<p>{{ _('No submission language available for this problem.') }}</p>
</blockquote>
{% endif %}
{% if tdoc and tdoc.docType == model.document.TYPE_CONTEST %}
{% if mode == 'view' %}
<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>
{% elif mode == 'correction' %}
<blockquote class="note">
<p>{{ _('The contest is ended. New submissions will be treated as correction submissions and will not be counted in the contest.') }}</p>
</blockquote>
{% endif %}
{% endif %}
{% if not renderredContent %}
{% set preferredLang = handler.request.query.lang or handler.user.viewLang or handler.session.viewLang %}
{% set renderredContent = pdoc.content|content(preferredLang, pdoc.html) %}
{% endif %}
{{ renderredContent|safe }}
</div>