mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 08:58:42 +00:00
refactor(problem/manage/permissions): use echoLongTable
This commit is contained in:
parent
cfcced0984
commit
999453e0bf
@ -193,30 +193,29 @@ $solution_view_type_form->runAtServer();
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header fw-bold">管理者</div>
|
<div class="card-header fw-bold">管理者</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<table class="table">
|
<?php
|
||||||
<thead>
|
echoLongTable(
|
||||||
|
['username'],
|
||||||
|
"problems_permissions",
|
||||||
|
["problem_id" => UOJProblem::info('id')],
|
||||||
|
"",
|
||||||
|
<<<EOD
|
||||||
<tr>
|
<tr>
|
||||||
<th>#</th>
|
|
||||||
<th>用户名</th>
|
<th>用户名</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
EOD,
|
||||||
<tbody>
|
function ($row) {
|
||||||
<?php
|
echo HTML::tag_begin('tr');
|
||||||
$row_id = 0;
|
echo HTML::tag('td', [], UOJUser::getLink($row['username']));
|
||||||
$res = DB::selectAll([
|
echo HTML::tag_end('tr');
|
||||||
"select username from problems_permissions",
|
},
|
||||||
"where", ["problem_id" => UOJProblem::info('id')]
|
[
|
||||||
]);
|
'echo_full' => true,
|
||||||
foreach ($res as $row) {
|
'div_classes' => ['table-responsive'],
|
||||||
$row_id++;
|
'table_classes' => ['table', 'align-middle'],
|
||||||
echo '<tr>', '<td>', $row_id, '</td>', '<td>', UOJUser::getLink($row['username']), '</td>', '</tr>';
|
]
|
||||||
}
|
);
|
||||||
?>
|
?>
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<p class="text-center">
|
|
||||||
命令格式:命令一行一个,<code>+mike</code> 表示把 <code>mike</code> 加入管理者,<code>-mike</code> 表示把 <code>mike</code> 从管理者中移除。
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<?php $managers_form->printHTML() ?>
|
<?php $managers_form->printHTML() ?>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user