Files
Disco/Disco.Web/Areas/Config/Views/DeviceModel/Index.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

53 lines
1.5 KiB
Plaintext

@model Disco.Web.Areas.Config.Models.DeviceModel.IndexModel
@{
Authorization.Require(Claims.Config.DeviceModel.Show);
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models");
}
<table class="tableData">
<tr>
<th>
Name/Description
</th>
<th>
Manufacturer
</th>
<th>
Model
</th>
<th>
Type
</th>
<th>
Device Count
</th>
</tr>
@foreach (var item in Model.DeviceModels)
{
<tr>
<td>
@Html.ActionLink(item.ToString(), MVC.Config.DeviceModel.Index(item.Id))
</td>
<td>
@Html.DisplayFor(modelItem => item.Manufacturer)
</td>
<td>
@Html.DisplayFor(modelItem => item.Model)
</td>
<td>
@Html.DisplayFor(modelItem => item.ModelType)
</td>
<td>
@item.DeviceCount.ToString("n0")
@if (item.DeviceDecommissionedCount > 0)
{
<span class="smallMessage" title="@(item.DeviceDecommissionedCount) Decommissioned">
(@(item.DeviceDecommissionedCount.ToString("n0")))</span>
}
</td>
</tr>
}
</table>
<div class="actionBar">
@Html.ActionLinkButton("Generic Components", MVC.Config.DeviceModel.GenericComponents())
</div>