28 lines
1.1 KiB
Rust
28 lines
1.1 KiB
Rust
use maud::{html, PreEscaped};
|
|
|
|
use crate::templates;
|
|
|
|
/// Administrator settings menu template builder.
|
|
pub fn build_template() -> PreEscaped<String> {
|
|
let menu_template = html! {
|
|
(PreEscaped("<!-- ADMIN SETTINGS MENU -->"))
|
|
div class="card center" {
|
|
(PreEscaped("<!-- BUTTONS -->"))
|
|
div id="settingsButtons" {
|
|
a id="configure" class="button button-primary center" href="/settings/admin/configure" title="Configure Admin" { "Configure Admin" }
|
|
a id="change" class="button button-primary center" href="/auth/change" title="Change Password" { "Change Password" }
|
|
a id="reset" class="button button-primary center" href="/auth/reset" title="Reset Password" { "Reset Password" }
|
|
|
|
}
|
|
}
|
|
};
|
|
|
|
// wrap the nav bars around the settings menu template content
|
|
// parameters are template, title and back url
|
|
let body =
|
|
templates::nav::build_template(menu_template, "Administrator Settings", Some("/settings"));
|
|
|
|
// render the base template with the provided body
|
|
templates::base::build_template(body)
|
|
}
|