diff --git a/admin/template/template.php b/admin/template/template.php index 6ca893fc..c2c1b745 100644 --- a/admin/template/template.php +++ b/admin/template/template.php @@ -199,6 +199,16 @@ echo $content; } ?> +display('admin-bar.html.twig', [ + 'username' => USE_ACCOUNT_NAME ? $account_logged->getName() : $account_logged->getId() + ]); +} +?> diff --git a/index.php b/index.php index 32e8599c..4f334416 100644 --- a/index.php +++ b/index.php @@ -357,6 +357,14 @@ if($config['backward_support']) { $topic = $title; } +/** + * @var OTS_Account $account_logged + */ +if ($logged && admin()) { + $content .= $twig->render('admin-bar.html.twig', [ + 'username' => USE_ACCOUNT_NAME ? $account_logged->getName() : $account_logged->getId() + ]); +} $title_full = (isset($title) ? $title . $config['title_separator'] : '') . $config['lua']['serverName']; require $template_path . '/' . $template_index; diff --git a/system/templates/admin-bar.html.twig b/system/templates/admin-bar.html.twig new file mode 100644 index 00000000..2775ad50 --- /dev/null +++ b/system/templates/admin-bar.html.twig @@ -0,0 +1,102 @@ + + +
+ + +