= UOJLocale::get('groups') ?>
printHTML(); ?>
ID |
{$groups_caption} |
{$users_caption} |
EOD;
if (isSuperUser($myUser)) {
$cond = "1";
} else {
$cond = 'is_hidden = 0';
}
echoLongTable(
['a.id as group_id', 'a.title as title', 'a.is_hidden as is_hidden', 'count(b.username) as user_count'],
"`groups` a left join groups_users b on a.id = b.group_id",
$cond,
'group by a.id order by a.id asc',
$header,
function ($group) use ($myUser) {
echo '
';
echo '';
echo '#', $group['group_id'], ' | ';
echo '';
echo '', $group['title'], '';
if ($group['is_hidden']) {
echo ' ', UOJLocale::get('hidden'), ' ';
}
echo ' | ';
echo "{$group['user_count']} | ";
echo '
';
},
[
'page_len' => 40,
'div_classes' => ['card', 'my-3'],
'table_classes' => ['table', 'uoj-table', 'mb-0'],
'head_pagination' => true,
'pagination_table' => "`groups`",
]
);
?>