fix: problem page items
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2022-10-03 14:28:33 +08:00
parent 3335941333
commit dec731f86f
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
3 changed files with 14 additions and 34 deletions

View File

@ -314,7 +314,7 @@ $('#contest-countdown').countdown(<?= $contest['end_time']->getTimestamp() - UOJ
<?php if ($custom_test_requirement): ?>
<li class="nav-item"><a class="nav-link" href="#tab-custom-test" role="tab" data-toggle="tab"><span class="glyphicon glyphicon-console"></span> <?= UOJLocale::get('problems::custom test') ?></a></li>
<?php endif ?>
<?php if (!$contest): ?>
<?php if (!$contest || $contest['cur_progress'] >= CONTEST_FINISHED): ?>
<li class="nav-item"><a class="nav-link" href="/problem/<?= $problem['id'] ?>/solutions" role="tab"><?= UOJLocale::get('problems::solutions') ?></a></li>
<?php endif ?>
<?php if (hasProblemPermission($myUser, $problem)): ?>

View File

@ -135,39 +135,7 @@
</ul>
</div>
<div class="card card-default mb-2">
<ul class="nav nav-fill flex-column">
<li class="nav-item text-start">
<a class="nav-link" href="<?= HTML::url("/download.php?type=problem&id={$problem['id']}") ?>">
<i class="bi bi-hdd-stack"></i>
测试数据
</a>
</li>
<li class="nav-item text-start">
<a class="nav-link" href="<?= HTML::url("/download.php?type=attachment&id={$problem['id']}") ?>">
<i class="bi bi-download"></i>
附件下载
</a>
</li>
<li class="nav-item text-start">
<a class="nav-link" href="/problem/<?= $problem['id'] ?>/statistics">
<i class="bi bi-graph-up"></i>
<?= UOJLocale::get('problems::statistics') ?>
</a>
</li>
</ul>
<div class="card-footer bg-transparent">
评价:<?= getClickZanBlock('P', $problem['id'], $problem['zan']) ?>
</div>
</div>
<?php
$sidebar_config = array();
if ($contest && $contest['cur_progress'] <= CONTEST_IN_PROGRESS) {
$sidebar_config['upcoming_contests_hidden'] = '';
}
uojIncludeView('sidebar', $sidebar_config);
?>
<?php uojIncludeView('sidebar', array()) ?>
</aside>
</div>

View File

@ -231,6 +231,18 @@ EOD
echo '<article class="markdown-body">';
echo $this->post_data['content'];
echo '</article>';
if (isset($REQUIRE_LIB['bootstrap5'])) {
echo <<<EOD
<script>
$(document).ready(function() {
$('.markdown-body table').each(function() {
$(this).addClass('table table-bordered table-striped');
});
});
</script>
EOD;
}
echoUOJPageFooter(array('ShowPageFooter' => false));
} elseif ($this->type == 'slide') {
uojIncludeView('slide', array_merge(