more overview/actions-links

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-02-25 20:41:06 +01:00
parent fc4725cd61
commit 6b5cabb125
12 changed files with 130 additions and 86 deletions

View File

@@ -33,18 +33,22 @@ if ($page == '' || $page == 'overview') {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_plans");
try {
$plan_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.plans.php';
$list = (new \Froxlor\UI\Collection(\Froxlor\Api\Commands\HostingPlans::class, $userinfo))
->withPagination($plan_list_data['plan_list']['columns'])
->getList();
$plan_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.plans.php';
$list = (new \Froxlor\UI\Collection(\Froxlor\Api\Commands\HostingPlans::class, $userinfo))
->withPagination($plan_list_data['plan_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, $plan_list_data['plan_list']),
]);
UI::twigOutputBuffer();
UI::twigBuffer('user/table.html.twig', [
'listing' => \Froxlor\UI\Listing::format($list, $plan_list_data['plan_list']),
'actions_links' => [[
'href' => $linker->getLink(['section' => 'plans', 'page' => $page, 'action' => 'add']),
'label' => $lng['admin']['plans']['add']
]]
]);
UI::twigOutputBuffer();
} elseif ($action == 'delete' && $id != 0) {
try {