Skip to content

Commit

Permalink
Simplify code of displaying verdict result in team interface
Browse files Browse the repository at this point in the history
  • Loading branch information
2018hahazhufeng authored and vmcj committed Jul 22, 2023
1 parent 3d0c061 commit a8fb8fc
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions webapp/templates/team/partials/submission_list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,18 @@
<a data-ajax-modal data-ajax-modal-after="markSeen" {% if link %}href="{{ link }}"{% endif %}>
{%- if submission.submittime > submission.contest.endtime %}
{{ 'too-late' | printResult }}
{%- if showTooLateResult %}
({%- if submission.judgings.first is empty or submission.judgings.first.result is empty %}
{{- '' | printResult -}}
{%- elseif verificationRequired and not submission.judgings.first.verified %}
{{- '' | printResult -}}
{%- else %}
{{- submission.judgings.first.result | printResult -}}
{%- endif %})
{%- endif %}
{%- if submission.submittime <= submission.contest.endtime or showTooLateResult %}
{%- if submission.submittime > submission.contest.endtime %}
/
{% endif %}
{%- if submission.judgings.first is empty or submission.judgings.first.result is empty %}
{{- '' | printResult -}}
{%- elseif verificationRequired and not submission.judgings.first.verified %}
{{- '' | printResult -}}
{%- else %}
{{- submission.judgings.first.result | printResult -}}
{%- endif %}
{%- elseif submission.judgings.first is empty or submission.judgings.first.result is empty %}
{{- '' | printResult -}}
{%- elseif verificationRequired and not submission.judgings.first.verified %}
{{- '' | printResult -}}
{%- else %}
{{- submission.judgings.first.result | printResult -}}
{%- endif %}
</a>
</td>
Expand Down

0 comments on commit a8fb8fc

Please sign in to comment.