package templates // adminCreateUserForm renders the (admin-only) account creation form. It // lives behind an explicit toggle on the Users page — never visible by // default — so creation stays available with self-service registration // disabled without dominating the page. templ adminCreateUserForm() {
@Icon("user", "h-4 w-4")

Create User

Password Requirements

    } templ AdminUsers(currentUser User, users []User, adminCount int) { Users - Bookhoard Admin @Header(currentUser, "/admin/users")
    @Icon("users", "h-5 w-5")

    User Management

    Manage user accounts and permissions

    @adminCreateUserForm()
    for _, user := range users {
    @Icon("user", "h-5 w-5")

    { user.Username }

    if user.ID == currentUser.ID { You }

    { user.Email }

    Created { FormatInTimezone(user.CreatedAt, currentUser.Timezone) }

    Role if user.Role == "admin" && adminCount == 1 { } else { }
    if user.Role == "admin" && adminCount == 1 { } else { }
    }
    }