From 5462650e1029586c828751365c48a870978339cd Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 14 Nov 2021 22:17:21 +0100 Subject: [PATCH] Added a new body top parameter to the admin panel. --- modules/admin_panel/admin_panel.cpp | 5 +++++ modules/admin_panel/admin_panel.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/modules/admin_panel/admin_panel.cpp b/modules/admin_panel/admin_panel.cpp index 338a1e6..cfead24 100644 --- a/modules/admin_panel/admin_panel.cpp +++ b/modules/admin_panel/admin_panel.cpp @@ -110,6 +110,8 @@ void AdminPanel::clear() { void AdminPanel::render_headers(Request *request) { request->head += _default_headers; + + request->body += _default_body_top; } void AdminPanel::render_footer(Request *request) { @@ -119,6 +121,9 @@ void AdminPanel::render_footer(Request *request) { void AdminPanel::set_default_header(const String &val) { _default_headers = val; } +void AdminPanel::set_default_body_top(const String &val) { + _default_body_top = val; +} void AdminPanel::set_default_footer(const String &val) { _default_footer = val; } diff --git a/modules/admin_panel/admin_panel.h b/modules/admin_panel/admin_panel.h index 2056840..b2f8b76 100644 --- a/modules/admin_panel/admin_panel.h +++ b/modules/admin_panel/admin_panel.h @@ -26,6 +26,7 @@ public: virtual void render_footer(Request *request); void set_default_header(const String &val); + void set_default_body_top(const String &val); void set_default_footer(const String &val); static AdminPanel *get_singleton(); @@ -45,6 +46,7 @@ protected: Vector _controllers; String _default_headers; + String _default_body_top; String _default_footer; };