Set up css links for the admin panel. Also updated the engine.

This commit is contained in:
Relintai 2021-11-14 22:12:32 +01:00
parent 1fb2680c6f
commit aa1822e20e
3 changed files with 11 additions and 5 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": {"master": "6f7b413e08f21e6d70c936eaae9702f66207f30c"}}
{"engine": {"master": "7485a80d12f5ac58116d9b33305c7f9bc5246239"}}

View File

@ -24,10 +24,10 @@ void BuildingController::admin_handle_request_main(Request *request) {
request->send_error(404);
}
String BuildingController::admin_get_section_name() {
return "Building Editor";
return "Buildings";
}
void BuildingController::admin_add_section_links(Vector<AdminSectionLinkInfo> *links) {
links->push_back(AdminSectionLinkInfo("Editor", ""));
links->push_back(AdminSectionLinkInfo("- Building Editor", ""));
}
bool BuildingController::admin_full_render() {
return false;
@ -40,7 +40,7 @@ void BuildingController::admin_render_building_list(Request *request) {
b.div()->cls("back")->f()->a()->href(request->get_url_root_parent())->f()->w("<--- Back")->ca()->cdiv();
b.br();
b.h4()->f()->w("Building Editor")->ch4();
b.div()->cls("top_menu")->f()->w("Building Editor")->cdiv();
b.br();
b.div()->cls("top_menu")->f()->a()->href(request->get_url_root("new"))->f()->w("Create New")->ca()->cdiv();
b.br();

View File

@ -284,7 +284,13 @@ MourneApplication::MourneApplication() :
_admin_panel = new AdminPanel();
_admin_panel->register_admin_controller("buildings", BuildingController::get_singleton());
HTMLBuilder b;
b.link()->rel("stylesheet")->type("text/css")->href("/css/base.css")->f()->f();
b.link()->rel("stylesheet")->type("text/css")->href("/css/admin.css")->f()->f();
_admin_panel->set_default_header(b.result);
compile_menu();
}