mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 14:48:41 +00:00
feat(problems): remote problems tab
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
7b6354706a
commit
886fb1a2fa
@ -21,7 +21,7 @@ function getProblemTR($info) {
|
||||
$html .= ' <span class="badge text-white bg-info">' . UOJLocale::get('problems::my problem') . '</span> ';
|
||||
}
|
||||
if ($info['type'] == 'remote') {
|
||||
$html .= ' ' . HTML::tag('span', ['class' => 'badge text-bg-success'], '远端评测题');
|
||||
HTML::tag('a', ['class' => 'badge text-bg-success', 'href' => '/problems/remote'], '远端评测题');
|
||||
}
|
||||
if ($info['is_hidden']) {
|
||||
$html .= ' <span class="badge text-bg-danger"><i class="bi bi-eye-slash-fill"></i> ' . UOJLocale::get('hidden') . '</span> ';
|
||||
|
@ -95,7 +95,7 @@ function getProblemTR($info) {
|
||||
$html .= ' <a href="/problems?my=on"><span class="badge text-white bg-info">' . UOJLocale::get('problems::my problem') . '</span></a> ';
|
||||
}
|
||||
if ($info['type'] == 'remote') {
|
||||
$html .= ' ' . HTML::tag('span', ['class' => 'badge text-bg-success'], '远端评测题');
|
||||
$html .= ' ' . HTML::tag('a', ['class' => 'badge text-bg-success', 'href' => '/problems/remote'], '远端评测题');
|
||||
}
|
||||
if ($info['is_hidden']) {
|
||||
$html .= ' <a href="/problems?is_hidden=on"><span class="badge text-bg-danger"><i class="bi bi-eye-slash-fill"></i> ' . UOJLocale::get('hidden') . '</span></a> ';
|
||||
@ -144,6 +144,8 @@ $search_is_effective = false;
|
||||
$cur_tab = UOJRequest::get('tab', 'is_string', 'all');
|
||||
if ($cur_tab == 'template') {
|
||||
$search_tag = "模板题";
|
||||
} else if ($cur_tab == 'remote') {
|
||||
$cond['type'] = 'remote';
|
||||
}
|
||||
if (is_string($search_tag)) {
|
||||
$cond[] = [
|
||||
@ -202,16 +204,20 @@ $header .= '<th class="text-center" style="width:4em;">' . UOJLocale::get('probl
|
||||
$header .= '<th class="text-center" style="width:50px;">' . UOJLocale::get('appraisal') . '</th>';
|
||||
$header .= '</tr>';
|
||||
|
||||
$tabs_info = array(
|
||||
'all' => array(
|
||||
$tabs_info = [
|
||||
'all' => [
|
||||
'name' => UOJLocale::get('problems::all problems'),
|
||||
'url' => "/problems"
|
||||
),
|
||||
'template' => array(
|
||||
],
|
||||
'template' => [
|
||||
'name' => UOJLocale::get('problems::template problems'),
|
||||
'url' => "/problems/template"
|
||||
)
|
||||
);
|
||||
],
|
||||
'remote' => [
|
||||
'name' => UOJLocale::get('problems::remote problems'),
|
||||
'url' => "/problems/remote"
|
||||
],
|
||||
];
|
||||
|
||||
$pag = new Paginator([
|
||||
'col_names' => ['*'],
|
||||
@ -393,7 +399,7 @@ $pag = new Paginator([
|
||||
<div class="list-group-item list-group-item-action p-0">
|
||||
<?php $new_problem_form->printHTML() ?>
|
||||
</div>
|
||||
<a class="list-group-item list-group-item-action" href="/problems/new/remote">
|
||||
<a class="list-group-item list-group-item-action" href="/problems/remote/new">
|
||||
<i class="bi bi-cloud-plus"></i>
|
||||
新建远端评测题目
|
||||
</a>
|
||||
|
@ -4,6 +4,7 @@ return [
|
||||
'problem list' => 'Problem List',
|
||||
'all problems' => 'All Problems',
|
||||
'template problems' => 'Template Problems',
|
||||
'remote problems' => 'Remote Problems',
|
||||
'add new' => 'Add new problem',
|
||||
'add new list' => 'Add new problem list',
|
||||
'my problem' => 'My problem',
|
||||
|
@ -4,6 +4,7 @@ return [
|
||||
'problem list' => '题单',
|
||||
'all problems' => '总题库',
|
||||
'template problems' => '模板题库',
|
||||
'remote problems' => '远程题库',
|
||||
'add new' => '添加新题',
|
||||
'add new list' => '添加新题单',
|
||||
'my problem' => '我的题目',
|
||||
|
@ -17,7 +17,8 @@ Route::group(
|
||||
Route::any('/', '/index.php');
|
||||
Route::any('/problems', '/problem_set.php');
|
||||
Route::any('/problems/template', '/problem_set.php?tab=template');
|
||||
Route::any('/problems/new/remote', '/new_remote_problem.php');
|
||||
Route::any('/problems/remote', '/problem_set.php?tab=remote');
|
||||
Route::any('/problems/remote/new', '/new_remote_problem.php');
|
||||
Route::any('/problem/{id}', '/problem.php');
|
||||
Route::any('/problem/{id}/solutions', '/problem_solutions.php');
|
||||
Route::any('/problem/{id}/statistics', '/problem_statistics.php');
|
||||
|
Loading…
Reference in New Issue
Block a user