ui: contest_problemlist

This commit is contained in:
undefined committed 2022-10-15 18:56:58 +08:00
1 parent add93f5783
commit f1cbe155c7
11 files changed
+127 -31

No files matched your search

@@ -1,5 +1,6 @@
{% import "components/paginator.html" as paginator with context %}
{% extends "layout/basic.html" %}
{{ set(UiContext, 'tdoc', tdoc) }}
{% set type = 'homework' if tdoc.rule == 'homework' else 'contest' %}
{% block content %}
<div class="row"><div class="medium-12 columns scoreboard--{{ tdoc.rule }}">
@@ -6,6 +6,19 @@
</div>
{% endif %}
<div>
<div class="contest-problems">
{% for pid in tdoc.pids -%}
{% set status = tsdoc.detail[pid].status %}
{% set pass = status == STATUS.STATUS_ACCEPTED %}
{% set fail = status and not pass %}
<a href="{{ url('problem_detail', pid=pid, query={tid:tdoc.docId}) }}"
class="{% if pass %}pass{% elif fail %}fail{% endif %}
{% if pid==pdoc.docId %} active{% endif %}">
<span class="id">{{ String.fromCharCode(65+loop.index0) }}</span>
{% if status %}<span class="icon icon-{% if pass %}check{% else %}close{% endif %}"></span>{% endif %}
</a>
{%- endfor %}
</div>
<ol class="menu">
{% if model.contest.isOngoing(tdoc, tsdoc) %}
{% if page_name == 'contest_detail_problem' %}