more overview/actions-links
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -32,22 +32,26 @@ if ($page == 'admins' && $userinfo['change_serversettings'] == '1') {
|
||||
|
||||
if ($action == '') {
|
||||
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_admins");
|
||||
$admin_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.admins.php';
|
||||
$admin_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.admins.php';
|
||||
|
||||
try {
|
||||
try {
|
||||
// get filtered collection
|
||||
$list = (new \Froxlor\UI\Collection(\Froxlor\Api\Commands\Admins::class, $userinfo))
|
||||
->withPagination($admin_list_data['admin_list']['columns'])
|
||||
->getList();
|
||||
$list = (new \Froxlor\UI\Collection(\Froxlor\Api\Commands\Admins::class, $userinfo))
|
||||
->withPagination($admin_list_data['admin_list']['columns'])
|
||||
->getList();
|
||||
} catch (Exception $e) {
|
||||
\Froxlor\UI\Response::dynamic_error($e->getMessage());
|
||||
}
|
||||
|
||||
UI::twigBuffer('user/table.html.twig', [
|
||||
'listing' => \Froxlor\UI\Listing::format($list, $admin_list_data['admin_list']),
|
||||
]);
|
||||
UI::twigOutputBuffer();
|
||||
} elseif ($action == 'su') {
|
||||
UI::twigBuffer('user/table.html.twig', [
|
||||
'listing' => \Froxlor\UI\Listing::format($list, $admin_list_data['admin_list']),
|
||||
'actions_links' => [[
|
||||
'href' => $linker->getLink(['section' => 'admins', 'page' => $page, 'action' => 'add']),
|
||||
'label' => $lng['admin']['admin_add']
|
||||
]]
|
||||
]);
|
||||
UI::twigOutputBuffer();
|
||||
} elseif ($action == 'su') {
|
||||
|
||||
try {
|
||||
$json_result = Admins::getLocal($userinfo, array(
|
||||
|
||||
Reference in New Issue
Block a user