mirror of
https://github.com/Jetsparrow/jetherald.git
synced 2026-01-20 23:56:08 +03:00
Layout users page to use table
This commit is contained in:
parent
c5d4db1c4c
commit
b4d9ada462
@ -1,16 +1,29 @@
|
|||||||
@model AdminUsersModel
|
@model AdminUsersModel
|
||||||
|
|
||||||
<h3>Invites</h3>
|
<h3>users</h3>
|
||||||
<ul class="issues-list">
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Login</th>
|
||||||
|
<th>Role</th>
|
||||||
|
<th>Plan</th>
|
||||||
|
<th>Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
@foreach (var user in Model.Users)
|
@foreach (var user in Model.Users)
|
||||||
{
|
{
|
||||||
<li>
|
<tr>
|
||||||
@user.Name <span class="username">@@@user.Login</span> (
|
<form asp-controller="AdminUsers" asp-action="SetPerms" asp-route-userid="@user.UserId" method="POST"
|
||||||
@if (Context.UserCan("admin.users.setperms"))
|
|
||||||
{
|
|
||||||
<form asp-controller="AdminUsers" asp-action="SetPerms" asp-route-userid="@user.UserId" method="POST"
|
|
||||||
enctype="application/x-www-form-urlencoded" style="display:inline">
|
enctype="application/x-www-form-urlencoded" style="display:inline">
|
||||||
r:<select name="roleId" required class="blueunderline">
|
|
||||||
|
<td>@user.Name </td>
|
||||||
|
<td><span class="username">@@@user.Login</span></td>
|
||||||
|
<td>
|
||||||
|
@if (Context.UserCan("admin.users.setperms"))
|
||||||
|
{
|
||||||
|
@:<select name="roleId" required class="blueunderline">
|
||||||
@foreach (var role in Model.Roles.Values)
|
@foreach (var role in Model.Roles.Values)
|
||||||
{
|
{
|
||||||
if (role.RoleId == user.RoleId)
|
if (role.RoleId == user.RoleId)
|
||||||
@ -22,8 +35,17 @@
|
|||||||
<option value="@role.RoleId">@role.Name</option>
|
<option value="@role.RoleId">@role.Name</option>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</select>,
|
@:</select>
|
||||||
p:<select name="planId" required class="blueunderline">
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@Model.Roles[user.RoleId].Name
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@if (Context.UserCan("admin.users.setperms"))
|
||||||
|
{
|
||||||
|
@:<select name="planId" required class="blueunderline">
|
||||||
@foreach (var plan in Model.Plans.Values)
|
@foreach (var plan in Model.Plans.Values)
|
||||||
{
|
{
|
||||||
if (plan.PlanId == user.PlanId)
|
if (plan.PlanId == user.PlanId)
|
||||||
@ -35,16 +57,23 @@
|
|||||||
<option value="@plan.PlanId">@plan.Name</option>
|
<option value="@plan.PlanId">@plan.Name</option>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</select>
|
@:</select>
|
||||||
<input type="submit" value="Set permissions">
|
}
|
||||||
</form>
|
else
|
||||||
}
|
{
|
||||||
else
|
@Model.Plans[user.PlanId].Name
|
||||||
{
|
}
|
||||||
@: r:@Model.Roles[user.RoleId].Name,
|
</td>
|
||||||
@: p:@Model.Plans[user.PlanId].Name
|
<td>
|
||||||
}
|
@if (Context.UserCan("admin.users.setperms"))
|
||||||
)
|
{
|
||||||
</li>
|
<input type="submit" value="Apply">
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</tr>
|
||||||
|
|
||||||
}
|
}
|
||||||
</ul>
|
</tbody>
|
||||||
|
</table>
|
||||||
Loading…
Reference in New Issue
Block a user