Files
Disco/Disco.Web/Views/User/_UserTable.cshtml
T
Gary Sharp cd31ba4a6c Feature: Quick Search
Device/Job/User Search refactoring. Quick-Search implemented.
2014-02-06 16:11:45 +11:00

61 lines
1.8 KiB
Plaintext

@model IEnumerable<Disco.Models.Services.Searching.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>