feat: contest progress text in standings page

This commit is contained in:
Baoshuo Ren 2022-10-07 18:16:17 +08:00
parent 5f24f88392
commit 922b5bbeb1
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
3 changed files with 32 additions and 2 deletions

View File

@ -486,8 +486,21 @@ EOD;
?> ?>
<?php echoUOJPageHeader(HTML::stripTags($contest['name']) . ' - ' . $tabs_info[$cur_tab]['name'] . ' - ' . UOJLocale::get('contests::contest')) ?> <?php echoUOJPageHeader(HTML::stripTags($contest['name']) . ' - ' . $tabs_info[$cur_tab]['name'] . ' - ' . UOJLocale::get('contests::contest')) ?>
<div class="text-center d-md-none"> <div class="text-center d-md-none mb-3">
<h1 class="h2"><?= $contest['name'] ?></h1> <h1 class="h2"><?= $contest['name'] ?></h1>
<div class="small text-muted">
<?php if ($contest['cur_progress'] <= CONTEST_NOT_STARTED): ?>
<?= UOJLocale::get('contests::not started') ?>
<?php elseif ($contest['cur_progress'] <= CONTEST_IN_PROGRESS): ?>
<?= UOJLocale::get('contests::in progress') ?>
<?php elseif ($contest['cur_progress'] <= CONTEST_PENDING_FINAL_TEST): ?>
<?= UOJLocale::get('contests::pending final test') ?>
<?php elseif ($contest['cur_progress'] <= CONTEST_TESTING): ?>
<?= UOJLocale::get('contests::final testing') ?>
<?php else: ?>
<?= UOJLocale::get('contests::finished') ?>
<?php endif ?>
</div>
</div> </div>
@ -499,7 +512,22 @@ EOD;
<?php endif ?> <?php endif ?>
<?= HTML::tablist($tabs_info, $cur_tab, 'nav-pills') ?> <?= HTML::tablist($tabs_info, $cur_tab, 'nav-pills') ?>
<?php if ($cur_tab == 'standings' || $cur_tab == 'after_contest_standings' || $cur_tab == 'self_reviews'): ?> <?php if ($cur_tab == 'standings' || $cur_tab == 'after_contest_standings' || $cur_tab == 'self_reviews'): ?>
<h1 class="h2 text-center d-none d-md-block mt-2"><?= $contest['name'] ?></h1> <div class="d-none d-md-block text-center">
<h1 class="h2 mt-2 mb-3"><?= $contest['name'] ?></h1>
<div class="small text-muted">
<?php if ($contest['cur_progress'] <= CONTEST_NOT_STARTED): ?>
<?= UOJLocale::get('contests::not started') ?>
<?php elseif ($contest['cur_progress'] <= CONTEST_IN_PROGRESS): ?>
<?= UOJLocale::get('contests::in progress') ?>
<?php elseif ($contest['cur_progress'] <= CONTEST_PENDING_FINAL_TEST): ?>
<?= UOJLocale::get('contests::pending final test') ?>
<?php elseif ($contest['cur_progress'] <= CONTEST_TESTING): ?>
<?= UOJLocale::get('contests::final testing') ?>
<?php else: ?>
<?= UOJLocale::get('contests::finished') ?>
<?php endif ?>
</div>
</div>
<?php endif ?> <?php endif ?>
<div class="mt-3"> <div class="mt-3">
<?php <?php

View File

@ -10,6 +10,7 @@ return [
'the number of registrants' => 'Registrants', 'the number of registrants' => 'Registrants',
'register' => 'register', 'register' => 'register',
'registered' => 'registered', 'registered' => 'registered',
'not started' => 'not started',
'in progress' => 'in progress', 'in progress' => 'in progress',
'pending final test' => 'pending final test', 'pending final test' => 'pending final test',
'final testing' => 'final testing', 'final testing' => 'final testing',

View File

@ -10,6 +10,7 @@ return [
'the number of registrants' => '报名人数', 'the number of registrants' => '报名人数',
'register' => '报名', 'register' => '报名',
'registered' => '已报名', 'registered' => '已报名',
'not started' => '未开始',
'in progress' => '正在进行', 'in progress' => '正在进行',
'pending final test' => '等待评测', 'pending final test' => '等待评测',
'final testing' => '正在评测', 'final testing' => '正在评测',