mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-25 03:08:42 +00:00
feat(problem): show contests used this problem
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
32efcd3e64
commit
0f3c934adc
@ -307,7 +307,25 @@ if (UOJContest::cur()) {
|
||||
<?= UOJLocale::get('problems::memory limit') ?>: <?= $memory_limit ? "$memory_limit MB" : "N/A" ?>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<hr />
|
||||
|
||||
<?php if (!UOJContest::cur()) : ?>
|
||||
<?php $contest_problems = UOJProblem::cur()->findInContests(); ?>
|
||||
<?php if (!empty($contest_problems)) : ?>
|
||||
<div class="alert alert-light">
|
||||
<h5 class="alert-heading"><?= UOJLocale::get('problems::the problem was used in the following contest') ?>:</h5>
|
||||
<ul class="mb-0">
|
||||
<?php foreach ($contest_problems as $cp) : ?>
|
||||
<?php if ($cp->userCanView(Auth::user())) : ?>
|
||||
<li><?= $cp->contest->getLink(['class' => 'alert-link text-decoration-underline']) ?></li>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="statement">
|
||||
|
@ -64,4 +64,5 @@ return [
|
||||
'attachments download' => 'Attachments download',
|
||||
'resources' => 'Resources',
|
||||
'cannot submit' => 'This problem doesn\'t configured <code>submission_requirement</code>, so it cannot be submitted temporarily.',
|
||||
'the problem was used in the following contest' => 'The problem was used in the following contest',
|
||||
];
|
||||
|
@ -63,5 +63,6 @@ return [
|
||||
'test data' => '测试数据',
|
||||
'attachments download' => '附件下载',
|
||||
'resources' => '相关资源',
|
||||
'cannot submit' => '当前题目未配置 <code>submission_requirement</code>,暂时无法提交。'
|
||||
'cannot submit' => '当前题目未配置 <code>submission_requirement</code>,暂时无法提交。',
|
||||
'the problem was used in the following contest' => '该题目被以下比赛使用',
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user