yavsc/src/Yavsc.Org/Views/Administration/Role.cshtml
2026-07-04 19:49:48 +01:00

45 lines
1.2 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@model RoleUserCollection
@{ 
ViewBag.Title = "Role"+" "+Model.Name;
}
<h2>@ViewBag.Title</h2>
<p>
<a asp-action="Enroll" asp-route-RoleName="@Model.Name" class="btn btn-primary" >Enroll</a>
</p>
<ul>
<table class="table">
<tr>
<th>
User
</th>
<th>
</th>
</tr>
@foreach (var user in Model.Users) {
<tr>
<td>
@if (user.UserId==User.GetUserId()) {
<span class="badge badge-warning">You</span>
}
@if (SiteSettings.Value.Admin.EMail == user.Email) {
<span class="badge badge-success">Admin</span>
}
@if (SiteSettings.Value.Owner.EMail == user.Email) {
<span class="badge badge-success">Owner</span>
}
@if (!String.IsNullOrWhiteSpace(user.Avatar))
{
<img src="@user.Avatar" alt="avatar" class="user-icon"/>
}
<span> @user.UserName &lt;@(user.Email)&gt; </span>
</td>
<td>
<a asp-action="Fire" asp-route-RoleName="@Model.Name" asp-route-UserId="@user.UserId" class="btn btn-success" >
<img src="~/images/ptcroix.png" /> Fire </a>
</td>
</tr>
}
</table>