♻️ Atributos class e id explícitos en html!
Se usa `class="..."` e `id="..."` en lugar de `div.a #x`. El HTML generado es idéntico.
This commit is contained in:
parent
58d1fef4f1
commit
3f3634fdab
21 changed files with 80 additions and 74 deletions
|
|
@ -119,7 +119,7 @@ async fn profile_roles(roles: &[role::Model], cx: &mut Context) -> Block {
|
|||
@if items.is_empty() {
|
||||
"-"
|
||||
} @else {
|
||||
ul.user-profile-roles {
|
||||
ul class="user-profile-roles" {
|
||||
@for (label, system_badge) in &items {
|
||||
li {
|
||||
(label.as_str())
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ pub(crate) fn back_link(href: impl Into<RoutePath>) -> Html {
|
|||
let href = href.into();
|
||||
Html::with(move |cx| {
|
||||
html! {
|
||||
p.user-admin-back-link {
|
||||
p class="user-admin-back-link" {
|
||||
a href=(href.clone()) { (Lc::t("link-back-to-list", &LOCALES_USER).using(cx)) }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,12 +26,12 @@ pub(crate) async fn list_get(request: HttpRequest) -> Result<Response, ErrorPage
|
|||
content = content.with_child(Block::new().with_title(group_label.clone()).with_child(
|
||||
Html::with(move |cx| {
|
||||
html! {
|
||||
table.user-admin-table {
|
||||
table class="user-admin-table" {
|
||||
tbody {
|
||||
@for (key, label) in &items {
|
||||
tr {
|
||||
td { (label.using(cx)) }
|
||||
td.user-admin-permission-key { (key) }
|
||||
td class="user-admin-permission-key" { (key) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -361,12 +361,12 @@ fn role_view_permissions(groups: &PermissionGroups) -> Vec<Block> {
|
|||
.with_title(group_label.clone())
|
||||
.with_child(Html::with(move |cx| {
|
||||
html! {
|
||||
ul.user-admin-permission-list {
|
||||
ul class="user-admin-permission-list" {
|
||||
@for (_key, label, granted) in &perms {
|
||||
@if *granted {
|
||||
li.user-admin-permission-granted { (label.using(cx)) }
|
||||
li class="user-admin-permission-granted" { (label.using(cx)) }
|
||||
} @else {
|
||||
li.user-admin-permission-missing { (label.using(cx)) }
|
||||
li class="user-admin-permission-missing" { (label.using(cx)) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ fn search_bar(current_query: Option<String>) -> Html {
|
|||
let value = current_query.unwrap_or_default();
|
||||
Html::with(move |cx| {
|
||||
html! {
|
||||
div.user-admin-search {
|
||||
div class="user-admin-search" {
|
||||
input
|
||||
type="search"
|
||||
id="user-admin-search-input"
|
||||
|
|
@ -588,7 +588,7 @@ async fn user_view_roles(roles: &[role::Model], cx: &mut Context) -> Block {
|
|||
@if items.is_empty() {
|
||||
"-"
|
||||
} @else {
|
||||
table.user-admin-table {
|
||||
table class="user-admin-table" {
|
||||
tbody {
|
||||
@for (id, machine_name, label, system_badge) in &items {
|
||||
@let href = cx.route(role_path(*id, "view")).to_string();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue