Files
Disco/Disco.Web/Views/User/_UserTable.cshtml
T
Gary Sharp a099d68915 Permissions & Authorization for Users #24
Initial Release; Includes Database and MVC refactoring
2013-10-10 19:13:16 +11:00

61 lines
1.8 KiB
Plaintext

@model IEnumerable<Disco.Models.BI.Search.UserSearchResultItem>
<div class="genericData userTable">
@if (Model != null && Model.Count() > 0)
{
<table class="genericData userTable">
<thead>
<tr>
<th>Id
</th>
<th>Surname
</th>
<th>Given Name
</th>
<th>Display Name
</th>
<th>Assigned Devices
</th>
<th>Jobs
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@if (Authorization.Has(Claims.User.Show))
{
@Html.ActionLink(item.Id, MVC.User.Show(item.Id))
}
else
{
@item.Id
}
</td>
<td>
@item.Surname
</td>
<td>
@item.GivenName
</td>
<td>
@item.DisplayName
</td>
<td>
@item.AssignedDevicesCount
</td>
<td>
@item.JobCount
</td>
</tr>
}
</tbody>
</table>
}
else
{
<span class="smallMessage">No Users Found</span>
}
</div>