diff --git a/admin/template/template.php b/admin/template/template.php index ff47b671..407fd8ac 100644 --- a/admin/template/template.php +++ b/admin/template/template.php @@ -175,6 +175,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 1c47f2e8..2117cadc 100644 --- a/index.php +++ b/index.php @@ -369,6 +369,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['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..0825dd27 --- /dev/null +++ b/system/templates/admin-bar.html.twig @@ -0,0 +1,123 @@ + + +