#138 display device flags where appropriate in the UI
This commit is contained in:
@@ -249,7 +249,7 @@
|
||||
var $this = $(this);
|
||||
return $this.children('.details').html();
|
||||
},
|
||||
tooltipClass: 'User_FlagAssignment_Tooltip',
|
||||
tooltipClass: 'FlagAssignment_Tooltip',
|
||||
position: {
|
||||
my: "right top",
|
||||
at: "right bottom",
|
||||
|
||||
@@ -1178,28 +1178,28 @@ WriteLiteral(">\r\n $(functio
|
||||
"(this);\r\n ret" +
|
||||
"urn $this.children(\'.details\').html();\r\n " +
|
||||
" },\r\n " +
|
||||
" tooltipClass: \'User_FlagAssignment_Tooltip\',\r\n " +
|
||||
" position: {\r\n " +
|
||||
" my: \"right top\",\r\n " +
|
||||
" at: \"right bottom\",\r\n " +
|
||||
" collision: \"flipfit fl" +
|
||||
"ip\"\r\n },\r\n " +
|
||||
" hade: {\r\n " +
|
||||
" effect: \'\'\r\n " +
|
||||
" },\r\n " +
|
||||
" close: function (e, ui) {\r\n " +
|
||||
" ui.tooltip.hover(\r\n " +
|
||||
" function () {\r\n " +
|
||||
" $(thi" +
|
||||
"s).stop(true).fadeTo(100, 1);\r\n " +
|
||||
" },\r\n " +
|
||||
" function () {\r\n " +
|
||||
" $(this).fadeOut(100, function () { $(this).remove(" +
|
||||
"); });\r\n " +
|
||||
"});\r\n }\r\n " +
|
||||
" });\r\n " +
|
||||
" });\r\n " +
|
||||
" </script>\r\n </div>\r\n");
|
||||
" tooltipClass: \'FlagAssignment_Tooltip\',\r\n " +
|
||||
" position: {\r\n " +
|
||||
" my: \"right top\",\r\n " +
|
||||
" at: \"right bottom\",\r\n " +
|
||||
" collision: \"flipfit flip\"\r\n" +
|
||||
" },\r\n " +
|
||||
" hade: {\r\n " +
|
||||
" effect: \'\'\r\n " +
|
||||
" },\r\n " +
|
||||
" close: function (e, ui) {\r\n " +
|
||||
" ui.tooltip.hover(\r\n " +
|
||||
" function () {\r\n " +
|
||||
" $(this).st" +
|
||||
"op(true).fadeTo(100, 1);\r\n " +
|
||||
" },\r\n " +
|
||||
" function () {\r\n " +
|
||||
" $(this).fadeOut(100, function () { $(this).remove(); })" +
|
||||
";\r\n });\r\n" +
|
||||
" }\r\n " +
|
||||
" });\r\n " +
|
||||
" });\r\n </s" +
|
||||
"cript>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 274 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
@@ -1707,27 +1707,27 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 25472), Tuple.Create("\"", 25517)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 25467), Tuple.Create("\"", 25512)
|
||||
|
||||
#line 400 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 25480), Tuple.Create<System.Object, System.Int32>(isDecommissioned ? "hidden" : null
|
||||
, Tuple.Create(Tuple.Create("", 25475), Tuple.Create<System.Object, System.Int32>(isDecommissioned ? "hidden" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 25480), false)
|
||||
, 25475), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <label");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 25575), Tuple.Create("\"", 25619)
|
||||
, Tuple.Create(Tuple.Create("", 25583), Tuple.Create("Distribution:", 25583), true)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 25570), Tuple.Create("\"", 25614)
|
||||
, Tuple.Create(Tuple.Create("", 25578), Tuple.Create("Distribution:", 25578), true)
|
||||
|
||||
#line 401 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 25596), Tuple.Create<System.Object, System.Int32>(dp.DistributionType
|
||||
, Tuple.Create(Tuple.Create(" ", 25591), Tuple.Create<System.Object, System.Int32>(dp.DistributionType
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 25597), false)
|
||||
, 25592), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
@@ -1736,14 +1736,14 @@ WriteLiteral(" type=\"radio\"");
|
||||
|
||||
WriteLiteral(" name=\"DeviceProfileId\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 25717), Tuple.Create("\"", 25731)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 25712), Tuple.Create("\"", 25726)
|
||||
|
||||
#line 402 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 25725), Tuple.Create<System.Object, System.Int32>(dp.Id
|
||||
, Tuple.Create(Tuple.Create("", 25720), Tuple.Create<System.Object, System.Int32>(dp.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 25725), false)
|
||||
, 25720), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-ouenforced=\"");
|
||||
@@ -2062,14 +2062,14 @@ WriteLiteral(" title=\"Warranty Valid Until\"");
|
||||
WriteLiteral(">Warranty Until:</span>\r\n </td>\r\n " +
|
||||
" <td");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 33479), Tuple.Create("\"", 33627)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 33474), Tuple.Create("\"", 33622)
|
||||
|
||||
#line 523 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 33487), Tuple.Create<System.Object, System.Int32>(Model.Device.DeviceBatch.WarrantyValidUntil.HasValue && Model.Device.DeviceBatch.WarrantyValidUntil.Value < DateTime.Now ? "alert" : null
|
||||
, Tuple.Create(Tuple.Create("", 33482), Tuple.Create<System.Object, System.Int32>(Model.Device.DeviceBatch.WarrantyValidUntil.HasValue && Model.Device.DeviceBatch.WarrantyValidUntil.Value < DateTime.Now ? "alert" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 33487), false)
|
||||
, 33482), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
@@ -2110,14 +2110,14 @@ WriteLiteral(" title=\"Insured Until\"");
|
||||
WriteLiteral(">Insured Until:</span>\r\n </td>\r\n " +
|
||||
" <td");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 34481), Tuple.Create("\"", 34617)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 34476), Tuple.Create("\"", 34612)
|
||||
|
||||
#line 539 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 34489), Tuple.Create<System.Object, System.Int32>(Model.Device.DeviceBatch.InsuredUntil.HasValue && Model.Device.DeviceBatch.InsuredUntil.Value < DateTime.Now ? "alert" : null
|
||||
, Tuple.Create(Tuple.Create("", 34484), Tuple.Create<System.Object, System.Int32>(Model.Device.DeviceBatch.InsuredUntil.HasValue && Model.Device.DeviceBatch.InsuredUntil.Value < DateTime.Now ? "alert" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 34489), false)
|
||||
, 34484), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
@@ -2208,27 +2208,27 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 35808), Tuple.Create("\"", 35853)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 35803), Tuple.Create("\"", 35848)
|
||||
|
||||
#line 559 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 35816), Tuple.Create<System.Object, System.Int32>(isDecommissioned ? "hidden" : null
|
||||
, Tuple.Create(Tuple.Create("", 35811), Tuple.Create<System.Object, System.Int32>(isDecommissioned ? "hidden" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 35816), false)
|
||||
, 35811), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <label");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 35907), Tuple.Create("\"", 35963)
|
||||
, Tuple.Create(Tuple.Create("", 35915), Tuple.Create("Purchased:", 35915), true)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 35902), Tuple.Create("\"", 35958)
|
||||
, Tuple.Create(Tuple.Create("", 35910), Tuple.Create("Purchased:", 35910), true)
|
||||
|
||||
#line 560 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 35925), Tuple.Create<System.Object, System.Int32>(db.PurchaseDate.ToLongDateString()
|
||||
, Tuple.Create(Tuple.Create(" ", 35920), Tuple.Create<System.Object, System.Int32>(db.PurchaseDate.ToLongDateString()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 35926), false)
|
||||
, 35921), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
@@ -2461,14 +2461,14 @@ WriteLiteral(" id=\"Device_Show_Aspects_Model_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 42170), Tuple.Create("\"", 42280)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 42165), Tuple.Create("\"", 42275)
|
||||
|
||||
#line 658 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 42176), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))
|
||||
, Tuple.Create(Tuple.Create("", 42171), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 42176), false)
|
||||
, 42171), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n <t" +
|
||||
@@ -2756,14 +2756,14 @@ WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"DeviceSerialNumber\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 48128), Tuple.Create("\"", 48162)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 48123), Tuple.Create("\"", 48157)
|
||||
|
||||
#line 761 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 48136), Tuple.Create<System.Object, System.Int32>(Model.Device.SerialNumber
|
||||
, Tuple.Create(Tuple.Create("", 48131), Tuple.Create<System.Object, System.Int32>(Model.Device.SerialNumber
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 48136), false)
|
||||
, 48131), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
@@ -2805,26 +2805,26 @@ WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 48466), Tuple.Create("\"", 48525)
|
||||
, Tuple.Create(Tuple.Create("", 48474), Tuple.Create("fa", 48474), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 48476), Tuple.Create("fa-", 48477), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 48461), Tuple.Create("\"", 48520)
|
||||
, Tuple.Create(Tuple.Create("", 48469), Tuple.Create("fa", 48469), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 48471), Tuple.Create("fa-", 48472), true)
|
||||
|
||||
#line 766 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 48480), Tuple.Create<System.Object, System.Int32>(flag.Icon
|
||||
, Tuple.Create(Tuple.Create("", 48475), Tuple.Create<System.Object, System.Int32>(flag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 48480), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 48492), Tuple.Create("fa-fw", 48493), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 48498), Tuple.Create("fa-lg", 48499), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 48504), Tuple.Create("d-", 48505), true)
|
||||
, 48475), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 48487), Tuple.Create("fa-fw", 48488), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 48493), Tuple.Create("fa-lg", 48494), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 48499), Tuple.Create("d-", 48500), true)
|
||||
|
||||
#line 766 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 48507), Tuple.Create<System.Object, System.Int32>(flag.IconColour
|
||||
, Tuple.Create(Tuple.Create("", 48502), Tuple.Create<System.Object, System.Int32>(flag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 48507), false)
|
||||
, 48502), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>");
|
||||
@@ -3191,28 +3191,28 @@ WriteLiteral(" <li>\r\n
|
||||
|
||||
WriteLiteral(" type=\"radio\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 58686), Tuple.Create("\"", 58764)
|
||||
, Tuple.Create(Tuple.Create("", 58691), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 58691), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 58681), Tuple.Create("\"", 58759)
|
||||
, Tuple.Create(Tuple.Create("", 58686), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 58686), true)
|
||||
|
||||
#line 952 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 58738), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
, Tuple.Create(Tuple.Create("", 58733), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 58738), false)
|
||||
, 58733), false)
|
||||
);
|
||||
|
||||
WriteLiteral("\r\n name=\"Device_Show_Device_Actions_Dec" +
|
||||
"ommission_Reason\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 58863), Tuple.Create("\"", 58897)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 58858), Tuple.Create("\"", 58892)
|
||||
|
||||
#line 953 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 58871), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
, Tuple.Create(Tuple.Create("", 58866), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 58871), false)
|
||||
, 58866), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
@@ -3226,15 +3226,15 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
WriteLiteral(" />\r\n <label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 59041), Tuple.Create("\"", 59120)
|
||||
, Tuple.Create(Tuple.Create("", 59047), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 59047), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 59036), Tuple.Create("\"", 59115)
|
||||
, Tuple.Create(Tuple.Create("", 59042), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 59042), true)
|
||||
|
||||
#line 954 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 59094), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
, Tuple.Create(Tuple.Create("", 59089), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 59094), false)
|
||||
, 59089), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@model Disco.Web.Models.Device.ShowModel
|
||||
@using Disco.Services.Devices.DeviceFlags;
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), string.Format("Device: {0}", Model.Device.SerialNumber));
|
||||
}
|
||||
@@ -11,6 +12,51 @@
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@if (Authorization.Has(Claims.Device.ShowFlagAssignments))
|
||||
{
|
||||
<div id="Device_Show_Flags">
|
||||
@foreach (var flag in Model.Device.DeviceFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, DeviceFlagService.GetDeviceFlag(f.DeviceFlagId))))
|
||||
{
|
||||
<i class="flag fa fa-@(flag.Item2.Icon) fa-fw fa-lg d-@(flag.Item2.IconColour)">
|
||||
<span class="details">
|
||||
<span class="name">@flag.Item2.Name</span>@if (flag.Item1.Comments != null)
|
||||
{<span class="comments">@flag.Item1.Comments.ToHtmlComment()</span>}<span class="added">@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUser)</span>
|
||||
</span>
|
||||
</i>
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#Device_Show_Flags')
|
||||
.appendTo('#layout_PageHeading')
|
||||
.tooltip({
|
||||
items: 'i.flag',
|
||||
content: function () {
|
||||
var $this = $(this);
|
||||
return $this.children('.details').html();
|
||||
},
|
||||
tooltipClass: 'FlagAssignment_Tooltip',
|
||||
position: {
|
||||
my: "right top",
|
||||
at: "right bottom",
|
||||
collision: "flipfit flip"
|
||||
},
|
||||
hade: {
|
||||
effect: ''
|
||||
},
|
||||
close: function (e, ui) {
|
||||
ui.tooltip.hover(
|
||||
function () {
|
||||
$(this).stop(true).fadeTo(100, 1);
|
||||
},
|
||||
function () {
|
||||
$(this).fadeOut(100, function () { $(this).remove(); });
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@Html.Partial(MVC.Device.Views.DeviceParts._Subject, Model)
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
@@ -30,6 +30,12 @@ namespace Disco.Web.Views.Device
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
|
||||
#line 2 "..\..\Views\Device\Show.cshtml"
|
||||
using Disco.Services.Devices.DeviceFlags;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
@@ -44,7 +50,7 @@ namespace Disco.Web.Views.Device
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Device\Show.cshtml"
|
||||
#line 3 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), string.Format("Device: {0}", Model.Device.SerialNumber));
|
||||
|
||||
@@ -61,23 +67,23 @@ WriteLiteral(" id=\"Device_Show_Status\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 246), Tuple.Create("\"", 308)
|
||||
, Tuple.Create(Tuple.Create("", 254), Tuple.Create("fa", 254), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 256), Tuple.Create("fa-square", 257), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 266), Tuple.Create("deviceStatus", 267), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 290), Tuple.Create("\"", 352)
|
||||
, Tuple.Create(Tuple.Create("", 298), Tuple.Create("fa", 298), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 300), Tuple.Create("fa-square", 301), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 310), Tuple.Create("deviceStatus", 311), true)
|
||||
|
||||
#line 7 "..\..\Views\Device\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 279), Tuple.Create<System.Object, System.Int32>(Model.Device.StatusCode()
|
||||
#line 8 "..\..\Views\Device\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 323), Tuple.Create<System.Object, System.Int32>(Model.Device.StatusCode()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 280), false)
|
||||
, 324), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i> ");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Device\Show.cshtml"
|
||||
#line 8 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Model.Device.Status());
|
||||
|
||||
|
||||
@@ -90,10 +96,184 @@ WriteLiteral(" type=\"text/javascript\"");
|
||||
WriteLiteral(">\r\n $(function () {\r\n $(\'#Device_Show_Status\').appendTo" +
|
||||
"(\'#layout_PageHeading\')\r\n });\r\n </script>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 15 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowFlagAssignments))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"Device_Show_Flags\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 18 "..\..\Views\Device\Show.cshtml"
|
||||
foreach (var flag in Model.Device.DeviceFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, DeviceFlagService.GetDeviceFlag(f.DeviceFlagId))))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 907), Tuple.Create("\"", 983)
|
||||
, Tuple.Create(Tuple.Create("", 915), Tuple.Create("flag", 915), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 919), Tuple.Create("fa", 920), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 922), Tuple.Create("fa-", 923), true)
|
||||
|
||||
#line 20 "..\..\Views\Device\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 926), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 926), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 944), Tuple.Create("fa-fw", 945), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 950), Tuple.Create("fa-lg", 951), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 956), Tuple.Create("d-", 957), true)
|
||||
|
||||
#line 20 "..\..\Views\Device\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 959), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 959), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"details\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Device\Show.cshtml"
|
||||
Write(flag.Item2.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Device\Show.cshtml"
|
||||
if (flag.Item1.Comments != null)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Device\Show.cshtml"
|
||||
Write(flag.Item1.Comments.ToHtmlComment());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Device\Show.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" class=\"added\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Device\Show.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUser));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </span>\r\n </i>\r\n");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\Device\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
$('#Device_Show_Flags')
|
||||
.appendTo('#layout_PageHeading')
|
||||
.tooltip({
|
||||
items: 'i.flag',
|
||||
content: function () {
|
||||
var $this = $(this);
|
||||
return $this.children('.details').html();
|
||||
},
|
||||
tooltipClass: 'FlagAssignment_Tooltip',
|
||||
position: {
|
||||
my: ""right top"",
|
||||
at: ""right bottom"",
|
||||
collision: ""flipfit flip""
|
||||
},
|
||||
hade: {
|
||||
effect: ''
|
||||
},
|
||||
close: function (e, ui) {
|
||||
ui.tooltip.hover(
|
||||
function () {
|
||||
$(this).stop(true).fadeTo(100, 1);
|
||||
},
|
||||
function () {
|
||||
$(this).fadeOut(100, function () { $(this).remove(); });
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 59 "..\..\Views\Device\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Device\Show.cshtml"
|
||||
#line 60 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Subject, Model));
|
||||
|
||||
|
||||
@@ -134,13 +314,13 @@ WriteLiteral(" id=\"DeviceDetailTabItems\"");
|
||||
WriteLiteral("></ul>\r\n");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Device\Show.cshtml"
|
||||
#line 96 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 50 "..\..\Views\Device\Show.cshtml"
|
||||
#line 96 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowJobs))
|
||||
{
|
||||
|
||||
@@ -148,14 +328,14 @@ WriteLiteral("></ul>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 52 "..\..\Views\Device\Show.cshtml"
|
||||
#line 98 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Jobs, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 52 "..\..\Views\Device\Show.cshtml"
|
||||
#line 98 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -165,7 +345,7 @@ WriteLiteral("></ul>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\Device\Show.cshtml"
|
||||
#line 100 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowDetails))
|
||||
{
|
||||
|
||||
@@ -173,14 +353,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 56 "..\..\Views\Device\Show.cshtml"
|
||||
#line 102 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Details, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 56 "..\..\Views\Device\Show.cshtml"
|
||||
#line 102 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -190,7 +370,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Device\Show.cshtml"
|
||||
#line 104 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowAssignmentHistory))
|
||||
{
|
||||
|
||||
@@ -198,14 +378,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 60 "..\..\Views\Device\Show.cshtml"
|
||||
#line 106 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._AssignmentHistory, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 60 "..\..\Views\Device\Show.cshtml"
|
||||
#line 106 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -215,7 +395,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\Device\Show.cshtml"
|
||||
#line 108 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowAttachments))
|
||||
{
|
||||
|
||||
@@ -223,14 +403,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 64 "..\..\Views\Device\Show.cshtml"
|
||||
#line 110 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Resources, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 64 "..\..\Views\Device\Show.cshtml"
|
||||
#line 110 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -240,7 +420,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 66 "..\..\Views\Device\Show.cshtml"
|
||||
#line 112 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowFlagAssignments))
|
||||
{
|
||||
|
||||
@@ -248,14 +428,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 68 "..\..\Views\Device\Show.cshtml"
|
||||
#line 114 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Flags, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 68 "..\..\Views\Device\Show.cshtml"
|
||||
#line 114 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -265,7 +445,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 70 "..\..\Views\Device\Show.cshtml"
|
||||
#line 116 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowCertificates))
|
||||
{
|
||||
|
||||
@@ -273,14 +453,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 72 "..\..\Views\Device\Show.cshtml"
|
||||
#line 118 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Certificates, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 72 "..\..\Views\Device\Show.cshtml"
|
||||
#line 118 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@model IEnumerable<Disco.Models.Services.Searching.DeviceSearchResultItem>
|
||||
@using Disco.Services.Devices.DeviceFlags;
|
||||
@{
|
||||
var canShowDevices = Authorization.Has(Claims.Device.Show);
|
||||
var canShowUsers = Authorization.Has(Claims.User.Show);
|
||||
@@ -7,7 +8,7 @@
|
||||
}
|
||||
<div class="genericData deviceTable">
|
||||
@if (Model != null && Model.Count() > 0)
|
||||
{
|
||||
{
|
||||
<table class="genericData deviceTable">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -29,15 +30,32 @@
|
||||
<td>
|
||||
@if (canShowDevices)
|
||||
{@Html.ActionLink(item.Id, MVC.Device.Show(item.Id))}
|
||||
else
|
||||
{@item.Id}
|
||||
else
|
||||
{@item.Id}
|
||||
@if (Authorization.Has(Claims.Device.ShowFlagAssignments))
|
||||
{
|
||||
@if (item.DeviceFlagAssignments != null && item.DeviceFlagAssignments.Count > 0)
|
||||
{
|
||||
<div class="flags">
|
||||
@foreach (var flag in item.DeviceFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, DeviceFlagService.GetDeviceFlag(f.DeviceFlagId))))
|
||||
{
|
||||
<i class="flag fa fa-@(flag.Item2.Icon) fa-fw d-@(flag.Item2.IconColour)">
|
||||
<span class="details">
|
||||
<span class="name">@flag.Item2.Name</span>@if (flag.Item1.Comments != null)
|
||||
{<span class="comments">@flag.Item1.Comments.ToHtmlComment()</span>}<span class="added">@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId)</span>
|
||||
</span>
|
||||
</i>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@item.AssetNumber
|
||||
</td>
|
||||
<td>
|
||||
@if (item.DecommissionedDate.HasValue)
|
||||
{ @CommonHelpers.FriendlyDate(item.DecommissionedDate.Value) }
|
||||
{@CommonHelpers.FriendlyDate(item.DecommissionedDate.Value)}
|
||||
</td>
|
||||
<td>
|
||||
@if (string.IsNullOrWhiteSpace(item.ComputerName))
|
||||
@@ -45,7 +63,7 @@
|
||||
<span class="smallMessage">Unknown</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
@item.ComputerName
|
||||
}
|
||||
</td>
|
||||
@@ -55,8 +73,8 @@
|
||||
<span>@item.DeviceModelDescription</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">Unknown</span>
|
||||
{
|
||||
<span class="smallMessage">Unknown</span>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@@ -68,25 +86,26 @@
|
||||
<span>@item.DeviceBatchName</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">N/A</span>
|
||||
{
|
||||
<span class="smallMessage">N/A</span>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (string.IsNullOrEmpty(item.AssignedUserId))
|
||||
{
|
||||
<span class="smallMessage">N/A</span>
|
||||
<span class="smallMessage">N/A</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@if (canShowUsers)
|
||||
{
|
||||
@Html.ActionLink(item.AssignedUserDescription, MVC.User.Show(item.AssignedUserId))
|
||||
}
|
||||
else
|
||||
{
|
||||
@item.AssignedUserDescription
|
||||
}
|
||||
{
|
||||
<span>
|
||||
@if (canShowUsers)
|
||||
{
|
||||
@Html.ActionLink(item.AssignedUserDescription, MVC.User.Show(item.AssignedUserId))
|
||||
}
|
||||
else
|
||||
{
|
||||
@item.AssignedUserDescription
|
||||
}
|
||||
</span>
|
||||
}
|
||||
</td>
|
||||
@@ -97,9 +116,48 @@
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var userTable = $('table.deviceTable');
|
||||
|
||||
userTable.each(function () {
|
||||
var $this = $(this);
|
||||
|
||||
if (!$this.data('deviceTable_Flags')) {
|
||||
$this.tooltip({
|
||||
items: 'i.flag',
|
||||
content: function () {
|
||||
var $this = $(this);
|
||||
return $this.children('.details').html();
|
||||
},
|
||||
tooltipClass: 'FlagAssignment_Tooltip',
|
||||
position: {
|
||||
my: "right top",
|
||||
at: "right bottom",
|
||||
collision: "flipfit flip"
|
||||
},
|
||||
hade: {
|
||||
effect: ''
|
||||
},
|
||||
close: function (e, ui) {
|
||||
ui.tooltip.hover(
|
||||
function () {
|
||||
$(this).stop(true).fadeTo(100, 1);
|
||||
},
|
||||
function () {
|
||||
$(this).fadeOut(100, function () { $(this).remove(); });
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$this.data('deviceTable_Flags', true)
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
<span class="smallMessage">No Devices Found</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -30,6 +30,12 @@ namespace Disco.Web.Views.Device
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
|
||||
#line 2 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
using Disco.Services.Devices.DeviceFlags;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
@@ -44,7 +50,7 @@ namespace Disco.Web.Views.Device
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 3 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
var canShowDevices = Authorization.Has(Claims.Device.Show);
|
||||
var canShowUsers = Authorization.Has(Claims.User.Show);
|
||||
@@ -61,15 +67,15 @@ WriteLiteral(" class=\"genericData deviceTable\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 10 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 10 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (Model != null && Model.Count() > 0)
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -96,13 +102,13 @@ WriteLiteral(@">Decommissioned</th>
|
||||
");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 27 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 26 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 27 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
foreach (var item in Model)
|
||||
{
|
||||
|
||||
@@ -111,56 +117,203 @@ WriteLiteral(@">Decommissioned</th>
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 981), Tuple.Create("\"", 1058)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1024), Tuple.Create("\"", 1101)
|
||||
|
||||
#line 28 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 989), Tuple.Create<System.Object, System.Int32>(item.DecommissionedDate.HasValue ? "decommissioned" : string.Empty
|
||||
#line 29 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1032), Tuple.Create<System.Object, System.Int32>(item.DecommissionedDate.HasValue ? "decommissioned" : string.Empty
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 989), false)
|
||||
, 1032), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 31 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 30 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 31 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (canShowDevices)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 32 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(Html.ActionLink(item.Id, MVC.Device.Show(item.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 32 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 33 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.Id);
|
||||
#line 34 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 33 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
#line 34 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowFlagAssignments))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 37 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (item.DeviceFlagAssignments != null && item.DeviceFlagAssignments.Count > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"flags\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 40 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
foreach (var flag in item.DeviceFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, DeviceFlagService.GetDeviceFlag(f.DeviceFlagId))))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1953), Tuple.Create("\"", 2023)
|
||||
, Tuple.Create(Tuple.Create("", 1961), Tuple.Create("flag", 1961), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1965), Tuple.Create("fa", 1966), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1968), Tuple.Create("fa-", 1969), true)
|
||||
|
||||
#line 42 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1972), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1972), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1990), Tuple.Create("fa-fw", 1991), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1996), Tuple.Create("d-", 1997), true)
|
||||
|
||||
#line 42 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1999), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1999), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"details\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 44 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(flag.Item2.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 44 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (flag.Item1.Comments != null)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(flag.Item1.Comments.ToHtmlComment());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" class=\"added\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </span>\r\n " +
|
||||
" </i>\r\n");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 50 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -170,7 +323,7 @@ WriteLiteral(" </td>\r\n <td>\r\n"
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 54 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.AssetNumber);
|
||||
|
||||
|
||||
@@ -179,28 +332,28 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 57 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 39 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 57 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (item.DecommissionedDate.HasValue)
|
||||
{
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 40 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.DecommissionedDate.Value));
|
||||
#line 58 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.DecommissionedDate.Value));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 40 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
#line 58 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -208,13 +361,13 @@ WriteLiteral("\r\n </td>\r\n <td>\
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 43 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 61 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 43 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 61 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (string.IsNullOrWhiteSpace(item.ComputerName))
|
||||
{
|
||||
|
||||
@@ -228,23 +381,23 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">Unknown</span>\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 64 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 49 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 67 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.ComputerName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 49 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 67 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -254,13 +407,13 @@ WriteLiteral(">Unknown</span>\r\n");
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 71 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 53 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 71 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (item.DeviceModelDescription != null)
|
||||
{
|
||||
|
||||
@@ -270,7 +423,7 @@ WriteLiteral(" </td>\r\n <td>\r\n"
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 55 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 73 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.DeviceModelDescription);
|
||||
|
||||
|
||||
@@ -279,10 +432,10 @@ WriteLiteral(" <span>");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 74 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -291,10 +444,10 @@ WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">Unknown</span> \r\n");
|
||||
WriteLiteral(">Unknown</span>\r\n");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 78 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -305,7 +458,7 @@ WriteLiteral(" </td>\r\n <td>\r\n"
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 63 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 81 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.DeviceProfileName);
|
||||
|
||||
|
||||
@@ -314,13 +467,13 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 66 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 84 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 66 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 84 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (item.DeviceBatchName != null)
|
||||
{
|
||||
|
||||
@@ -330,7 +483,7 @@ WriteLiteral("\r\n </td>\r\n <td>\
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 68 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 86 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.DeviceBatchName);
|
||||
|
||||
|
||||
@@ -339,38 +492,9 @@ WriteLiteral(" <span>");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 69 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 87 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">N/A</span> \r\n");
|
||||
|
||||
|
||||
#line 73 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 76 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 76 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (string.IsNullOrEmpty(item.AssignedUserId))
|
||||
{
|
||||
|
||||
|
||||
@@ -380,60 +504,7 @@ WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">N/A</span> \r\n");
|
||||
|
||||
|
||||
#line 79 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 82 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (canShowUsers)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 84 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(Html.ActionLink(item.AssignedUserDescription, MVC.User.Show(item.AssignedUserId)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 84 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 88 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.AssignedUserDescription);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 88 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </span>\r\n");
|
||||
WriteLiteral(">N/A</span>\r\n");
|
||||
|
||||
|
||||
#line 91 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
@@ -444,10 +515,98 @@ WriteLiteral(" </span>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 94 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 94 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (string.IsNullOrEmpty(item.AssignedUserId))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">N/A</span>\r\n");
|
||||
|
||||
|
||||
#line 97 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span>\r\n");
|
||||
|
||||
|
||||
#line 101 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 101 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (canShowUsers)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 103 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(Html.ActionLink(item.AssignedUserDescription, MVC.User.Show(item.AssignedUserId)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 103 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 107 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.AssignedUserDescription);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 107 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </span>\r\n");
|
||||
|
||||
|
||||
#line 110 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 94 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 113 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.JobCount);
|
||||
|
||||
|
||||
@@ -456,7 +615,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 97 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 116 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -464,11 +623,56 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n
|
||||
#line hidden
|
||||
WriteLiteral(" </tbody>\r\n </table>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var userTable = $('table.deviceTable');
|
||||
|
||||
userTable.each(function () {
|
||||
var $this = $(this);
|
||||
|
||||
if (!$this.data('deviceTable_Flags')) {
|
||||
$this.tooltip({
|
||||
items: 'i.flag',
|
||||
content: function () {
|
||||
var $this = $(this);
|
||||
return $this.children('.details').html();
|
||||
},
|
||||
tooltipClass: 'FlagAssignment_Tooltip',
|
||||
position: {
|
||||
my: ""right top"",
|
||||
at: ""right bottom"",
|
||||
collision: ""flipfit flip""
|
||||
},
|
||||
hade: {
|
||||
effect: ''
|
||||
},
|
||||
close: function (e, ui) {
|
||||
ui.tooltip.hover(
|
||||
function () {
|
||||
$(this).stop(true).fadeTo(100, 1);
|
||||
},
|
||||
function () {
|
||||
$(this).fadeOut(100, function () { $(this).remove(); });
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$this.data('deviceTable_Flags', true)
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 100 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 158 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -480,7 +684,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Devices Found</span>\r\n");
|
||||
|
||||
|
||||
#line 104 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 162 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user