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

@@ -59,17 +59,17 @@ if ($page == 'overview' || $page == 'mysqls') {
$sql = Database::getSqlData();
$lng['mysql']['description'] = str_replace('<SQL_HOST>', $sql['host'], $lng['mysql']['description']);
$add_link = false;
$actions_links = false;
if ($userinfo['mysqls_used'] < $userinfo['mysqls'] || $userinfo['mysqls'] == '-1') {
$add_link = [
$actions_links = [[
'href' => $linker->getLink(['section' => 'mysql', 'page' => 'mysqls', 'action' => 'add']),
'label' => $lng['mysql']['database_create']
];
]];
}
UI::twigBuffer('user/table.html.twig', [
'listing' => \Froxlor\UI\Listing::format($list, $mysql_list_data['mysql_list']),
'add_link' => $add_link,
'actions_links' => $actions_links,
'entity_info' => $lng['mysql']['description']
]);
UI::twigOutputBuffer();