From 6cbb683f99385f02ad111ca03530be4c83c1ef1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Sat, 19 Jan 2019 22:59:32 +0100 Subject: [PATCH] Rename admin templates to match email --- src/api/admin.rs | 6 +++--- src/main.rs | 6 +++--- src/static/templates/admin/{admin_base.hbs => base.hbs} | 0 src/static/templates/admin/{admin_login.hbs => login.hbs} | 0 src/static/templates/admin/{admin_page.hbs => page.hbs} | 0 5 files changed, 6 insertions(+), 6 deletions(-) rename src/static/templates/admin/{admin_base.hbs => base.hbs} (100%) rename src/static/templates/admin/{admin_login.hbs => login.hbs} (100%) rename src/static/templates/admin/{admin_page.hbs => page.hbs} (100%) diff --git a/src/api/admin.rs b/src/api/admin.rs index 1cddf629..681cf148 100644 --- a/src/api/admin.rs +++ b/src/api/admin.rs @@ -35,7 +35,7 @@ impl AdminTemplateData { fn login(error: Option) -> Self { Self { users: Vec::new(), - page_content: String::from("admin/admin_login"), + page_content: String::from("admin/login"), error, } } @@ -43,13 +43,13 @@ impl AdminTemplateData { fn admin(users: Vec) -> Self { Self { users, - page_content: String::from("admin/admin_page"), + page_content: String::from("admin/page"), error: None, } } fn render(self) -> Result { - CONFIG.templates.render("admin/admin_base", &self).map_err(Into::into) + CONFIG.templates.render("admin/base", &self).map_err(Into::into) } } diff --git a/src/main.rs b/src/main.rs index 028d26e2..9861abc8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -352,9 +352,9 @@ fn load_templates(path: String) -> Handlebars { reg!("email/pw_hint_some"); reg!("email/send_org_invite"); - reg!("admin/admin_base"); - reg!("admin/admin_login"); - reg!("admin/admin_page"); + reg!("admin/base"); + reg!("admin/login"); + reg!("admin/page"); // And then load user templates to overwrite the defaults // Use .hbs extension for the files diff --git a/src/static/templates/admin/admin_base.hbs b/src/static/templates/admin/base.hbs similarity index 100% rename from src/static/templates/admin/admin_base.hbs rename to src/static/templates/admin/base.hbs diff --git a/src/static/templates/admin/admin_login.hbs b/src/static/templates/admin/login.hbs similarity index 100% rename from src/static/templates/admin/admin_login.hbs rename to src/static/templates/admin/login.hbs diff --git a/src/static/templates/admin/admin_page.hbs b/src/static/templates/admin/page.hbs similarity index 100% rename from src/static/templates/admin/admin_page.hbs rename to src/static/templates/admin/page.hbs