From fca56161cd4d1363c96dd0796244902e30f11406 Mon Sep 17 00:00:00 2001 From: 2018hahazhufeng <1163291343@qq.com> Date: Wed, 5 Jul 2023 09:28:30 +0800 Subject: [PATCH] Simplify code of displaying verdict result in team interface --- .../team/partials/submission_list.html.twig | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/webapp/templates/team/partials/submission_list.html.twig b/webapp/templates/team/partials/submission_list.html.twig index 049fd1eb69e..77b96645b1d 100644 --- a/webapp/templates/team/partials/submission_list.html.twig +++ b/webapp/templates/team/partials/submission_list.html.twig @@ -53,21 +53,18 @@ {%- 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 %}