diff --git a/templates/admin.templ b/templates/admin.templ index d68c79a..527112b 100644 --- a/templates/admin.templ +++ b/templates/admin.templ @@ -14,23 +14,7 @@ templ Admin(user User) { @Header(user, "/admin")
- - + @AdminSidebar(user, "/admin")
diff --git a/templates/admin_library.templ b/templates/admin_library.templ index a864b4f..c572a78 100644 --- a/templates/admin_library.templ +++ b/templates/admin_library.templ @@ -8,25 +8,10 @@ templ AdminLibrary(user User, libraries []LibraryData, users []User) { Library Management - Bookhoard - + @Header(user, "/admin/library")
- + @AdminSidebar(user, "/admin/library")
diff --git a/templates/admin_users.templ b/templates/admin_users.templ index 562905e..3f1b1cd 100644 --- a/templates/admin_users.templ +++ b/templates/admin_users.templ @@ -12,130 +12,134 @@ templ AdminUsers(currentUser User, users []User, adminCount int) { - + @Header(currentUser, "/admin/users") -
-
-

User Management

-

Manage user accounts and permissions

-
+
+ @AdminSidebar(currentUser, "/admin/users") - -
- - - - - - - - - - - - for _, user := range users { - - - +
+
+

User Management

+

Manage user accounts and permissions

+
- -
+ +
+
UsernameEmailRoleCreatedActions
-
-
-
{user.Username}
- if user.ID == currentUser.ID { - You - } -
-
-
-
{user.Email}
-
+ + + + + + + + + + + for _, user := range users { + + + - - + + - - + + - - - - } - -
UsernameEmailRoleCreatedActions
+
+
+
{user.Username}
+ if user.ID == currentUser.ID { + You + } +
+
+
- if user.Role == "admin" && adminCount == 1 { - -
- -
- } else { - -
- } -
+
{user.Email}
+
-
{ user.CreatedAt.Format("2006-01-02") }
-
+ if user.Role == "admin" && adminCount == 1 { + +
+ +
+ } else { + +
+ } +
- - if user.Role == "admin" && adminCount == 1 { - - } else { - - } -
-
-
+ + +
{ user.CreatedAt.Format("2006-01-02") }
+ + + + + + if user.Role == "admin" && adminCount == 1 { + + } else { + + } + + + } + + +
+
+
}