mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-30 15:46:20 +00:00
Compare commits
4 Commits
e0cc425031
...
80ae85fbf4
Author | SHA1 | Date | |
---|---|---|---|
80ae85fbf4 | |||
69583714c8 | |||
8b45b03225 | |||
496b87d0a4 |
@ -40,14 +40,14 @@ if ($can_see_minor) {
|
||||
$tid = DB::insert_id();
|
||||
redirectTo(UOJSubmission::cur()->getUriForNewTID($tid));
|
||||
};
|
||||
$minor_rejudge_form->config['submit_button']['class'] = 'btn btn-sm btn-primary';
|
||||
$minor_rejudge_form->config['submit_button']['text'] = '偷偷重新测试';
|
||||
$minor_rejudge_form->config['submit_container']['class'] = 'd-inline-block text-end';
|
||||
$minor_rejudge_form->config['submit_button']['class'] = 'list-group-item list-group-item-action border-start-0 border-end-0 list-group-item-secondary';
|
||||
$minor_rejudge_form->config['submit_button']['text'] = '<i class="bi bi-arrow-clockwise"></i> 偷偷重新测试';
|
||||
$minor_rejudge_form->config['submit_container']['class'] = '';
|
||||
$minor_rejudge_form->runAtServer();
|
||||
}
|
||||
|
||||
if (UOJSubmission::cur()->isLatest()) {
|
||||
if (UOJSubmission::cur()->preHackCheck()) {
|
||||
if (UOJSubmission::cur()->preHackCheck() && ($perm['content'] || $perm['manager_view'])) {
|
||||
$hack_form = new UOJForm('hack');
|
||||
$hack_form->addTextFileInput('input', ['filename' => 'input.txt']);
|
||||
$hack_form->addCheckBox('use_formatter', [
|
||||
@ -93,9 +93,9 @@ if (UOJSubmission::cur()->isLatest()) {
|
||||
$rejudge_form->handle = function () {
|
||||
UOJSubmission::rejudgeById(UOJSubmission::info('id'));
|
||||
};
|
||||
$rejudge_form->config['submit_button']['class'] = 'btn btn-sm btn-primary';
|
||||
$rejudge_form->config['submit_button']['text'] = '重新测试';
|
||||
$rejudge_form->config['submit_container']['class'] = 'text-end d-inline-block';
|
||||
$rejudge_form->config['submit_button']['class'] = 'list-group-item list-group-item-action border-start-0 border-end-0 list-group-item-secondary';
|
||||
$rejudge_form->config['submit_button']['text'] = '<i class="bi bi-arrow-clockwise"></i> 重新测试';
|
||||
$rejudge_form->config['submit_container']['class'] = '';
|
||||
$rejudge_form->runAtServer();
|
||||
}
|
||||
|
||||
@ -104,10 +104,10 @@ if (UOJSubmission::cur()->isLatest()) {
|
||||
$delete_form->handle = function () {
|
||||
UOJSubmission::cur()->delete();
|
||||
};
|
||||
$delete_form->config['submit_button']['class'] = 'btn btn-sm btn-danger';
|
||||
$delete_form->config['submit_button']['text'] = '删除此提交记录';
|
||||
$delete_form->config['submit_container']['class'] = 'text-end d-inline-block';
|
||||
$delete_form->config['confirm']['smart'] = true;
|
||||
$delete_form->config['submit_button']['class'] = 'list-group-item list-group-item-action border-start-0 border-end-0 list-group-item-danger';
|
||||
$delete_form->config['submit_button']['text'] = '<i class="bi bi-trash3"></i> 删除此提交记录';
|
||||
$delete_form->config['submit_container']['class'] = '';
|
||||
$delete_form->config['confirm']['text'] = '你真的要删除这条提交记录吗?';
|
||||
$delete_form->succ_href = "/submissions";
|
||||
$delete_form->runAtServer();
|
||||
}
|
||||
@ -117,37 +117,110 @@ if (UOJSubmission::cur()->isLatest()) {
|
||||
$delete_form->handle = function () {
|
||||
UOJSubmission::cur()->deleteThisMinorVersion();
|
||||
};
|
||||
$delete_form->config['submit_button']['class'] = 'btn btn-sm btn-danger';
|
||||
$delete_form->config['submit_button']['text'] = '删除当前历史记录(保留其他历史记录)';
|
||||
$delete_form->config['submit_container']['class'] = 'text-end d-inline-block';
|
||||
$delete_form->config['confirm']['smart'] = true;
|
||||
$delete_form->config['submit_button']['class'] = 'list-group-item list-group-item-action border-start-0 border-end-0 list-group-item-danger';
|
||||
$delete_form->config['submit_button']['text'] = '<i class="bi bi-trash3"></i> 删除当前历史记录';
|
||||
$delete_form->config['submit_container']['class'] = '';
|
||||
$delete_form->config['confirm']['text'] = '你真的要删除这条历史记录吗?删除这条历史记录不会影响其他的历史记录。';
|
||||
$delete_form->succ_href = UOJSubmission::cur()->getUriForLatest();
|
||||
$delete_form->runAtServer();
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
var problem_id = parseInt('<?= $submission['problem_id'] ?>');
|
||||
</script>
|
||||
<?php echoUOJPageHeader(UOJLocale::get('problems::submission') . ' #' . $submission['id']) ?>
|
||||
|
||||
<h1>
|
||||
<?= UOJLocale::get('problems::submission') . ' #' . $submission['id'] ?>
|
||||
</h1>
|
||||
$tabs = [];
|
||||
|
||||
<?php UOJSubmission::cur()->echoStatusTable(['show_actual_score' => $perm['score'], 'id_hidden' => true], Auth::user()) ?>
|
||||
|
||||
<?php
|
||||
if ($perm['score']) {
|
||||
HTML::echoPanel('mb-3', '测评历史', function () {
|
||||
UOJSubmissionHistory::cur()->echoTimeline();
|
||||
});
|
||||
if (UOJSubmission::cur()->hasJudged()) {
|
||||
if ($perm['high_level_details']) {
|
||||
$tabs['details'] = [
|
||||
'name' => '详细信息',
|
||||
'card_body' => false,
|
||||
'displayer' => function () use ($perm, $submission_result) {
|
||||
echo '<div class="card-body p-0">';
|
||||
$styler = new SubmissionDetailsStyler();
|
||||
if (!$perm['low_level_details']) {
|
||||
$styler->fade_all_details = true;
|
||||
$styler->show_small_tip = false;
|
||||
}
|
||||
echoJudgmentDetails($submission_result['details'], $styler, 'details');
|
||||
echo '</div>';
|
||||
}
|
||||
];
|
||||
|
||||
if ($perm['manager_view'] && !$perm['low_level_details']) {
|
||||
$tabs['all-details'] = [
|
||||
'name' => '详细信息(管理员)',
|
||||
'displayer' => function () use ($submission_result) {
|
||||
echo '<div class="card-body p-0">';
|
||||
echoSubmissionDetails($submission_result['details'], 'all_details');
|
||||
echo '</div>';
|
||||
},
|
||||
'card_body' => false,
|
||||
];
|
||||
}
|
||||
} else if ($perm['manager_view']) {
|
||||
$tabs['manager-details'] = [
|
||||
'name' => '详细信息(管理员)',
|
||||
'displayer' => function () use ($submission_result) {
|
||||
echo '<div class="card-body p-0">';
|
||||
echoSubmissionDetails($submission_result['details'], 'details');
|
||||
echo '</div>';
|
||||
},
|
||||
'card_body' => false,
|
||||
];
|
||||
} else {
|
||||
$tabs['details'] = [
|
||||
'name' => '详细信息',
|
||||
'displayer' => function () {
|
||||
echo '<div>您无权查看当前提交的详细信息。</div>';
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
if ($perm['manager_view'] && isset($submission_result['final_result'])) {
|
||||
$tabs['final-details'] = [
|
||||
'name' => '终测结果预测(管理员)',
|
||||
'displayer' => function () use ($submission_result) {
|
||||
echo '<div class="card-body p-0">';
|
||||
echoSubmissionDetails($submission_result['final_result']['details'], 'final_details');
|
||||
echo '</div>';
|
||||
},
|
||||
'card_body' => false,
|
||||
];
|
||||
}
|
||||
} else {
|
||||
$show_status_details = UOJSubmission::cur()->viewerCanSeeStatusDetailsHTML(Auth::user());
|
||||
|
||||
$tabs['details'] = [
|
||||
'name' => '详细信息',
|
||||
'displayer' => function () {
|
||||
echo '<div class="card-body rounded-bottom">';
|
||||
echo '<table class="w-100">';
|
||||
echo '<tr id="status_details_' . UOJSubmission::info('id') . '">';
|
||||
echo UOJSubmission::cur()->getStatusDetailsHTML();
|
||||
echo '</tr>';
|
||||
echo '<script>update_judgement_status_details(' . UOJSubmission::info('id') . ')</script>';
|
||||
echo '</table>';
|
||||
echo '</div>';
|
||||
},
|
||||
'card_body' => false,
|
||||
];
|
||||
}
|
||||
|
||||
if ($perm['content'] || $perm['manager_view']) {
|
||||
$tabs['source'] = [
|
||||
'name' => '源代码',
|
||||
'displayer' => function () {
|
||||
echo '<div class="list-group list-group-flush rounded-bottom">';
|
||||
UOJSubmission::cur()->echoContent(['list_group' => true]);
|
||||
echo '</div>';
|
||||
},
|
||||
'card_body' => false,
|
||||
];
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ($perm['manager_view']) {
|
||||
HTML::echoPanel('mb-3', '测评机信息(管理员可见)', function () {
|
||||
$tabs['judger'] = [
|
||||
'name' => '测评机信息',
|
||||
'displayer' => function () {
|
||||
if (empty(UOJSubmission::info('judger'))) {
|
||||
echo '暂无';
|
||||
} else {
|
||||
@ -163,69 +236,92 @@ if ($perm['manager_view']) {
|
||||
echo '<strong>', $judger['display_name'], ': </strong>', $judger['description'];
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
if (isset($hack_form)) {
|
||||
$tabs['hack'] = [
|
||||
'name' => 'Hack!',
|
||||
'displayer' => function () use (&$hack_form) {
|
||||
echo <<<EOD
|
||||
<div class="small text-danger mb-3">
|
||||
Hack 功能是给大家互相查错用的。请勿故意提交错误代码,然后自己 Hack 自己、贼喊捉贼哦(故意贼喊捉贼会予以封禁处理)。
|
||||
</div>
|
||||
EOD;
|
||||
$hack_form->printHTML();
|
||||
},
|
||||
];
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($perm['content'] || $perm['manager_view']) : ?>
|
||||
<div class="copy-button-container">
|
||||
<?php UOJSubmission::cur()->echoContent() ?>
|
||||
<?php echoUOJPageHeader(UOJLocale::get('problems::submission') . ' #' . $submission['id'], [
|
||||
'PageContainerClass' => 'container-xxl',
|
||||
]) ?>
|
||||
|
||||
<h1>
|
||||
<?= UOJLocale::get('problems::submission') . ' #' . $submission['id'] ?>
|
||||
</h1>
|
||||
|
||||
<div class="row mt-3 submission-layout d-md-grid">
|
||||
<div class="submission-right-col">
|
||||
<?php UOJSubmission::cur()->echoStatusCard(['show_actual_score' => $perm['score'], 'id_hidden' => true], Auth::user()) ?>
|
||||
</div>
|
||||
|
||||
<?php if (isset($hack_form)) : ?>
|
||||
<p class="text-center">
|
||||
这程序好像有点 Bug,我给组数据试试? <button id="button-display-hack" type="button" class="btn btn-danger btn-xs">Hack!</button>
|
||||
</p>
|
||||
<div class="card mb-3" id="div-form-hack" style="display: none">
|
||||
<div class="card-header">提交 Hack</div>
|
||||
<div class="card-body">
|
||||
<?php $hack_form->printHTML() ?>
|
||||
</div>
|
||||
<div class="card-footer bg-transparent small text-center text-danger">
|
||||
Hack 功能是给大家互相查错用的。请勿故意提交错误代码,然后自己 Hack 自己、贼喊捉贼哦(故意贼喊捉贼会予以封禁处理)
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#button-display-hack').click(function() {
|
||||
$('#div-form-hack').toggle('fast');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="submission-left-col">
|
||||
<?php
|
||||
if (UOJSubmission::cur()->hasJudged()) {
|
||||
if ($perm['high_level_details']) {
|
||||
HTML::echoPanel(['card' => 'mb-3', 'body' => 'p-0'], UOJLocale::get('details'), function () use ($perm, $submission_result) {
|
||||
$styler = new SubmissionDetailsStyler();
|
||||
if (!$perm['low_level_details']) {
|
||||
$styler->fade_all_details = true;
|
||||
$styler->show_small_tip = false;
|
||||
}
|
||||
echoJudgmentDetails($submission_result['details'], $styler, 'details');
|
||||
|
||||
if ($perm['manager_view'] && !$perm['low_level_details']) {
|
||||
echo '<hr />';
|
||||
echo '<h4 class="text-info">全部详细信息(管理员可见)</h4>';
|
||||
echoSubmissionDetails($submission_result['details'], 'all_details');
|
||||
}
|
||||
if ($perm['score']) {
|
||||
HTML::echoPanel('mb-3', '测评历史', function () {
|
||||
UOJSubmissionHistory::cur()->echoTimeline();
|
||||
});
|
||||
} else if ($perm['manager_view']) {
|
||||
HTML::echoPanel(['card' => 'mb-3', 'body' => 'p-0'], '详细(管理员可见)', function () use ($submission_result) {
|
||||
echoSubmissionDetails($submission_result['details'], 'details');
|
||||
});
|
||||
}
|
||||
if ($perm['manager_view'] && isset($submission_result['final_result'])) {
|
||||
HTML::echoPanel(['card' => 'mb-3', 'body' => 'p-0'], '终测结果预测(管理员可见)', function () use ($submission_result) {
|
||||
echoSubmissionDetails($submission_result['final_result']['details'], 'final_details');
|
||||
});
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="d-flex gap-2 justify-content-end">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<ul class="nav nav-tabs card-header-tabs" role="tablist">
|
||||
<?php $idx = 0; ?>
|
||||
<?php foreach ($tabs as $id => $tab) : ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?php if ($idx++ == 0) : ?>active<?php endif ?>" href="#<?= $id ?>" data-bs-toggle="tab" data-bs-target="#<?= $id ?>">
|
||||
<?= $tab['name'] ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="tab-content">
|
||||
<?php $idx = 0; ?>
|
||||
<?php foreach ($tabs as $id => $tab) : ?>
|
||||
<div class="tab-pane fade <?php if ($idx++ == 0) : ?>active show<?php endif ?>" id="<?= $id ?>" role="tabpanel">
|
||||
<?php if (!isset($tab['card_body']) || $tab['card_body']) : ?>
|
||||
<div class="card-body">
|
||||
<?php endif ?>
|
||||
|
||||
<?php $tab['displayer']() ?>
|
||||
|
||||
<?php if (!isset($tab['card_body']) || $tab['card_body']) : ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submission-right-control-panel">
|
||||
<?php if (
|
||||
isset($minor_rejudge_form) ||
|
||||
isset($rejudge_form) ||
|
||||
isset($delete_form)
|
||||
) : ?>
|
||||
<div class="card mb-3">
|
||||
<div class="card-header fw-bold">
|
||||
操作
|
||||
</div>
|
||||
|
||||
<div class="list-group list-group-flush rounded-bottom">
|
||||
<?php if (isset($minor_rejudge_form)) : ?>
|
||||
<?php $minor_rejudge_form->printHTML() ?>
|
||||
<?php endif ?>
|
||||
@ -238,5 +334,10 @@ if (UOJSubmission::cur()->hasJudged()) {
|
||||
<?php $delete_form->printHTML() ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php echoUOJPageFooter() ?>
|
||||
|
@ -484,7 +484,7 @@ class JudgmentDetailsPrinter {
|
||||
echo '<div class="col-sm-2">';
|
||||
echo '<i class="bi bi-clipboard-check"></i> ', $subtask_score, ' pts';
|
||||
echo '</div>';
|
||||
echo '<div class="col-sm-2 uoj-status-text">';
|
||||
echo '<div class="col-sm uoj-status-text">';
|
||||
echo $this->styler->getTestInfoIcon($subtask_info);
|
||||
echo htmlspecialchars($subtask_info);
|
||||
echo '</div>';
|
||||
@ -561,12 +561,12 @@ class JudgmentDetailsPrinter {
|
||||
echo '<div class="col-sm-2">';
|
||||
echo '<i class="bi bi-clipboard-check"></i> ', $test_score, ' pts';
|
||||
echo '</div>';
|
||||
echo '<div class="col-sm-2 uoj-status-text">';
|
||||
echo '<div class="col-sm uoj-status-text">';
|
||||
echo $this->styler->getTestInfoIcon($test_info);
|
||||
echo htmlspecialchars($test_info);
|
||||
echo '</div>';
|
||||
} else {
|
||||
echo '<div class="col-sm-4 uoj-status-text">';
|
||||
echo '<div class="col-sm uoj-status-text">';
|
||||
echo $this->styler->getTestInfoIcon($test_info);
|
||||
echo htmlspecialchars($test_info);
|
||||
echo '</div>';
|
||||
@ -624,7 +624,7 @@ class JudgmentDetailsPrinter {
|
||||
echo '<h4 class="card-title">', 'Custom Test', '</h4>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="col-sm-4 uoj-status-text">';
|
||||
echo '<div class="col-sm uoj-status-text">';
|
||||
echo $this->styler->getTestInfoIcon($test_info);
|
||||
echo htmlspecialchars($test_info);
|
||||
echo '</div>';
|
||||
|
@ -536,7 +536,7 @@ class UOJSubmission {
|
||||
}
|
||||
echo '</tr>';
|
||||
if ($show_status_details) {
|
||||
echo '<tr id="', "status_details_{$this->info['id']}", '" class="info">';
|
||||
echo '<tr id="', "status_details_{$this->info['id']}", '" class="">';
|
||||
echo $this->getStatusDetailsHTML();
|
||||
echo '</tr>';
|
||||
echo '<script type="text/javascript">update_judgement_status_details(' . $this->info['id'] . ')</script>';
|
||||
@ -583,6 +583,62 @@ class UOJSubmission {
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
public function echoStatusCard(array $cfg, array $viewer = null) {
|
||||
if (!isset($cfg['show_actual_score'])) {
|
||||
$cfg['show_actual_score'] = $this->viewerCanSeeScore($viewer);
|
||||
}
|
||||
|
||||
$rows = [
|
||||
'id' => 'ID',
|
||||
'submitter' => UOJLocale::get('problems::submitter'),
|
||||
'problem' => UOJLocale::get('problems::problem'),
|
||||
'result' => UOJLocale::get('problems::result'),
|
||||
'used_time' => UOJLocale::get('problems::used time'),
|
||||
'used_memory' => UOJLocale::get('problems::used memory'),
|
||||
'language' => UOJLocale::get('problems::language'),
|
||||
'tot_size' => UOJLocale::get('problems::file size'),
|
||||
'submit_time' => UOJLocale::get('problems::submit time'),
|
||||
'judge_time' => UOJLocale::get('problems::judge time'),
|
||||
];
|
||||
|
||||
echo '<div class="card mb-3">';
|
||||
echo '<div class="card-body vstack gap-2">';
|
||||
|
||||
foreach ($rows as $id => $name) {
|
||||
if (!isset($cfg["{$id}_hidden"])) {
|
||||
switch ($id) {
|
||||
case 'submitter':
|
||||
$submitter = UOJUser::query($this->info['submitter']);
|
||||
$user_profile_url = HTML::url('/user/' . $this->info['submitter']);
|
||||
|
||||
echo '<div class="pb-2">';
|
||||
echo HTML::tag('a', [
|
||||
'href' => $user_profile_url,
|
||||
'class' => 'd-inline-block me-2',
|
||||
], HTML::empty_tag('img', [
|
||||
'src' => HTML::avatar_addr($submitter, 64),
|
||||
'class' => 'uoj-user-avatar rounded',
|
||||
'style' => 'width: 2rem; height: 2rem;',
|
||||
]));
|
||||
echo UOJUser::getLink($submitter);
|
||||
echo '</div>';
|
||||
|
||||
break;
|
||||
default:
|
||||
echo '<div class="d-flex justify-content-between align-items-center">';
|
||||
echo '<span class="flex-shrink-0 me-2">', $name, '</span>';
|
||||
echo '<span class="text-end text-truncate d-inline-block">', $this->echoStatusBarTD($id, $cfg), '</span>';
|
||||
echo '</div>';
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
public function delete() {
|
||||
unlink(UOJContext::storagePath() . $this->getContent('file_name'));
|
||||
DB::delete([
|
||||
|
@ -136,20 +136,38 @@ trait UOJSubmissionLikeTrait {
|
||||
return isset($content[$key]) ? $content[$key] : null;
|
||||
}
|
||||
|
||||
public function echoContent() {
|
||||
public function echoContent($cfg = []) {
|
||||
$cfg += [
|
||||
'list_group' => false,
|
||||
];
|
||||
|
||||
$content = $this->getContent();
|
||||
if (!$content) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$card_class = 'card mb-3';
|
||||
$card_header_class = 'card-header fw-bold';
|
||||
$card_body_class = 'card-body';
|
||||
$card_footer_class = 'card-footer';
|
||||
|
||||
if ($cfg['list_group']) {
|
||||
$card_class = 'list-group-item';
|
||||
$card_header_class = 'fw-bold mb-2';
|
||||
$card_body_class = '';
|
||||
$card_footer_class = 'text-end mt-2';
|
||||
}
|
||||
|
||||
if ($content['remote_submission_id']) {
|
||||
echo <<<EOD
|
||||
<div class="card mb-3">
|
||||
<div class="card-header fw-bold">
|
||||
<div class="{$card_class}">
|
||||
<div class="{$card_header_class}">
|
||||
远程提交
|
||||
</div>
|
||||
<div class="card-body">
|
||||
远程提交 ID:{$content['remote_submission_id']}
|
||||
<div class="{$card_body_class}">
|
||||
远程提交 ID: {$content['remote_submission_id']}
|
||||
<br>
|
||||
源代码请在「详细信息」选项卡查看。
|
||||
</div>
|
||||
</div>
|
||||
EOD;
|
||||
@ -160,11 +178,11 @@ trait UOJSubmissionLikeTrait {
|
||||
$zip_file = new ZipArchive();
|
||||
if ($zip_file->open(UOJContext::storagePath() . $content['file_name'], ZipArchive::RDONLY) !== true) {
|
||||
echo <<<EOD
|
||||
<div class="card mb-3">
|
||||
<div class="card-header text-bg-danger fw-bold">
|
||||
<div class="{$card_class}">
|
||||
<div class="{$card_header_class}">
|
||||
提交内容
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="{$card_body_class} text-danger">
|
||||
木有
|
||||
</div>
|
||||
</div>
|
||||
@ -195,14 +213,14 @@ trait UOJSubmissionLikeTrait {
|
||||
$footer_text .= UOJLang::getLanguageDisplayName($file_language);
|
||||
$sh_class = UOJLang::getLanguagesCSSClass($file_language);
|
||||
echo <<<EOD
|
||||
<div class="card mb-3">
|
||||
<div class="card-header fw-bold">
|
||||
<div class="{$card_class}">
|
||||
<div class="{$card_header_class}">
|
||||
{$req['name']}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="{$card_body_class} copy-button-container">
|
||||
<pre class="mb-0"><code class="$sh_class bg-light rounded p-3">{$file_content}\n</code></pre>
|
||||
</div>
|
||||
<div class="card-footer">$footer_text</div>
|
||||
<div class="{$card_footer_class}">$footer_text</div>
|
||||
</div>
|
||||
EOD;
|
||||
} elseif ($req['type'] == "text") {
|
||||
@ -215,14 +233,14 @@ trait UOJSubmissionLikeTrait {
|
||||
$file_content = uojTextEncode($file_content, array('allow_CR' => true, 'html_escape' => true));
|
||||
$footer_text = UOJLocale::get('problems::text file');
|
||||
echo <<<EOD
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<div class="{$card_class}">
|
||||
<div class="{$card_header_class}">
|
||||
{$req['file_name']}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="{$card_body_class}">
|
||||
<pre class="mb-0 bg-light rounded p-3">\n{$file_content}\n</pre>
|
||||
</div>
|
||||
<div class="card-footer">$footer_text</div>
|
||||
<div class="{$card_footer_class}">{$footer_text}</div>
|
||||
</div>
|
||||
EOD;
|
||||
}
|
||||
|
@ -502,3 +502,26 @@ form.form-horizontal {
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Submission Page */
|
||||
|
||||
.submission-layout {
|
||||
/* display: grid; */
|
||||
grid-template-columns: 75% 25%;
|
||||
grid-template-rows: auto 1fr;
|
||||
}
|
||||
|
||||
.submission-left-col {
|
||||
grid-column: 1;
|
||||
grid-row: 1 / span 2;
|
||||
}
|
||||
|
||||
.submission-right-col {
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
}
|
||||
|
||||
.submission-right-control-panel {
|
||||
grid-column: 2;
|
||||
grid-row: 2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user