Added a new body top parameter to the admin panel.

This commit is contained in:
Relintai 2021-11-14 22:17:21 +01:00
parent 7485a80d12
commit 5462650e10
2 changed files with 7 additions and 0 deletions

View File

@ -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;
}

View File

@ -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<AdminPanelSection> _controllers;
String _default_headers;
String _default_body_top;
String _default_footer;
};