Files
ZelWiki/TightWiki/Views/Admin/Role.cshtml
2025-01-22 23:31:03 +08:00

44 lines
1.2 KiB
Plaintext

@using TightWiki.Models
@model TightWiki.Models.ViewModels.Admin.RoleViewModel
@{
Layout = "/Views/Shared/_Layout.cshtml";
var sessionState = ViewData["SessionState"] as TightWiki.SessionState ?? throw new Exception("Wiki State Context cannot be null.");
}
<h3>
Role '@Model.Name'.
</h3>
<p>
Role membership.<br /><br />
</p>
@if (!string.IsNullOrEmpty(Model.ErrorMessage))
{
<div class="alert alert-danger">@Html.Raw(Model.ErrorMessage)</div>
}
@if (!string.IsNullOrEmpty(Model.SuccessMessage))
{
<div class="alert alert-success">@Html.Raw(Model.SuccessMessage)</div>
}
@using (Html.BeginForm(null, null, FormMethod.Post, new { action = $"{GlobalConfiguration.BasePath}{Context.Request.Path}" }))
{
@Html.AntiForgeryToken()
<table class="table fixedTable100 table-striped" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<td><strong>Name</strong></td>
</tr>
</thead>
@foreach (var user in Model.Users)
{
<tr>
<td><a href="@GlobalConfiguration.BasePath/Admin/Account/@user.Navigation">@user.AccountName</a></td>
</tr>
}
</table>
}