@use plume_models::users::User; @use crate::templates::{base, instance::admin_header}; @use crate::template_utils::*; @use crate::routes::*; @(ctx: BaseContext, users: Vec, user: Option<&str>, page: i32, n_pages: i32) @:base(ctx, i18n!(ctx.1, "Users"), {}, {}, { @:admin_header(ctx, "Users", 3))
@for user in users {
@avatar(ctx.0, &user, Size::Small, false, ctx.1)

@user.name() @format!("@{}", user.username)

@if user.is_admin() {

@i18n!(ctx.1, "Admin")

} else { @if user.is_moderator() {

@i18n!(ctx.1, "Moderator")

} }
}
@if user.is_some() { @paginate_param(ctx.1, page, n_pages, Some(format!("user={}", encode_query_param(user.unwrap_or_default())))) } else { @paginate(ctx.1, page, n_pages) } })