From 6a91c0521c4140d966dbe9b9e0669ca1c3b3c221 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Fri, 7 Oct 2022 09:31:31 +0800 Subject: [PATCH] feat: contest navigator in problem page --- web/app/controllers/problem.php | 60 +++++++++++++++++--- web/app/controllers/problem_statistics.php | 66 +++++++++++++++++----- 2 files changed, 104 insertions(+), 22 deletions(-) diff --git a/web/app/controllers/problem.php b/web/app/controllers/problem.php index a4ca1b1..cf2b178 100644 --- a/web/app/controllers/problem.php +++ b/web/app/controllers/problem.php @@ -219,10 +219,12 @@ EOD $custom_test_form->runAtServer(); } ?> + +
+ +
+ + + array( + 'name' => UOJLocale::get('contests::contest dashboard'), + 'url' => "/contest/{$contest['id']}" + ), + 'submissions' => array( + 'name' => UOJLocale::get('contests::contest submissions'), + 'url' => "/contest/{$contest['id']}/submissions" + ), + 'standings' => array( + 'name' => UOJLocale::get('contests::contest standings'), + 'url' => "/contest/{$contest['id']}/standings" + ), + ); + + if ($contest['cur_progress'] > CONTEST_TESTING) { + $tabs_info['after_contest_standings'] = array( + 'name' => UOJLocale::get('contests::after contest standings'), + 'url' => "/contest/{$contest['id']}/after_contest_standings" + ); + $tabs_info['self_reviews'] = array( + 'name' => UOJLocale::get('contests::contest self reviews'), + 'url' => "/contest/{$contest['id']}/self_reviews" + ); + } + + if (hasContestPermission(Auth::user(), $contest)) { + $tabs_info['backstage'] = array( + 'name' => UOJLocale::get('contests::contest backstage'), + 'url' => "/contest/{$contest['id']}/backstage" + ); + } + ?> +
+ +
+ +
时间限制: @@ -359,10 +404,13 @@ $('#contest-countdown').countdown(getTimestamp() - UOJ
+
+
- +