mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: add problem tags to contest_manage
This commit is contained in:
4 files changed
+6
-7
No files matched your search
@@ -582,7 +582,7 @@ export class ContestManagementHandler extends ContestManagementBaseHandler {
|
||||
tdoc: this.tdoc,
|
||||
tsdoc: this.tsdoc,
|
||||
owner_udoc: await user.getById(domainId, this.tdoc.owner),
|
||||
pdict: await problem.getList(domainId, this.tdoc.pids, true, true, problem.PROJECTION_CONTEST_LIST),
|
||||
pdict: await problem.getList(domainId, this.tdoc.pids, true, true, [...problem.PROJECTION_CONTEST_LIST, 'tag']),
|
||||
files: sortFiles(this.tdoc.files || []),
|
||||
udict: await user.getListForRender(domainId, tcdocs.map((i) => i.owner)),
|
||||
tcdocs,
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{% extends "layout/basic.html" %}
|
||||
{% import "components/contest.html" as contest with context %}
|
||||
{% import "components/problem.html" as problem with context %}
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="medium-9 columns">
|
||||
@@ -21,7 +22,7 @@
|
||||
<tr>
|
||||
<td class="col--problem col--problem-name">
|
||||
<a href="{{ url('problem_detail', pid=pid) }}">
|
||||
<b>{{ String.fromCharCode(65+loop.index0) }}</b> {{ pdict[pid].title }}
|
||||
{{ problem.render_problem_title(pdict[pid], tdoc=tdoc, invalid=true, alphabetic=true) }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -47,9 +47,7 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<td class="col--problem col--problem-name">
|
||||
<a href="{{ url('problem_detail', pid=pid, query={tid:tdoc.docId}) }}">
|
||||
<b>{{ String.fromCharCode(65+loop.index0) }}</b> {{ pdict[pid].title }}
|
||||
</a>
|
||||
{{ problem.render_problem_title(pdict[pid], tdoc, alphabetic=true) }}
|
||||
</td>
|
||||
</tr>
|
||||
{%- endfor -%}
|
||||
|
||||
Reference in new issue
Block a user