{% import "components/ui/v1.html" as ui_v1 %} {% import "components/user.html" as user with context %} {% macro renderRecord(cell, canView) %} {% if canView %}{% endif %} {%- set _color = utils.status.getScoreColor(cell.score|default(cell.value)) -%} {{ cell.value|string|nl2br|safe }} {% if canView %}{% endif %} {% endmacro %}
{% if model.contest.isDone(tdoc) %} {{ _('Please wait until contest host unfreeze the scoreboard.') }} {% else %} {{ _('The scoreboard was frozen with {0} minutes remaining at {1} - submissions in the last {0} minutes of the contest are still shown as pending.').format((tdoc.endAt - tdoc.lockAt) / 1000 / 60, datetimeSpan(tdoc.lockAt))|safe }} {% endif %}
|
{%- if column.type == 'problem' and column.raw -%}
{{ column.value }} {{ pdict[column.raw].nAccept|default(0) }}/{{ pdict[column.raw].nSubmit|default(0) }} {%- else -%} {{ column.value|string|nl2br|safe }} {%- endif -%} |
{%- endfor -%}
|---|
|
{%- if column.type == 'rank' -%}
{{ '*' if column.value == '0' else column.value|string|nl2br|safe }}
{%- elif column.type == 'user' -%}
{%- set canView = canViewAll or handler.user._id == column.raw -%}
{{ user.render_inline(udict[column.raw], badge=false, showDisplayName=(tdoc.rule == 'homework'), usernameLimit=(0 if tdoc.rule == 'homework' else 10)) }}
{%- elif column.type == 'record' and column.raw -%}
{{ renderRecord(column, canView) }}
{%- if canView and column.sub -%}{{ column.sub }} {%- endif -%}
{%- for record in column.raw -%}
{%- if loop.index0 -%}/{%- endif -%}
{%- if record.raw -%}
{{ renderRecord(record, canView) }}
{%- else -%}
{{ record.value|string|nl2br|safe }}
{%- endif -%}
{%- endfor -%}
{%- if canView and column.sub -%}{{ column.sub }} {%- endif -%}
|
{%- endfor -%}