| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- @model List<bitforum.Models.Views.UserViewModel>
- @{
- ViewData["Title"] = "권한 관리";
- }
- <div id="directorUser" class="container">
- <h3>@ViewData["Title"]</h3>
- <hr />
- <partial name="_StatusMessage" />
- <small>관리자 가입 회원들입니다. 메뉴 접근 권한을 관리할 수 있습니다.</small>
- <div class="row g-2">
- <div class="col align-self-end">
- Total : @Model.Count.ToString("N0")
- </div>
- <div class="col text-end">
- <a class="btn btn-sm btn-primary" asp-controller="Role" asp-action="Index">역할 관리</a>
- </div>
- </div>
- <div class="table-responsive">
- <table class="table table-striped table-bordered table-hover mt-3">
- <thead>
- <tr class="text-center">
- <th>User</th>
- <th>Role</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>
- @if (Model == null || !Model.Any())
- {
- <tr>
- <td colspan="3" class="text-center align-middle">No Data.</td>
- </tr>
- }
- else
- {
- @foreach (var user in Model)
- {
- <tr class="text-center align-middle">
- <td>
- @user.Name<br />
- @user.Email<br />
- <small>(@user.ID)</small>
- </td>
- <td>
- @if (user.Roles.Any())
- {
- @string.Join(", ", user.Roles)
- }
- else
- {
- <span>역할 없음</span>
- }
- </td>
- <td>
- <a class="btn btn-sm btn-info text-white" asp-controller="User" asp-action="Edit" asp-route-userId="@user.ID">수정</a>
- <a class="btn btn-sm btn-danger" asp-controller="Attach" asp-action="Index" asp-route-userId="@user.ID">권한</a>
- </td>
- </tr>
- }
- }
- </tbody>
- </table>
- </div>
- </div>
|