ui: add problem tags to contest_manage

This commit is contained in:
undefined committed 2024-03-27 11:19:32 +08:00
1 parent 2f5600c1bd
commit 3fed9f4716
4 files changed
+6 -7

No files matched your search

@@ -1,4 +1,4 @@
{% macro render_problem_title(pdoc, tdoc=none, show_tags=true, show_invisible_flag=true, invalid=false, inline=false, small=false) %}
{% macro render_problem_title(pdoc, tdoc=none, show_tags=true, show_invisible_flag=true, invalid=false, inline=false, small=false, alphabetic=false) %}
{%- if not invalid -%}
{% set _linkArgs = { pid:pdoc.pid|default(pdoc.docId) } %}
{% if tdoc %}{{ set(_linkArgs, 'query', {tid:tdoc.docId}) }}{% endif %}
@@ -6,7 +6,7 @@
<a href="{{ url('problem_detail', _linkArgs) }}"{% if small %} data-tooltip="{{ pdoc.title }}"{% endif %}>
{%- endif -%}
{%- if pdoc.domainId !== handler.args.domainId -%}<b>{{ pdoc.domainId }}#</b>{%- endif -%}
{%- if page_name == 'contest_problemlist' and tdoc -%}
{%- if tdoc and alphabetic -%}
<b>{{ String.fromCharCode(65 + tdoc.pids.indexOf(pdoc.docId)) if tdoc.pids.includes(pdoc.docId) else '#' }}</b>
{%- else -%}
<b>{{ pdoc.pid or ('P'+pdoc.docId if pdoc.domainId === handler.args.domainId else pdoc.docId) }}</b>