summaryrefslogtreecommitdiff
path: root/Views/Account/List.cshtml
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2023-03-06 07:41:35 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2023-03-06 07:41:35 +0300
commit0c4d13caed53b2702eef41461d0c8a4b25df48f6 (patch)
tree6fb6d2d54cedce1c204fb30b75f4d470fbf7ee83 /Views/Account/List.cshtml
parentcdd58a8f518d037658518c233e74beea22d03906 (diff)
Base authorization/authentification
Diffstat (limited to 'Views/Account/List.cshtml')
-rw-r--r--Views/Account/List.cshtml54
1 files changed, 54 insertions, 0 deletions
diff --git a/Views/Account/List.cshtml b/Views/Account/List.cshtml
new file mode 100644
index 0000000..7f17543
--- /dev/null
+++ b/Views/Account/List.cshtml
@@ -0,0 +1,54 @@
+@using Microsoft.AspNetCore.Identity
+@model IQueryable<IdentityUser>
+
+<!DOCTYPE html>
+<html>
+
+<head>
+ <title>Users</title>
+ <link href="/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
+</head>
+
+<body>
+ <div class="m-2">
+ <h5 class="bg-info text-white text-center p-2">User Administration</h5>
+ <table class="table table-sm table-bordered">
+ <tr>
+ <th>ID</th>
+ <th>Name</th>
+ <th>Email</th>
+ <th></th>
+ </tr>
+ @if (Model.Count() == 0)
+ {
+ <tr>
+ <td colspan="4" class="text-center">No User Accounts</td>
+ </tr>
+ }
+ else
+ {
+ foreach (IdentityUser user in Model)
+ {
+ <tr>
+ <td>@user.Id</td>
+ <td>@user.UserName</td>
+ <td>@user.Email</td>
+ <td class="text-center">
+ <form asp-page="List" method="post">
+ <input type="hidden" name="Id" value="@user.Id" />
+ <a class="btn btn-sm btn-warning" asp-page="Editor" asp-route-id="@user.Id"
+ asp-route-mode="edit">Edit</a>
+ <button type="submit" class="btn btn-sm btn-danger">
+ Delete
+ </button>
+ </form>
+ </td>
+ </tr>
+ }
+ }
+ </table>
+ <a class="btn btn-primary" asp-page="create">Create</a>
+ </div>
+</body>
+
+</html> \ No newline at end of file