Actualiza formato del código aplicando cargo fmt
This commit is contained in:
parent
4b5caf06a7
commit
e6ea59785e
75 changed files with 1069 additions and 1160 deletions
|
|
@ -22,16 +22,11 @@ impl ModuleTrait for Admin {
|
|||
}
|
||||
|
||||
fn configure_service(&self, cfg: &mut app::web::ServiceConfig) {
|
||||
cfg.service(
|
||||
app::web::scope("/admin")
|
||||
.route("", app::web::get().to(summary::summary))
|
||||
);
|
||||
cfg.service(app::web::scope("/admin").route("", app::web::get().to(summary::summary)));
|
||||
}
|
||||
|
||||
fn actions(&self) -> Vec<HookAction> {
|
||||
vec![
|
||||
hook_action!(BeforeRenderPageHook => before_render_page)
|
||||
]
|
||||
vec![hook_action!(BeforeRenderPageHook => before_render_page)]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,23 @@
|
|||
use pagetop::prelude::*;
|
||||
use super::l;
|
||||
use pagetop::prelude::*;
|
||||
|
||||
pub async fn summary() -> app::Result<Markup> {
|
||||
let top_menu = Menu::new()
|
||||
.with_item(MenuItem::label(l("module_name").as_str()))
|
||||
.with_item(MenuItem::link("Opción 2", "https://www.google.es"))
|
||||
.with_item(MenuItem::link_blank("Opción 3", "https://www.google.es"))
|
||||
.with_item(MenuItem::submenu("Submenú 1", Menu::new()
|
||||
.with_item(MenuItem::label("Opción 1"))
|
||||
.with_item(MenuItem::label("Opción 2"))
|
||||
.with_item(MenuItem::submenu(
|
||||
"Submenú 1",
|
||||
Menu::new()
|
||||
.with_item(MenuItem::label("Opción 1"))
|
||||
.with_item(MenuItem::label("Opción 2")),
|
||||
))
|
||||
.with_item(MenuItem::separator())
|
||||
.with_item(MenuItem::submenu("Submenú 2", Menu::new()
|
||||
.with_item(MenuItem::label("Opción 1"))
|
||||
.with_item(MenuItem::label("Opción 2"))
|
||||
.with_item(MenuItem::submenu(
|
||||
"Submenú 2",
|
||||
Menu::new()
|
||||
.with_item(MenuItem::label("Opción 1"))
|
||||
.with_item(MenuItem::label("Opción 2")),
|
||||
))
|
||||
.with_item(MenuItem::label("Opción 4"));
|
||||
|
||||
|
|
@ -21,38 +25,33 @@ pub async fn summary() -> app::Result<Markup> {
|
|||
.with_item(MenuItem::label("Opción 1"))
|
||||
.with_item(MenuItem::link("Opción 2", "https://www.google.es"))
|
||||
.with_item(MenuItem::link_blank("Opción 3", "https://www.google.es"))
|
||||
.with_item(MenuItem::submenu("Submenú 1", Menu::new()
|
||||
.with_item(MenuItem::label("Opción 1"))
|
||||
.with_item(MenuItem::label("Opción 2"))
|
||||
.with_item(MenuItem::submenu(
|
||||
"Submenú 1",
|
||||
Menu::new()
|
||||
.with_item(MenuItem::label("Opción 1"))
|
||||
.with_item(MenuItem::label("Opción 2")),
|
||||
))
|
||||
.with_item(MenuItem::separator())
|
||||
.with_item(MenuItem::submenu("Submenú 2", Menu::new()
|
||||
.with_item(MenuItem::label("Opción 1"))
|
||||
.with_item(MenuItem::label("Opción 2"))
|
||||
.with_item(MenuItem::submenu(
|
||||
"Submenú 2",
|
||||
Menu::new()
|
||||
.with_item(MenuItem::label("Opción 1"))
|
||||
.with_item(MenuItem::label("Opción 2")),
|
||||
))
|
||||
.with_item(MenuItem::label("Opción 4"));
|
||||
|
||||
Page::new()
|
||||
|
||||
.with_context(InContextOp::SetTheme("Bootsier"))
|
||||
|
||||
.with_title("Admin")
|
||||
|
||||
.add_to("top-menu", top_menu)
|
||||
|
||||
.add_to("content", grid::Row::new()
|
||||
.with_column(grid::Column::new()
|
||||
.with_component(side_menu)
|
||||
)
|
||||
.with_column(grid::Column::new()
|
||||
.with_component(Chunck::with(html! {
|
||||
.add_to(
|
||||
"content",
|
||||
grid::Row::new()
|
||||
.with_column(grid::Column::new().with_component(side_menu))
|
||||
.with_column(grid::Column::new().with_component(Chunck::with(html! {
|
||||
p { "Columna 2"}
|
||||
}))
|
||||
)
|
||||
}))),
|
||||
)
|
||||
|
||||
|
||||
.using_template("admin")
|
||||
|
||||
.render()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue