blob: 7f17543381061bc4d83017e14efb21919874893a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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>
|