feature: flag permissions
feature: flag permissions
This commit is contained in:
@@ -1,15 +1,8 @@
|
||||
@model Disco.Web.Models.Device.ShowModel
|
||||
@using Disco.Services.Devices.DeviceFlags;
|
||||
@{
|
||||
Authorization.Require(Claims.Device.ShowFlagAssignments);
|
||||
|
||||
var hasRemove = Authorization.Has(Claims.Device.Actions.RemoveFlags);
|
||||
var hasEdit = Authorization.Has(Claims.Device.Actions.EditFlags);
|
||||
|
||||
var hasDeviceFlagShow = Authorization.Has(Claims.Config.DeviceFlag.Show);
|
||||
var activeAssignmentCount = Model.Device.DeviceFlagAssignments == null ? 0 : Model.Device.DeviceFlagAssignments.Count(a => !a.RemovedDate.HasValue);
|
||||
|
||||
var flagAssignments = Model.Device.DeviceFlagAssignments.Select(a => Tuple.Create(a, DeviceFlagService.GetDeviceFlag(a.DeviceFlagId))).ToList();
|
||||
var flagAssignments = Model.Device.DeviceFlagAssignments.Select(a => Tuple.Create(a, DeviceFlagService.GetDeviceFlag(a.DeviceFlagId))).Where(a => a.Item2.permission.CanShow()).ToList();
|
||||
var activeAssignmentCount = flagAssignments.Count(a => !a.Item1.RemovedDate.HasValue);
|
||||
}
|
||||
<div id="DeviceDetailTab-Flags" class="DevicePart">
|
||||
@if (flagAssignments.Count > 0)
|
||||
@@ -25,14 +18,14 @@
|
||||
{
|
||||
<tr data-deviceflagassignmentid="@fa.Item1.Id" data-flagassignmentaddeddate="@(fa.Item1.AddedDate.ToString("s"))" class="@(!fa.Item1.RemovedDate.HasValue ? "added" : "removed")">
|
||||
<td class="name">
|
||||
<i class="fa fa-@(fa.Item2.Icon) fa-fw fa-lg d-@(fa.Item2.IconColour)"></i>
|
||||
@if (hasDeviceFlagShow)
|
||||
<i class="fa fa-@(fa.Item2.flag.Icon) fa-fw fa-lg d-@(fa.Item2.flag.IconColour)"></i>
|
||||
@if (Authorization.Has(Claims.Config.DeviceFlag.Show))
|
||||
{
|
||||
@Html.ActionLink(fa.Item2.Name, MVC.Config.DeviceFlag.Index(fa.Item2.Id))
|
||||
@Html.ActionLink(fa.Item2.flag.Name, MVC.Config.DeviceFlag.Index(fa.Item2.flag.Id))
|
||||
}
|
||||
else
|
||||
{
|
||||
@fa.Item2.Name
|
||||
@fa.Item2.flag.Name
|
||||
}
|
||||
</td>
|
||||
<td class="added">
|
||||
@@ -43,7 +36,7 @@
|
||||
}
|
||||
</td>
|
||||
<td class="comments">
|
||||
@if (hasEdit)
|
||||
@if (fa.Item2.permission.CanEdit())
|
||||
{
|
||||
<div class="editable"><i class="fa fa-fw fa-edit" title="Edit Comments"></i></div>
|
||||
}
|
||||
@@ -77,6 +70,7 @@
|
||||
<div id="Device_Show_Flags_Actions_Remove_Dialog" class="dialog" title="Remove this flag from the device?">
|
||||
@using (Html.BeginForm(MVC.API.DeviceFlagAssignment.RemoveDevice()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="Device_Show_Flags_Actions_Remove_Dialog_Id" type="hidden" name="id" value="" />
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg"></i> Are you sure?
|
||||
@@ -86,6 +80,7 @@
|
||||
<div id="Device_Show_Flags_Actions_EditComments_Dialog" class="dialog" title="Edit the Comments">
|
||||
@using (Html.BeginForm(MVC.API.DeviceFlagAssignment.UpdateComments()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="Device_Show_Flags_Actions_EditComments_Dialog_Id" type="hidden" name="id" value="" />
|
||||
<input type="hidden" name="redirect" value="true" />
|
||||
<h4>Comments:</h4>
|
||||
|
||||
@@ -52,15 +52,8 @@ namespace Disco.Web.Views.Device.DeviceParts
|
||||
|
||||
#line 3 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Device.ShowFlagAssignments);
|
||||
|
||||
var hasRemove = Authorization.Has(Claims.Device.Actions.RemoveFlags);
|
||||
var hasEdit = Authorization.Has(Claims.Device.Actions.EditFlags);
|
||||
|
||||
var hasDeviceFlagShow = Authorization.Has(Claims.Config.DeviceFlag.Show);
|
||||
var activeAssignmentCount = Model.Device.DeviceFlagAssignments == null ? 0 : Model.Device.DeviceFlagAssignments.Count(a => !a.RemovedDate.HasValue);
|
||||
|
||||
var flagAssignments = Model.Device.DeviceFlagAssignments.Select(a => Tuple.Create(a, DeviceFlagService.GetDeviceFlag(a.DeviceFlagId))).ToList();
|
||||
var flagAssignments = Model.Device.DeviceFlagAssignments.Select(a => Tuple.Create(a, DeviceFlagService.GetDeviceFlag(a.DeviceFlagId))).Where(a => a.Item2.permission.CanShow()).ToList();
|
||||
var activeAssignmentCount = flagAssignments.Count(a => !a.Item1.RemovedDate.HasValue);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -74,13 +67,13 @@ WriteLiteral(" class=\"DevicePart\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 15 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 8 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 8 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
if (flagAssignments.Count > 0)
|
||||
{
|
||||
|
||||
@@ -110,13 +103,13 @@ WriteLiteral(" class=\"removed\"");
|
||||
WriteLiteral(">Removed</th>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 17 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 24 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 17 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
foreach (var fa in flagAssignments.OrderByDescending(a => a.Item1.AddedDate))
|
||||
{
|
||||
|
||||
@@ -128,7 +121,7 @@ WriteLiteral(" <tr");
|
||||
WriteLiteral(" data-deviceflagassignmentid=\"");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 19 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(fa.Item1.Id);
|
||||
|
||||
|
||||
@@ -139,7 +132,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-flagassignmentaddeddate=\"");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 19 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(fa.Item1.AddedDate.ToString("s"));
|
||||
|
||||
|
||||
@@ -147,14 +140,14 @@ WriteLiteral(" data-flagassignmentaddeddate=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1282), Tuple.Create("\"", 1345)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 967), Tuple.Create("\"", 1030)
|
||||
|
||||
#line 26 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1290), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? "added" : "removed"
|
||||
#line 19 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 975), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? "added" : "removed"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1290), false)
|
||||
, 975), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <td");
|
||||
@@ -163,54 +156,54 @@ WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1414), Tuple.Create("\"", 1481)
|
||||
, Tuple.Create(Tuple.Create("", 1422), Tuple.Create("fa", 1422), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1424), Tuple.Create("fa-", 1425), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1099), Tuple.Create("\"", 1176)
|
||||
, Tuple.Create(Tuple.Create("", 1107), Tuple.Create("fa", 1107), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1109), Tuple.Create("fa-", 1110), true)
|
||||
|
||||
#line 28 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1428), Tuple.Create<System.Object, System.Int32>(fa.Item2.Icon
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1113), Tuple.Create<System.Object, System.Int32>(fa.Item2.flag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1428), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1444), Tuple.Create("fa-fw", 1445), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1450), Tuple.Create("fa-lg", 1451), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1456), Tuple.Create("d-", 1457), true)
|
||||
, 1113), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1134), Tuple.Create("fa-fw", 1135), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1140), Tuple.Create("fa-lg", 1141), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1146), Tuple.Create("d-", 1147), true)
|
||||
|
||||
#line 28 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1459), Tuple.Create<System.Object, System.Int32>(fa.Item2.IconColour
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1149), Tuple.Create<System.Object, System.Int32>(fa.Item2.flag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1459), false)
|
||||
, 1149), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 22 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 29 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
if (hasDeviceFlagShow)
|
||||
#line 22 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
if (Authorization.Has(Claims.Config.DeviceFlag.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(Html.ActionLink(fa.Item2.Name, MVC.Config.DeviceFlag.Index(fa.Item2.Id)));
|
||||
#line 24 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(Html.ActionLink(fa.Item2.flag.Name, MVC.Config.DeviceFlag.Index(fa.Item2.flag.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
#line 24 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -219,15 +212,15 @@ WriteLiteral("></i>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(fa.Item2.Name);
|
||||
#line 28 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(fa.Item2.flag.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
#line 28 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -242,7 +235,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 32 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(fa.Item1.AddedDate, fa.Item1.AddedUser));
|
||||
|
||||
|
||||
@@ -251,13 +244,13 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 33 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 40 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 33 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
if (fa.Item1.OnAssignmentExpressionResult != null)
|
||||
{
|
||||
|
||||
@@ -271,7 +264,7 @@ WriteLiteral(" class=\"expressionResult\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(fa.Item1.OnAssignmentExpressionResult);
|
||||
|
||||
|
||||
@@ -280,7 +273,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 43 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 36 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -293,14 +286,14 @@ WriteLiteral(" class=\"comments\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 39 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 46 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
if (hasEdit)
|
||||
#line 39 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
if (fa.Item2.permission.CanEdit())
|
||||
{
|
||||
|
||||
|
||||
@@ -319,7 +312,7 @@ WriteLiteral(" title=\"Edit Comments\"");
|
||||
WriteLiteral("></i></div>\r\n");
|
||||
|
||||
|
||||
#line 49 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 42 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -328,7 +321,7 @@ WriteLiteral("></i></div>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 43 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
if (fa.Item1.Comments == null)
|
||||
{
|
||||
|
||||
@@ -342,7 +335,7 @@ WriteLiteral(" class=\"comments smallMessage\"");
|
||||
WriteLiteral(">[no comments]</div>\r\n");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 46 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -357,7 +350,7 @@ WriteLiteral(" class=\"comments\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 49 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(fa.Item1.Comments.ToHtmlComment());
|
||||
|
||||
|
||||
@@ -372,7 +365,7 @@ WriteLiteral(" class=\"commentsRaw\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 57 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 50 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(fa.Item1.Comments);
|
||||
|
||||
|
||||
@@ -381,7 +374,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 51 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -389,27 +382,27 @@ WriteLiteral("</div>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3000), Tuple.Create("\"", 3063)
|
||||
, Tuple.Create(Tuple.Create("", 3008), Tuple.Create("removed", 3008), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2763), Tuple.Create("\"", 2826)
|
||||
, Tuple.Create(Tuple.Create("", 2771), Tuple.Create("removed", 2771), true)
|
||||
|
||||
#line 60 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3015), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? " na" : null
|
||||
#line 53 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2778), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? " na" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3015), false)
|
||||
, 2778), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 61 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 54 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 61 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 54 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
if (fa.Item1.RemovedDate.HasValue)
|
||||
{
|
||||
|
||||
@@ -417,14 +410,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 63 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 56 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(fa.Item1.RemovedDate.Value, fa.Item1.RemovedUser));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 63 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 56 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
if (fa.Item1.OnUnassignmentExpressionResult != null)
|
||||
{
|
||||
@@ -439,7 +432,7 @@ WriteLiteral(" class=\"expressionResult\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 66 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 59 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(fa.Item1.OnUnassignmentExpressionResult);
|
||||
|
||||
|
||||
@@ -448,7 +441,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 60 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
}
|
||||
else if (fa.Item1.CanRemove())
|
||||
@@ -466,7 +459,7 @@ WriteLiteral(" class=\"button small remove\"");
|
||||
WriteLiteral(">Remove</a>\r\n");
|
||||
|
||||
|
||||
#line 72 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 65 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -475,7 +468,7 @@ WriteLiteral(">Remove</a>\r\n");
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 75 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 68 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -494,15 +487,29 @@ WriteLiteral(" title=\"Remove this flag from the device?\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 71 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 78 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 71 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
using (Html.BeginForm(MVC.API.DeviceFlagAssignment.RemoveDevice()))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
@@ -526,7 +533,7 @@ WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
||||
WriteLiteral("></i> Are you sure?\r\n </p>\r\n");
|
||||
|
||||
|
||||
#line 84 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 78 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -545,15 +552,29 @@ WriteLiteral(" title=\"Edit the Comments\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 87 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 81 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 87 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 81 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
using (Html.BeginForm(MVC.API.DeviceFlagAssignment.UpdateComments()))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 83 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 83 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
@@ -593,7 +614,7 @@ WriteLiteral(" class=\"block\"");
|
||||
WriteLiteral("></textarea>\r\n </p>\r\n");
|
||||
|
||||
|
||||
#line 95 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 90 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -651,7 +672,7 @@ WriteLiteral(">\r\n $(function () {\r\n var deviceFlag
|
||||
"eturn false;\r\n });\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 174 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 169 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -666,7 +687,7 @@ WriteLiteral(" class=\"none\"");
|
||||
WriteLiteral(">This device has no associated flags</div>\r\n");
|
||||
|
||||
|
||||
#line 178 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 173 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -676,7 +697,7 @@ WriteLiteral(" <script>\r\n $(\'#DeviceDetailTabItems\').append(\'<li>
|
||||
"ilTab-Flags\">Flags [");
|
||||
|
||||
|
||||
#line 180 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 175 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(activeAssignmentCount);
|
||||
|
||||
|
||||
|
||||
@@ -239,17 +239,20 @@
|
||||
<div id="Device_Show_User_EmailAddress" title="Email Address"><a href="mailto:@(Model.Device.AssignedUser.EmailAddress)" data-clipboard="@assignedUser.DisplayName <@assignedUser.EmailAddress>">@assignedUser.EmailAddress</a></div>
|
||||
}
|
||||
}
|
||||
@if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
@if (assignedUser.UserFlagAssignments.CanShowAny())
|
||||
{
|
||||
<div id="Device_Show_User_Flags">
|
||||
@foreach (var flag in assignedUser.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
{
|
||||
<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>
|
||||
if (flag.Item2.permission.CanShow())
|
||||
{
|
||||
<i class="flag fa fa-@(flag.Item2.flag.Icon) fa-fw d-@(flag.Item2.flag.IconColour)">
|
||||
<span class="details">
|
||||
<span class="name">@flag.Item2.flag.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>
|
||||
}
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
@@ -765,12 +768,13 @@
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@if (Model.Device.CanAddDeviceFlags() && Model.AvailableDeviceFlags != null && Model.AvailableDeviceFlags.Count > 0)
|
||||
@if (Model.AvailableDeviceFlags != null && Model.AvailableDeviceFlags.Count > 0)
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Add Flag", MVC.API.DeviceFlagAssignment.AddDevice(), "Device_Show_Details_Actions_AddFlag_Button")
|
||||
<button id="Device_Show_Details_Actions_AddFlag_Button" type="button" class="button small">Add Flag</button>
|
||||
<div id="Device_Show_Details_Actions_AddFlag_Dialog" class="dialog" title="Add Device Flag">
|
||||
@using (Html.BeginForm(MVC.API.DeviceFlagAssignment.AddDevice()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="Device_Show_Details_Actions_AddFlag_Dialog_Id" type="hidden" name="id" />
|
||||
<input id="Device_Show_Details_Actions_AddFlag_Dialog_DeviceSerialNumber" type="hidden" name="DeviceSerialNumber" value="@Model.Device.SerialNumber" />
|
||||
<div class="flagPicker">
|
||||
@@ -794,7 +798,6 @@
|
||||
$(function () {
|
||||
const button = $('#Device_Show_Details_Actions_AddFlag_Button');
|
||||
let buttonDialog = null;
|
||||
const buttonLink = button.attr('href');
|
||||
|
||||
let flagPicker = null;
|
||||
let flagAddId = null;
|
||||
@@ -814,9 +817,7 @@
|
||||
flagAddComments.focus().select();
|
||||
}
|
||||
|
||||
button.attr('href', '#').click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
button.click(function (e) {
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Device_Show_Details_Actions_AddFlag_Dialog');
|
||||
buttonDialog.dialog({
|
||||
@@ -831,10 +832,9 @@
|
||||
},
|
||||
"Add Flag": function () {
|
||||
if (!!flagAddId.val()) {
|
||||
const $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
buttonDialog.find('form').submit();
|
||||
buttonDialog
|
||||
.dialog("option", "buttons", null)
|
||||
.find('form').submit();
|
||||
} else {
|
||||
alert('Select a Device Flag');
|
||||
}
|
||||
@@ -868,7 +868,6 @@
|
||||
|
||||
$('#Device_Show_Details_Actions_AddFlag_Dialog_Filter').val('');
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -19,17 +19,20 @@
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@if (Authorization.Has(Claims.Device.ShowFlagAssignments))
|
||||
@if (Model.Device.DeviceFlagAssignments.CanShowAny())
|
||||
{
|
||||
<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>
|
||||
if (flag.Item2.permission.CanShow())
|
||||
{
|
||||
<i class="flag fa fa-@(flag.Item2.flag.Icon) fa-fw fa-lg d-@(flag.Item2.flag.IconColour)">
|
||||
<span class="details">
|
||||
<span class="name">@flag.Item2.flag.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">
|
||||
@@ -116,7 +119,7 @@
|
||||
{
|
||||
@Html.Partial(MVC.Device.Views.DeviceParts._Resources, Model)
|
||||
}
|
||||
@if (Authorization.Has(Claims.Device.ShowFlagAssignments))
|
||||
@if (Authorization.Has(Claims.Device.ShowFlagAssignments) || Model.Device.DeviceFlagAssignments.CanShowAny())
|
||||
{
|
||||
@Html.Partial(MVC.Device.Views.DeviceParts._Flags, Model)
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ WriteLiteral(">\r\n $(function () {\r\n $(\'#Device_Sh
|
||||
#line hidden
|
||||
|
||||
#line 22 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowFlagAssignments))
|
||||
if (Model.Device.DeviceFlagAssignments.CanShowAny())
|
||||
{
|
||||
|
||||
|
||||
@@ -144,48 +144,50 @@ WriteLiteral(">\r\n");
|
||||
#line 25 "..\..\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))))
|
||||
{
|
||||
if (flag.Item2.permission.CanShow())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1178), Tuple.Create("\"", 1254)
|
||||
, Tuple.Create(Tuple.Create("", 1186), Tuple.Create("flag", 1186), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1190), Tuple.Create("fa", 1191), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1193), Tuple.Create("fa-", 1194), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1250), Tuple.Create("\"", 1336)
|
||||
, Tuple.Create(Tuple.Create("", 1258), Tuple.Create("flag", 1258), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1262), Tuple.Create("fa", 1263), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1265), Tuple.Create("fa-", 1266), true)
|
||||
|
||||
#line 27 "..\..\Views\Device\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1197), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
|
||||
#line 29 "..\..\Views\Device\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1269), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1197), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1215), Tuple.Create("fa-fw", 1216), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1221), Tuple.Create("fa-lg", 1222), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1227), Tuple.Create("d-", 1228), true)
|
||||
, 1269), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1292), Tuple.Create("fa-fw", 1293), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1298), Tuple.Create("fa-lg", 1299), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1304), Tuple.Create("d-", 1305), true)
|
||||
|
||||
#line 27 "..\..\Views\Device\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1230), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
|
||||
#line 29 "..\..\Views\Device\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1307), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1230), false)
|
||||
, 1307), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"details\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Device\Show.cshtml"
|
||||
Write(flag.Item2.Name);
|
||||
#line 31 "..\..\Views\Device\Show.cshtml"
|
||||
Write(flag.Item2.flag.Name);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -193,9 +195,9 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Device\Show.cshtml"
|
||||
if (flag.Item1.Comments != null)
|
||||
{
|
||||
#line 31 "..\..\Views\Device\Show.cshtml"
|
||||
if (flag.Item1.Comments != null)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -206,8 +208,8 @@ WriteLiteral(" class=\"comments\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Device\Show.cshtml"
|
||||
Write(flag.Item1.Comments.ToHtmlComment());
|
||||
#line 32 "..\..\Views\Device\Show.cshtml"
|
||||
Write(flag.Item1.Comments.ToHtmlComment());
|
||||
|
||||
|
||||
#line default
|
||||
@@ -215,8 +217,8 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Device\Show.cshtml"
|
||||
}
|
||||
#line 32 "..\..\Views\Device\Show.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -227,16 +229,17 @@ WriteLiteral(" class=\"added\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Device\Show.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUser));
|
||||
#line 32 "..\..\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");
|
||||
WriteLiteral("</span>\r\n </span>\r\n </i>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Views\Device\Show.cshtml"
|
||||
#line 35 "..\..\Views\Device\Show.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -282,7 +285,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 66 "..\..\Views\Device\Show.cshtml"
|
||||
#line 69 "..\..\Views\Device\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -291,7 +294,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\Device\Show.cshtml"
|
||||
#line 70 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Subject, Model));
|
||||
|
||||
|
||||
@@ -332,13 +335,13 @@ WriteLiteral(" id=\"DeviceDetailTabItems\"");
|
||||
WriteLiteral("></ul>\r\n");
|
||||
|
||||
|
||||
#line 103 "..\..\Views\Device\Show.cshtml"
|
||||
#line 106 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 103 "..\..\Views\Device\Show.cshtml"
|
||||
#line 106 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.HasAny(Claims.Device.ShowComments, Claims.Device.ShowJobs))
|
||||
{
|
||||
|
||||
@@ -346,14 +349,14 @@ WriteLiteral("></ul>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 105 "..\..\Views\Device\Show.cshtml"
|
||||
#line 108 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._CommentsAndJobs, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 105 "..\..\Views\Device\Show.cshtml"
|
||||
#line 108 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -363,7 +366,7 @@ WriteLiteral("></ul>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 107 "..\..\Views\Device\Show.cshtml"
|
||||
#line 110 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowDetails))
|
||||
{
|
||||
|
||||
@@ -371,14 +374,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 109 "..\..\Views\Device\Show.cshtml"
|
||||
#line 112 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Details, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 109 "..\..\Views\Device\Show.cshtml"
|
||||
#line 112 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -388,7 +391,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 111 "..\..\Views\Device\Show.cshtml"
|
||||
#line 114 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowAssignmentHistory))
|
||||
{
|
||||
|
||||
@@ -396,14 +399,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 113 "..\..\Views\Device\Show.cshtml"
|
||||
#line 116 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._AssignmentHistory, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 113 "..\..\Views\Device\Show.cshtml"
|
||||
#line 116 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -413,7 +416,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 115 "..\..\Views\Device\Show.cshtml"
|
||||
#line 118 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowAttachments))
|
||||
{
|
||||
|
||||
@@ -421,14 +424,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 117 "..\..\Views\Device\Show.cshtml"
|
||||
#line 120 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Resources, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 117 "..\..\Views\Device\Show.cshtml"
|
||||
#line 120 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -438,22 +441,22 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 119 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowFlagAssignments))
|
||||
#line 122 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowFlagAssignments) || Model.Device.DeviceFlagAssignments.CanShowAny())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 121 "..\..\Views\Device\Show.cshtml"
|
||||
#line 124 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Flags, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 121 "..\..\Views\Device\Show.cshtml"
|
||||
#line 124 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -463,7 +466,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 123 "..\..\Views\Device\Show.cshtml"
|
||||
#line 126 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowCertificates))
|
||||
{
|
||||
|
||||
@@ -471,14 +474,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 125 "..\..\Views\Device\Show.cshtml"
|
||||
#line 128 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Certificates, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 125 "..\..\Views\Device\Show.cshtml"
|
||||
#line 128 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -488,13 +491,13 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 128 "..\..\Views\Device\Show.cshtml"
|
||||
#line 131 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 128 "..\..\Views\Device\Show.cshtml"
|
||||
#line 131 "..\..\Views\Device\Show.cshtml"
|
||||
if (requiresLive)
|
||||
{
|
||||
|
||||
@@ -550,7 +553,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
||||
" </script>\r\n");
|
||||
|
||||
|
||||
#line 197 "..\..\Views\Device\Show.cshtml"
|
||||
#line 200 "..\..\Views\Device\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -32,22 +32,22 @@
|
||||
{@Html.ActionLink(item.Id, MVC.Device.Show(item.Id))}
|
||||
else
|
||||
{@item.Id}
|
||||
@if (Authorization.Has(Claims.Device.ShowFlagAssignments))
|
||||
@if (item.DeviceFlagAssignments.CanShowAny())
|
||||
{
|
||||
@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))))
|
||||
<div class="flags">
|
||||
@foreach (var flag in item.DeviceFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, DeviceFlagService.GetDeviceFlag(f.DeviceFlagId))))
|
||||
{
|
||||
@if (flag.Item2.permission.CanShow())
|
||||
{
|
||||
<i class="flag fa fa-@(flag.Item2.Icon) fa-fw d-@(flag.Item2.IconColour)">
|
||||
<i class="flag fa fa-@(flag.Item2.flag.Icon) fa-fw d-@(flag.Item2.flag.IconColour)">
|
||||
<span class="details">
|
||||
<span class="name">@flag.Item2.Name</span>@if (flag.Item1.Comments != null)
|
||||
<span class="name">@flag.Item2.flag.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>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@@ -117,43 +117,43 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var userTable = $('table.deviceTable');
|
||||
$(function () {
|
||||
var userTable = $('table.deviceTable');
|
||||
|
||||
userTable.each(function () {
|
||||
var $this = $(this);
|
||||
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);
|
||||
if (!$this.data('deviceTable_Flags')) {
|
||||
$this.tooltip({
|
||||
items: 'i.flag',
|
||||
content: function () {
|
||||
var $this = $(this);
|
||||
return $this.children('.details').html();
|
||||
},
|
||||
function () {
|
||||
$(this).fadeOut(100, function () { $(this).remove(); });
|
||||
});
|
||||
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)
|
||||
}
|
||||
});
|
||||
|
||||
$this.data('deviceTable_Flags', true)
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
|
||||
@@ -175,35 +175,35 @@ WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowFlagAssignments))
|
||||
if (item.DeviceFlagAssignments.CanShowAny())
|
||||
{
|
||||
|
||||
|
||||
#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(" <div");
|
||||
|
||||
WriteLiteral(" class=\"flags\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 38 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 38 "..\..\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
|
||||
|
||||
#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))))
|
||||
if (flag.Item2.permission.CanShow())
|
||||
{
|
||||
|
||||
|
||||
@@ -211,26 +211,26 @@ WriteLiteral(">\r\n");
|
||||
#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)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1901), Tuple.Create("\"", 1981)
|
||||
, Tuple.Create(Tuple.Create("", 1909), Tuple.Create("flag", 1909), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1913), Tuple.Create("fa", 1914), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1916), Tuple.Create("fa-", 1917), true)
|
||||
|
||||
#line 42 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1972), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
|
||||
, Tuple.Create(Tuple.Create("", 1920), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.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)
|
||||
, 1920), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1943), Tuple.Create("fa-fw", 1944), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1949), Tuple.Create("d-", 1950), true)
|
||||
|
||||
#line 42 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1999), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
|
||||
, Tuple.Create(Tuple.Create("", 1952), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1999), false)
|
||||
, 1952), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
@@ -245,7 +245,7 @@ WriteLiteral(">");
|
||||
|
||||
|
||||
#line 44 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(flag.Item2.Name);
|
||||
Write(flag.Item2.flag.Name);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -254,7 +254,7 @@ WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 44 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (flag.Item1.Comments != null)
|
||||
if (flag.Item1.Comments != null)
|
||||
{
|
||||
|
||||
#line default
|
||||
@@ -302,17 +302,18 @@ WriteLiteral("</span>\r\n </span>
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
#line 48 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
#line 51 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -627,46 +628,27 @@ 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>
|
||||
");
|
||||
WriteLiteral(">\r\n $(function () {\r\n var userTable = $(\'table.deviceTa" +
|
||||
"ble\');\r\n\r\n userTable.each(function () {\r\n var " +
|
||||
"$this = $(this);\r\n\r\n if (!$this.data(\'deviceTable_Flags\')) {\r" +
|
||||
"\n $this.tooltip({\r\n items: \'i." +
|
||||
"flag\',\r\n content: function () {\r\n " +
|
||||
" var $this = $(this);\r\n return $this.c" +
|
||||
"hildren(\'.details\').html();\r\n },\r\n " +
|
||||
" tooltipClass: \'FlagAssignment_Tooltip\',\r\n po" +
|
||||
"sition: {\r\n my: \"right top\",\r\n " +
|
||||
" at: \"right bottom\",\r\n collision: \"fl" +
|
||||
"ipfit 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).stop(true).fadeTo(100, 1);\r\n " +
|
||||
" },\r\n function () {" +
|
||||
"\r\n $(this).fadeOut(100, function () { $(t" +
|
||||
"his).remove(); });\r\n });\r\n " +
|
||||
" }\r\n });\r\n\r\n $this.data(\'d" +
|
||||
"eviceTable_Flags\', true)\r\n }\r\n });\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 158 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
@@ -256,19 +256,20 @@
|
||||
</div>
|
||||
}
|
||||
}
|
||||
@if (Authorization.Has(Claims.Device.ShowFlagAssignments) &&
|
||||
Model.Job.Device.DeviceFlagAssignments != null &&
|
||||
Model.Job.Device.DeviceFlagAssignments.Any(a => !a.RemovedDate.HasValue))
|
||||
@if (Model.Job.Device.DeviceFlagAssignments.CanShowAny())
|
||||
{
|
||||
<div id="Job_Show_Device_Flags">
|
||||
@foreach (var flag in Model.Job.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 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>
|
||||
if (flag.Item2.permission.CanShow())
|
||||
{
|
||||
<i class="flag fa fa-@(flag.Item2.flag.Icon) fa-fw d-@(flag.Item2.flag.IconColour)">
|
||||
<span class="details">
|
||||
<span class="name">@flag.Item2.flag.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>
|
||||
}
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
@@ -506,17 +507,20 @@
|
||||
if (!string.IsNullOrWhiteSpace(Model.Job.User.EmailAddress))
|
||||
{<div id="Job_Show_User_EmailAddress" title="Email Address">Email: <a href="mailto:@(Model.Job.User.EmailAddress)" data-clipboard="@Model.Job.User.DisplayName <@Model.Job.User.EmailAddress>">@Model.Job.User.EmailAddress</a></div>}
|
||||
}
|
||||
@if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
@if (Model.Job.User.UserFlagAssignments.CanShowAny())
|
||||
{
|
||||
<div id="Job_Show_User_Flags">
|
||||
@foreach (var flag in Model.Job.User.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
{
|
||||
<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>
|
||||
if (flag.Item2.permission.CanShow())
|
||||
{
|
||||
<i class="flag fa fa-@(flag.Item2.flag.Icon) fa-fw d-@(flag.Item2.flag.IconColour)">
|
||||
<span class="details">
|
||||
<span class="name">@flag.Item2.flag.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>
|
||||
}
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,17 +13,20 @@
|
||||
}
|
||||
}
|
||||
<div id="User_Show" data-userid="@Model.User.UserId">
|
||||
@if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
@if (Model.User.UserFlagAssignments.CanShowAny())
|
||||
{
|
||||
<div id="User_Show_Flags">
|
||||
@foreach (var flag in Model.User.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
{
|
||||
<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>
|
||||
if (flag.Item2.permission.CanShow())
|
||||
{
|
||||
<i class="flag fa fa-@(flag.Item2.flag.Icon) fa-fw fa-lg d-@(flag.Item2.flag.IconColour)">
|
||||
<span class="details">
|
||||
<span class="name">@flag.Item2.flag.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">
|
||||
@@ -106,7 +109,7 @@
|
||||
{
|
||||
@Html.Partial(MVC.User.Views.UserParts._Resources, Model)
|
||||
}
|
||||
@if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
@if (Authorization.Has(Claims.User.ShowFlagAssignments) || Model.User.UserFlagAssignments.CanShowAny())
|
||||
{
|
||||
@Html.Partial(MVC.User.Views.UserParts._Flags, Model)
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 16 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
if (Model.User.UserFlagAssignments.CanShowAny())
|
||||
{
|
||||
|
||||
|
||||
@@ -113,48 +113,50 @@ WriteLiteral(">\r\n");
|
||||
#line 19 "..\..\Views\User\Show.cshtml"
|
||||
foreach (var flag in Model.User.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
{
|
||||
if (flag.Item2.permission.CanShow())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 867), Tuple.Create("\"", 943)
|
||||
, Tuple.Create(Tuple.Create("", 875), Tuple.Create("flag", 875), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 879), Tuple.Create("fa", 880), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 882), Tuple.Create("fa-", 883), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 937), Tuple.Create("\"", 1023)
|
||||
, Tuple.Create(Tuple.Create("", 945), Tuple.Create("flag", 945), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 949), Tuple.Create("fa", 950), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 952), Tuple.Create("fa-", 953), true)
|
||||
|
||||
#line 21 "..\..\Views\User\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 886), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
|
||||
#line 23 "..\..\Views\User\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 956), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 886), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 904), Tuple.Create("fa-fw", 905), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 910), Tuple.Create("fa-lg", 911), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 916), Tuple.Create("d-", 917), true)
|
||||
, 956), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 979), Tuple.Create("fa-fw", 980), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 985), Tuple.Create("fa-lg", 986), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 991), Tuple.Create("d-", 992), true)
|
||||
|
||||
#line 21 "..\..\Views\User\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 919), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
|
||||
#line 23 "..\..\Views\User\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 994), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 919), false)
|
||||
, 994), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"details\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\User\Show.cshtml"
|
||||
Write(flag.Item2.Name);
|
||||
#line 25 "..\..\Views\User\Show.cshtml"
|
||||
Write(flag.Item2.flag.Name);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -162,9 +164,9 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\User\Show.cshtml"
|
||||
if (flag.Item1.Comments != null)
|
||||
{
|
||||
#line 25 "..\..\Views\User\Show.cshtml"
|
||||
if (flag.Item1.Comments != null)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -175,8 +177,8 @@ WriteLiteral(" class=\"comments\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\User\Show.cshtml"
|
||||
Write(flag.Item1.Comments.ToHtmlComment());
|
||||
#line 26 "..\..\Views\User\Show.cshtml"
|
||||
Write(flag.Item1.Comments.ToHtmlComment());
|
||||
|
||||
|
||||
#line default
|
||||
@@ -184,8 +186,8 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\User\Show.cshtml"
|
||||
}
|
||||
#line 26 "..\..\Views\User\Show.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -196,16 +198,17 @@ WriteLiteral(" class=\"added\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\User\Show.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUser));
|
||||
#line 26 "..\..\Views\User\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");
|
||||
WriteLiteral("</span>\r\n </span>\r\n </i>\r\n");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\User\Show.cshtml"
|
||||
#line 29 "..\..\Views\User\Show.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -251,7 +254,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\User\Show.cshtml"
|
||||
#line 63 "..\..\Views\User\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -260,7 +263,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 61 "..\..\Views\User\Show.cshtml"
|
||||
#line 64 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._Subject, Model));
|
||||
|
||||
|
||||
@@ -300,13 +303,13 @@ WriteLiteral(" id=\"UserDetailTabItems\"");
|
||||
WriteLiteral("></ul>\r\n");
|
||||
|
||||
|
||||
#line 97 "..\..\Views\User\Show.cshtml"
|
||||
#line 100 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 97 "..\..\Views\User\Show.cshtml"
|
||||
#line 100 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.HasAny(Claims.User.ShowComments, Claims.User.ShowJobs))
|
||||
{
|
||||
|
||||
@@ -314,14 +317,14 @@ WriteLiteral("></ul>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 99 "..\..\Views\User\Show.cshtml"
|
||||
#line 102 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._CommentsAndJobs, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 99 "..\..\Views\User\Show.cshtml"
|
||||
#line 102 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -331,7 +334,7 @@ WriteLiteral("></ul>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 101 "..\..\Views\User\Show.cshtml"
|
||||
#line 104 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowAssignmentHistory))
|
||||
{
|
||||
|
||||
@@ -339,14 +342,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 103 "..\..\Views\User\Show.cshtml"
|
||||
#line 106 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._AssignmentHistory, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 103 "..\..\Views\User\Show.cshtml"
|
||||
#line 106 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -356,7 +359,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 105 "..\..\Views\User\Show.cshtml"
|
||||
#line 108 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowAttachments))
|
||||
{
|
||||
|
||||
@@ -364,14 +367,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 107 "..\..\Views\User\Show.cshtml"
|
||||
#line 110 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._Resources, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 107 "..\..\Views\User\Show.cshtml"
|
||||
#line 110 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -381,22 +384,22 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 109 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
#line 112 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowFlagAssignments) || Model.User.UserFlagAssignments.CanShowAny())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 111 "..\..\Views\User\Show.cshtml"
|
||||
#line 114 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._Flags, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 111 "..\..\Views\User\Show.cshtml"
|
||||
#line 114 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -406,7 +409,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 113 "..\..\Views\User\Show.cshtml"
|
||||
#line 116 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowAuthorization))
|
||||
{
|
||||
|
||||
@@ -414,14 +417,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 115 "..\..\Views\User\Show.cshtml"
|
||||
#line 118 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._Authorization, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 115 "..\..\Views\User\Show.cshtml"
|
||||
#line 118 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -431,13 +434,13 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 118 "..\..\Views\User\Show.cshtml"
|
||||
#line 121 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 118 "..\..\Views\User\Show.cshtml"
|
||||
#line 121 "..\..\Views\User\Show.cshtml"
|
||||
if (requiresLive)
|
||||
{
|
||||
|
||||
@@ -492,7 +495,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
||||
" });\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 187 "..\..\Views\User\Show.cshtml"
|
||||
#line 190 "..\..\Views\User\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
@model Disco.Web.Models.User.ShowModel
|
||||
@using Disco.Services.Users.UserFlags;
|
||||
@{
|
||||
Authorization.Require(Claims.User.ShowFlagAssignments);
|
||||
|
||||
var hasRemove = Authorization.Has(Claims.User.Actions.RemoveFlags);
|
||||
var hasEdit = Authorization.Has(Claims.User.Actions.EditFlags);
|
||||
|
||||
var hasUserFlagShow = Authorization.Has(Claims.Config.UserFlag.Show);
|
||||
var activeAssignmentCount = Model.User.UserFlagAssignments == null ? 0 : Model.User.UserFlagAssignments.Count(a => !a.RemovedDate.HasValue);
|
||||
|
||||
var flagAssignments = Model.User.UserFlagAssignments.Select(a => Tuple.Create(a, UserFlagService.GetUserFlag(a.UserFlagId))).ToList();
|
||||
var flagAssignments = Model.User.UserFlagAssignments.Select(a => Tuple.Create(a, UserFlagService.GetUserFlag(a.UserFlagId))).Where(g => g.Item2.permission.CanShow()).ToList();
|
||||
var activeAssignmentCount = flagAssignments.Count(a => !a.Item1.RemovedDate.HasValue);
|
||||
}
|
||||
<div id="UserDetailTab-Flags" class="UserPart">
|
||||
@if (flagAssignments.Count > 0)
|
||||
@@ -25,14 +18,14 @@
|
||||
{
|
||||
<tr data-userflagassignmentid="@fa.Item1.Id" data-flagassignmentaddeddate="@(fa.Item1.AddedDate.ToString("s"))" class="@(!fa.Item1.RemovedDate.HasValue ? "added" : "removed")">
|
||||
<td class="name">
|
||||
<i class="fa fa-@(fa.Item2.Icon) fa-fw fa-lg d-@(fa.Item2.IconColour)"></i>
|
||||
@if (hasUserFlagShow)
|
||||
<i class="fa fa-@(fa.Item2.flag.Icon) fa-fw fa-lg d-@(fa.Item2.flag.IconColour)"></i>
|
||||
@if (Authorization.Has(Claims.Config.UserFlag.Show))
|
||||
{
|
||||
@Html.ActionLink(fa.Item2.Name, MVC.Config.UserFlag.Index(fa.Item2.Id))
|
||||
@Html.ActionLink(fa.Item2.flag.Name, MVC.Config.UserFlag.Index(fa.Item2.flag.Id))
|
||||
}
|
||||
else
|
||||
{
|
||||
@fa.Item2.Name
|
||||
@fa.Item2.flag.Name
|
||||
}
|
||||
</td>
|
||||
<td class="added">
|
||||
@@ -43,7 +36,7 @@
|
||||
}
|
||||
</td>
|
||||
<td class="comments">
|
||||
@if (hasEdit)
|
||||
@if (fa.Item2.permission.CanEdit())
|
||||
{
|
||||
<div class="editable"><i class="fa fa-fw fa-edit" title="Edit Comments"></i></div>
|
||||
}
|
||||
@@ -77,6 +70,7 @@
|
||||
<div id="User_Show_Flags_Actions_Remove_Dialog" class="dialog" title="Remove this flag from the user?">
|
||||
@using (Html.BeginForm(MVC.API.UserFlagAssignment.RemoveUser()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="User_Show_Flags_Actions_Remove_Dialog_Id" type="hidden" name="id" value="" />
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg"></i> Are you sure?
|
||||
@@ -86,6 +80,7 @@
|
||||
<div id="User_Show_Flags_Actions_EditComments_Dialog" class="dialog" title="Edit the Comments">
|
||||
@using (Html.BeginForm(MVC.API.UserFlagAssignment.UpdateComments()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="User_Show_Flags_Actions_EditComments_Dialog_Id" type="hidden" name="id" value="" />
|
||||
<input type="hidden" name="redirect" value="true" />
|
||||
<h4>Comments:</h4>
|
||||
|
||||
@@ -52,15 +52,8 @@ namespace Disco.Web.Views.User.UserParts
|
||||
|
||||
#line 3 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
Authorization.Require(Claims.User.ShowFlagAssignments);
|
||||
|
||||
var hasRemove = Authorization.Has(Claims.User.Actions.RemoveFlags);
|
||||
var hasEdit = Authorization.Has(Claims.User.Actions.EditFlags);
|
||||
|
||||
var hasUserFlagShow = Authorization.Has(Claims.Config.UserFlag.Show);
|
||||
var activeAssignmentCount = Model.User.UserFlagAssignments == null ? 0 : Model.User.UserFlagAssignments.Count(a => !a.RemovedDate.HasValue);
|
||||
|
||||
var flagAssignments = Model.User.UserFlagAssignments.Select(a => Tuple.Create(a, UserFlagService.GetUserFlag(a.UserFlagId))).ToList();
|
||||
var flagAssignments = Model.User.UserFlagAssignments.Select(a => Tuple.Create(a, UserFlagService.GetUserFlag(a.UserFlagId))).Where(g => g.Item2.permission.CanShow()).ToList();
|
||||
var activeAssignmentCount = flagAssignments.Count(a => !a.Item1.RemovedDate.HasValue);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -74,13 +67,13 @@ WriteLiteral(" class=\"UserPart\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 15 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 8 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 8 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
if (flagAssignments.Count > 0)
|
||||
{
|
||||
|
||||
@@ -110,13 +103,13 @@ WriteLiteral(" class=\"removed\"");
|
||||
WriteLiteral(">Removed</th>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 17 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 24 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 17 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
foreach (var fa in flagAssignments.OrderByDescending(a => a.Item1.AddedDate))
|
||||
{
|
||||
|
||||
@@ -128,7 +121,7 @@ WriteLiteral(" <tr");
|
||||
WriteLiteral(" data-userflagassignmentid=\"");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 19 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(fa.Item1.Id);
|
||||
|
||||
|
||||
@@ -139,7 +132,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-flagassignmentaddeddate=\"");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 19 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(fa.Item1.AddedDate.ToString("s"));
|
||||
|
||||
|
||||
@@ -147,14 +140,14 @@ WriteLiteral(" data-flagassignmentaddeddate=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1240), Tuple.Create("\"", 1303)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 943), Tuple.Create("\"", 1006)
|
||||
|
||||
#line 26 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1248), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? "added" : "removed"
|
||||
#line 19 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 951), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? "added" : "removed"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1248), false)
|
||||
, 951), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <td");
|
||||
@@ -163,54 +156,54 @@ WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1372), Tuple.Create("\"", 1439)
|
||||
, Tuple.Create(Tuple.Create("", 1380), Tuple.Create("fa", 1380), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1382), Tuple.Create("fa-", 1383), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1075), Tuple.Create("\"", 1152)
|
||||
, Tuple.Create(Tuple.Create("", 1083), Tuple.Create("fa", 1083), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1085), Tuple.Create("fa-", 1086), true)
|
||||
|
||||
#line 28 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1386), Tuple.Create<System.Object, System.Int32>(fa.Item2.Icon
|
||||
#line 21 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1089), Tuple.Create<System.Object, System.Int32>(fa.Item2.flag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1386), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1402), Tuple.Create("fa-fw", 1403), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1408), Tuple.Create("fa-lg", 1409), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1414), Tuple.Create("d-", 1415), true)
|
||||
, 1089), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1110), Tuple.Create("fa-fw", 1111), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1116), Tuple.Create("fa-lg", 1117), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1122), Tuple.Create("d-", 1123), true)
|
||||
|
||||
#line 28 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1417), Tuple.Create<System.Object, System.Int32>(fa.Item2.IconColour
|
||||
#line 21 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1125), Tuple.Create<System.Object, System.Int32>(fa.Item2.flag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1417), false)
|
||||
, 1125), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 22 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 29 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
if (hasUserFlagShow)
|
||||
#line 22 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
if (Authorization.Has(Claims.Config.UserFlag.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(Html.ActionLink(fa.Item2.Name, MVC.Config.UserFlag.Index(fa.Item2.Id)));
|
||||
#line 24 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(Html.ActionLink(fa.Item2.flag.Name, MVC.Config.UserFlag.Index(fa.Item2.flag.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
#line 24 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -219,15 +212,15 @@ WriteLiteral("></i>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(fa.Item2.Name);
|
||||
#line 28 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(fa.Item2.flag.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
#line 28 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -242,7 +235,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 32 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(fa.Item1.AddedDate, fa.Item1.AddedUser));
|
||||
|
||||
|
||||
@@ -251,13 +244,13 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 33 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 40 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 33 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
if (fa.Item1.OnAssignmentExpressionResult != null)
|
||||
{
|
||||
|
||||
@@ -271,7 +264,7 @@ WriteLiteral(" class=\"expressionResult\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 35 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(fa.Item1.OnAssignmentExpressionResult);
|
||||
|
||||
|
||||
@@ -280,7 +273,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 43 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 36 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -293,14 +286,14 @@ WriteLiteral(" class=\"comments\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 39 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 46 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
if (hasEdit)
|
||||
#line 39 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
if (fa.Item2.permission.CanEdit())
|
||||
{
|
||||
|
||||
|
||||
@@ -319,7 +312,7 @@ WriteLiteral(" title=\"Edit Comments\"");
|
||||
WriteLiteral("></i></div>\r\n");
|
||||
|
||||
|
||||
#line 49 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 42 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -328,7 +321,7 @@ WriteLiteral("></i></div>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 43 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
if (fa.Item1.Comments == null)
|
||||
{
|
||||
|
||||
@@ -342,7 +335,7 @@ WriteLiteral(" class=\"comments smallMessage\"");
|
||||
WriteLiteral(">[no comments]</div>\r\n");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 46 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -357,7 +350,7 @@ WriteLiteral(" class=\"comments\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 49 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(fa.Item1.Comments.ToHtmlComment());
|
||||
|
||||
|
||||
@@ -372,7 +365,7 @@ WriteLiteral(" class=\"commentsRaw\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 57 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 50 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(fa.Item1.Comments);
|
||||
|
||||
|
||||
@@ -381,7 +374,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 51 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -389,27 +382,27 @@ WriteLiteral("</div>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2954), Tuple.Create("\"", 3017)
|
||||
, Tuple.Create(Tuple.Create("", 2962), Tuple.Create("removed", 2962), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2735), Tuple.Create("\"", 2798)
|
||||
, Tuple.Create(Tuple.Create("", 2743), Tuple.Create("removed", 2743), true)
|
||||
|
||||
#line 60 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2969), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? " na" : null
|
||||
#line 53 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2750), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? " na" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2969), false)
|
||||
, 2750), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 61 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 54 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 61 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 54 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
if (fa.Item1.RemovedDate.HasValue)
|
||||
{
|
||||
|
||||
@@ -417,14 +410,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 63 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 56 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(fa.Item1.RemovedDate.Value, fa.Item1.RemovedUser));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 63 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 56 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
if (fa.Item1.OnUnassignmentExpressionResult != null)
|
||||
{
|
||||
@@ -439,7 +432,7 @@ WriteLiteral(" class=\"expressionResult\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 66 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 59 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(fa.Item1.OnUnassignmentExpressionResult);
|
||||
|
||||
|
||||
@@ -448,7 +441,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 60 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
}
|
||||
else if (fa.Item1.CanRemove())
|
||||
@@ -466,7 +459,7 @@ WriteLiteral(" class=\"button small remove\"");
|
||||
WriteLiteral(">Remove</a>\r\n");
|
||||
|
||||
|
||||
#line 72 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 65 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -475,7 +468,7 @@ WriteLiteral(">Remove</a>\r\n");
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 75 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 68 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -494,15 +487,29 @@ WriteLiteral(" title=\"Remove this flag from the user?\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 71 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 78 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 71 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
using (Html.BeginForm(MVC.API.UserFlagAssignment.RemoveUser()))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
@@ -526,7 +533,7 @@ WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
||||
WriteLiteral("></i> Are you sure?\r\n </p>\r\n");
|
||||
|
||||
|
||||
#line 84 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 78 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -545,15 +552,29 @@ WriteLiteral(" title=\"Edit the Comments\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 87 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 81 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 87 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 81 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
using (Html.BeginForm(MVC.API.UserFlagAssignment.UpdateComments()))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 83 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 83 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
@@ -593,7 +614,7 @@ WriteLiteral(" class=\"block\"");
|
||||
WriteLiteral("></textarea>\r\n </p>\r\n");
|
||||
|
||||
|
||||
#line 95 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 90 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -651,7 +672,7 @@ WriteLiteral(">\r\n $(function () {\r\n var userFlags
|
||||
";\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 174 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 169 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -666,7 +687,7 @@ WriteLiteral(" class=\"none\"");
|
||||
WriteLiteral(">This user has no associated flags</div>\r\n");
|
||||
|
||||
|
||||
#line 178 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 173 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -676,7 +697,7 @@ WriteLiteral(" <script>\r\n $(\'#UserDetailTabItems\').append(\'<li><a
|
||||
"b-Flags\">Flags [");
|
||||
|
||||
|
||||
#line 180 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 175 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(activeAssignmentCount);
|
||||
|
||||
|
||||
|
||||
@@ -236,12 +236,13 @@
|
||||
</script>
|
||||
}
|
||||
}
|
||||
@if (Model.User.CanAddUserFlags() && Model.AvailableUserFlags != null && Model.AvailableUserFlags.Count > 0)
|
||||
@if (Model.AvailableUserFlags != null && Model.AvailableUserFlags.Count > 0)
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Add Flag", MVC.API.UserFlagAssignment.AddUser(), "User_Show_Details_Actions_AddFlag_Button")
|
||||
<button id="User_Show_Details_Actions_AddFlag_Button" type="button" class="button small">Add Flag</button>
|
||||
<div id="User_Show_Details_Actions_AddFlag_Dialog" class="dialog" title="Add User Flag">
|
||||
@using (Html.BeginForm(MVC.API.UserFlagAssignment.AddUser()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="User_Show_Details_Actions_AddFlag_Dialog_Id" type="hidden" name="id" />
|
||||
<input id="User_Show_Details_Actions_AddFlag_Dialog_UserId" type="hidden" name="UserId" value="@Model.User.UserId" />
|
||||
<div class="flagPicker">
|
||||
@@ -265,7 +266,6 @@
|
||||
$(function () {
|
||||
const button = $('#User_Show_Details_Actions_AddFlag_Button');
|
||||
let buttonDialog = null;
|
||||
const buttonLink = button.attr('href');
|
||||
|
||||
let flagPicker = null;
|
||||
let flagAddId = null;
|
||||
@@ -285,7 +285,7 @@
|
||||
flagAddComments.focus().select();
|
||||
}
|
||||
|
||||
button.attr('href', '#').click(function (e) {
|
||||
button.click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (!buttonDialog) {
|
||||
@@ -302,10 +302,9 @@
|
||||
},
|
||||
"Add Flag": function () {
|
||||
if (!!flagAddId.val()) {
|
||||
const $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
buttonDialog.find('form').submit();
|
||||
buttonDialog
|
||||
.dialog("option", "buttons", null)
|
||||
.find('form').submit();
|
||||
} else {
|
||||
alert('Select a User Flag');
|
||||
}
|
||||
@@ -437,20 +436,22 @@
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_Assigned">@CommonHelpers.FriendlyDate(assignment.AssignedDate)</span>
|
||||
</td>
|
||||
</tr>
|
||||
@if (Authorization.Has(Claims.Device.ShowFlagAssignments) &&
|
||||
assignment.Device.DeviceFlagAssignments.Any(a => a.RemovedDate.HasValue))
|
||||
@if (assignment.Device.DeviceFlagAssignments.CanShowAny())
|
||||
{
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="User_Show_Assigned_Devices_CurrentAssignment_Flags">
|
||||
@foreach (var flag in assignment.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 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>
|
||||
if (flag.Item2.permission.CanShow())
|
||||
{
|
||||
<i class="flag fa fa-@(flag.Item2.flag.Icon) fa-fw d-@(flag.Item2.flag.IconColour)">
|
||||
<span class="details">
|
||||
<span class="name">@flag.Item2.flag.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>
|
||||
}
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
@@ -893,26 +893,22 @@ WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 239 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Model.User.CanAddUserFlags() && Model.AvailableUserFlags != null && Model.AvailableUserFlags.Count > 0)
|
||||
if (Model.AvailableUserFlags != null && Model.AvailableUserFlags.Count > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 241 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Add Flag", MVC.API.UserFlagAssignment.AddUser(), "User_Show_Details_Actions_AddFlag_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 241 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
WriteLiteral(" <button");
|
||||
|
||||
WriteLiteral(" id=\"User_Show_Details_Actions_AddFlag_Button\"");
|
||||
|
||||
WriteLiteral(" type=\"button\"");
|
||||
|
||||
WriteLiteral(" class=\"button small\"");
|
||||
|
||||
WriteLiteral(">Add Flag</button>\r\n");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"User_Show_Details_Actions_AddFlag_Dialog\"");
|
||||
@@ -933,6 +929,20 @@ WriteLiteral(">\r\n");
|
||||
#line 243 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
using (Html.BeginForm(MVC.API.UserFlagAssignment.AddUser()))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 245 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 245 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
@@ -955,14 +965,14 @@ WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"UserId\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 16008), Tuple.Create("\"", 16034)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 16023), Tuple.Create("\"", 16049)
|
||||
|
||||
#line 246 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 16016), Tuple.Create<System.Object, System.Int32>(Model.User.UserId
|
||||
#line 247 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 16031), Tuple.Create<System.Object, System.Int32>(Model.User.UserId
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 16016), false)
|
||||
, 16031), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
@@ -984,13 +994,13 @@ WriteLiteral(" autocomplete=\"off\"");
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
|
||||
#line 249 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 250 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 249 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 250 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
foreach (var userFlag in Model.AvailableUserFlags.OrderBy(jq => jq.Name))
|
||||
{
|
||||
|
||||
@@ -1004,7 +1014,7 @@ WriteLiteral(" class=\"flag\"");
|
||||
WriteLiteral(" data-userflagid=\"");
|
||||
|
||||
|
||||
#line 251 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 252 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(userFlag.Id);
|
||||
|
||||
|
||||
@@ -1015,7 +1025,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-userflagname=\"");
|
||||
|
||||
|
||||
#line 251 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 252 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(userFlag.Name);
|
||||
|
||||
|
||||
@@ -1025,32 +1035,32 @@ WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 16599), Tuple.Create("\"", 16666)
|
||||
, Tuple.Create(Tuple.Create("", 16607), Tuple.Create("fa", 16607), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 16609), Tuple.Create("fa-", 16610), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 16614), Tuple.Create("\"", 16681)
|
||||
, Tuple.Create(Tuple.Create("", 16622), Tuple.Create("fa", 16622), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 16624), Tuple.Create("fa-", 16625), true)
|
||||
|
||||
#line 252 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 16613), Tuple.Create<System.Object, System.Int32>(userFlag.Icon
|
||||
#line 253 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 16628), Tuple.Create<System.Object, System.Int32>(userFlag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 16613), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 16629), Tuple.Create("fa-fw", 16630), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 16635), Tuple.Create("fa-lg", 16636), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 16641), Tuple.Create("d-", 16642), true)
|
||||
, 16628), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 16644), Tuple.Create("fa-fw", 16645), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 16650), Tuple.Create("fa-lg", 16651), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 16656), Tuple.Create("d-", 16657), true)
|
||||
|
||||
#line 252 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 16644), Tuple.Create<System.Object, System.Int32>(userFlag.IconColour
|
||||
#line 253 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 16659), Tuple.Create<System.Object, System.Int32>(userFlag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 16644), false)
|
||||
, 16659), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 252 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 253 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(userFlag.Name);
|
||||
|
||||
|
||||
@@ -1059,7 +1069,7 @@ WriteLiteral("></i>");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 254 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 255 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1083,7 +1093,7 @@ WriteLiteral("></textarea>\r\n </div>\r\n
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 262 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 263 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1097,72 +1107,69 @@ WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n " +
|
||||
" const button = $(\'#User_Show_Details_Actions_AddFlag_Button\');\r\n " +
|
||||
" let buttonDialog = null;\r\n " +
|
||||
" const buttonLink = button.attr(\'href\');\r\n\r\n " +
|
||||
" let flagPicker = null;\r\n let flagAddI" +
|
||||
"d = null;\r\n let flagAddComments = null;\r\n " +
|
||||
" let details = null;\r\n\r\n " +
|
||||
" function flagSelected() {\r\n co" +
|
||||
"nst flag = $(this);\r\n\r\n flagPicker.childr" +
|
||||
"en().removeClass(\'selected\');\r\n flag.addC" +
|
||||
"lass(\'selected\');\r\n\r\n flagAddId.val(flag." +
|
||||
"attr(\'data-userflagid\'));\r\n\r\n details.sho" +
|
||||
"w();\r\n\r\n flagAddComments.focus().select()" +
|
||||
";\r\n }\r\n\r\n " +
|
||||
"button.attr(\'href\', \'#\').click(function (e) {\r\n " +
|
||||
" e.preventDefault();\r\n\r\n if (!butto" +
|
||||
"nDialog) {\r\n buttonDialog = $(\'#User_" +
|
||||
"Show_Details_Actions_AddFlag_Dialog\');\r\n " +
|
||||
" buttonDialog.dialog({\r\n width" +
|
||||
": 600,\r\n height: 410,\r\n " +
|
||||
" resizable: false,\r\n " +
|
||||
" modal: true,\r\n " +
|
||||
" autoOpen: false,\r\n buttons" +
|
||||
": {\r\n Cancel: function () {\r\n" +
|
||||
" $(this).dialog(\"close\");" +
|
||||
"\r\n },\r\n " +
|
||||
" \"Add Flag\": function () {\r\n " +
|
||||
" if (!!flagAddId.val()) {\r\n " +
|
||||
" const $this = $(this);\r\n " +
|
||||
" $this.dialog(\"disable\");\r\n " +
|
||||
" $this.dialog(\"option\", \"buttons" +
|
||||
"\", null);\r\n buttonDia" +
|
||||
"log.find(\'form\').submit();\r\n " +
|
||||
" } else {\r\n alert(" +
|
||||
"\'Select a User Flag\');\r\n " +
|
||||
"}\r\n }\r\n " +
|
||||
" }\r\n });\r\n\r\n" +
|
||||
" flagAddId = $(\'#User_Show_Details_Ac" +
|
||||
"tions_AddFlag_Dialog_Id\');\r\n flagAddC" +
|
||||
"omments = buttonDialog.find(\'#User_Show_Details_Actions_AddFlag_Dialog_Comments\'" +
|
||||
");\r\n flagPicker = buttonDialog.find(\'" +
|
||||
".flagPicker\');\r\n details = buttonDial" +
|
||||
"og.find(\'.details\');\r\n\r\n $(\'#User_Sho" +
|
||||
"w_Details_Actions_AddFlag_Dialog_Filter\').on(\'keyup\', function (e) {\r\n " +
|
||||
" const filter = $(e.currentTarget).val().to" +
|
||||
"LowerCase();\r\n if (filter) {\r\n " +
|
||||
" flagPicker.children(\'div.flag\')" +
|
||||
".each(function () {\r\n con" +
|
||||
"st $this = $(this);\r\n if " +
|
||||
"($this.attr(\'data-userflagname\').toLowerCase().indexOf(filter) >= 0) {\r\n " +
|
||||
" $this.css(\'display\', \'block\'" +
|
||||
");\r\n } else {\r\n " +
|
||||
" $this.css(\'display\', \'none\');\r" +
|
||||
"\n }\r\n " +
|
||||
" });\r\n " +
|
||||
" } else {\r\n flagPicker.ch" +
|
||||
"ildren(\'div.flag\').each(function () { $(this).css(\'display\', \'block\'); });\r\n " +
|
||||
" }\r\n " +
|
||||
" });\r\n\r\n flagPicker.on(\'cli" +
|
||||
"ck\', \'div.flag\', flagSelected);\r\n }\r\n\r\n " +
|
||||
" $(\'#User_Show_Details_Actions_AddFlag_Dial" +
|
||||
"og_Filter\').val(\'\');\r\n buttonDialog.dialo" +
|
||||
"g(\'open\');\r\n return false;\r\n " +
|
||||
" });\r\n });\r\n " +
|
||||
" </script>\r\n");
|
||||
" let buttonDialog = null;\r\n\r\n " +
|
||||
" let flagPicker = null;\r\n let flagA" +
|
||||
"ddId = null;\r\n let flagAddComments = null;\r\n " +
|
||||
" let details = null;\r\n\r\n " +
|
||||
" function flagSelected() {\r\n " +
|
||||
" const flag = $(this);\r\n\r\n flagPicker.chi" +
|
||||
"ldren().removeClass(\'selected\');\r\n flag.a" +
|
||||
"ddClass(\'selected\');\r\n\r\n flagAddId.val(fl" +
|
||||
"ag.attr(\'data-userflagid\'));\r\n\r\n details." +
|
||||
"show();\r\n\r\n flagAddComments.focus().selec" +
|
||||
"t();\r\n }\r\n\r\n " +
|
||||
" button.click(function (e) {\r\n e.preven" +
|
||||
"tDefault();\r\n\r\n if (!buttonDialog) {\r\n " +
|
||||
" buttonDialog = $(\'#User_Show_Details_Ac" +
|
||||
"tions_AddFlag_Dialog\');\r\n buttonDialo" +
|
||||
"g.dialog({\r\n width: 600,\r\n " +
|
||||
" height: 410,\r\n " +
|
||||
" resizable: false,\r\n " +
|
||||
" modal: true,\r\n autoOpen" +
|
||||
": false,\r\n buttons: {\r\n " +
|
||||
" Cancel: function () {\r\n " +
|
||||
" $(this).dialog(\"close\");\r\n " +
|
||||
" },\r\n " +
|
||||
" \"Add Flag\": function () {\r\n " +
|
||||
" if (!!flagAddId.val()) {\r\n " +
|
||||
" buttonDialog\r\n " +
|
||||
" .dialog(\"option\", \"buttons\", null)\r\n " +
|
||||
" .find(\'form\').submit();\r\n " +
|
||||
" } else {\r\n " +
|
||||
" alert(\'Select a User Flag\');\r\n " +
|
||||
" }\r\n " +
|
||||
" }\r\n }\r\n " +
|
||||
" });\r\n\r\n " +
|
||||
" flagAddId = $(\'#User_Show_Details_Actions_AddFlag_Dialog_Id\');\r\n " +
|
||||
" flagAddComments = buttonDialog.find(\'#User_Show_D" +
|
||||
"etails_Actions_AddFlag_Dialog_Comments\');\r\n " +
|
||||
" flagPicker = buttonDialog.find(\'.flagPicker\');\r\n " +
|
||||
" details = buttonDialog.find(\'.details\');\r\n\r\n " +
|
||||
" $(\'#User_Show_Details_Actions_AddFlag_Dialog_Filter\')" +
|
||||
".on(\'keyup\', function (e) {\r\n con" +
|
||||
"st filter = $(e.currentTarget).val().toLowerCase();\r\n " +
|
||||
" if (filter) {\r\n " +
|
||||
" flagPicker.children(\'div.flag\').each(function () {\r\n " +
|
||||
" const $this = $(this);\r\n " +
|
||||
" if ($this.attr(\'data-userflagname\').toLowerC" +
|
||||
"ase().indexOf(filter) >= 0) {\r\n " +
|
||||
" $this.css(\'display\', \'block\');\r\n " +
|
||||
" } else {\r\n " +
|
||||
" $this.css(\'display\', \'none\');\r\n " +
|
||||
" }\r\n });\r\n " +
|
||||
" } else {\r\n " +
|
||||
" flagPicker.children(\'div.flag\').each(function () { $(t" +
|
||||
"his).css(\'display\', \'block\'); });\r\n " +
|
||||
" }\r\n });\r\n\r\n " +
|
||||
" flagPicker.on(\'click\', \'div.flag\', flagSelected);\r\n " +
|
||||
" }\r\n\r\n $(\'" +
|
||||
"#User_Show_Details_Actions_AddFlag_Dialog_Filter\').val(\'\');\r\n " +
|
||||
" buttonDialog.dialog(\'open\');\r\n " +
|
||||
" return false;\r\n });\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 346 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 345 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1171,13 +1178,13 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
WriteLiteral(" </div>\r\n </div>\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 350 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 349 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 350 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 349 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowAssignments))
|
||||
{
|
||||
|
||||
@@ -1195,13 +1202,13 @@ WriteLiteral(" id=\"User_Show_AssignedDevices_Active\"");
|
||||
WriteLiteral(">\r\n <h3>Current Device Assignments</h3>\r\n");
|
||||
|
||||
|
||||
#line 356 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 355 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 356 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 355 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (currentDeviceAssignments.Count > 0)
|
||||
{
|
||||
foreach (var assignment in currentDeviceAssignments)
|
||||
@@ -1217,7 +1224,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment clearfix\"");
|
||||
WriteLiteral(" data-deviceserialnumber=\"");
|
||||
|
||||
|
||||
#line 360 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 359 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.DeviceSerialNumber);
|
||||
|
||||
|
||||
@@ -1228,13 +1235,13 @@ WriteLiteral("\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 361 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 360 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 361 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 360 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
|
||||
@@ -1243,14 +1250,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 23450), Tuple.Create("\"", 23517)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 23264), Tuple.Create("\"", 23331)
|
||||
|
||||
#line 363 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 23457), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))
|
||||
#line 362 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 23271), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 23457), false)
|
||||
, 23271), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
@@ -1259,20 +1266,20 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 23649), Tuple.Create("\"", 23770)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 23463), Tuple.Create("\"", 23584)
|
||||
|
||||
#line 364 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 23655), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
#line 363 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 23469), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 23655), false)
|
||||
, 23469), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </a>\r\n");
|
||||
|
||||
|
||||
#line 366 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 365 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1286,20 +1293,20 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 24082), Tuple.Create("\"", 24203)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 23896), Tuple.Create("\"", 24017)
|
||||
|
||||
#line 369 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 24088), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
#line 368 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 23902), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 24088), false)
|
||||
, 23902), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
|
||||
#line 370 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 369 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1327,13 +1334,13 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_SerialNumber\
|
||||
WriteLiteral(" data-clipboard>\r\n");
|
||||
|
||||
|
||||
#line 380 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 379 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 380 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 379 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
|
||||
@@ -1341,14 +1348,14 @@ WriteLiteral(" data-clipboard>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 382 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 381 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.ActionLink(assignment.Device.SerialNumber, MVC.Device.Show(assignment.Device.SerialNumber)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 382 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 381 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
@@ -1358,14 +1365,14 @@ WriteLiteral(" data-clipboard>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 386 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 385 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.SerialNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 386 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 385 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -1375,13 +1382,13 @@ WriteLiteral(" data-clipboard>\r\n");
|
||||
WriteLiteral(" </span>\r\n");
|
||||
|
||||
|
||||
#line 389 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 388 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 389 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 388 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrWhiteSpace(assignment.Device.ComputerName))
|
||||
{
|
||||
|
||||
@@ -1397,7 +1404,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_ComputerName\
|
||||
WriteLiteral(" data-clipboard>");
|
||||
|
||||
|
||||
#line 391 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 390 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.ComputerName);
|
||||
|
||||
|
||||
@@ -1408,7 +1415,7 @@ WriteLiteral("</span>)");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 392 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 391 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1418,13 +1425,13 @@ WriteLiteral(" </td>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 395 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 394 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 395 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 394 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
|
||||
{
|
||||
|
||||
@@ -1441,7 +1448,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Asset\"");
|
||||
WriteLiteral(" data-clipboard>");
|
||||
|
||||
|
||||
#line 400 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 399 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.AssetNumber);
|
||||
|
||||
|
||||
@@ -1451,7 +1458,7 @@ WriteLiteral("</span>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 403 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 402 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1460,7 +1467,7 @@ WriteLiteral("</span>\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 404 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 403 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (assignment.Device.DeviceModelId.HasValue)
|
||||
{
|
||||
|
||||
@@ -1479,7 +1486,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Model\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 411 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 410 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
@@ -1489,7 +1496,7 @@ WriteLiteral("</span>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 414 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 413 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1507,7 +1514,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Profile\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 420 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 419 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceProfile.ToString());
|
||||
|
||||
|
||||
@@ -1517,13 +1524,13 @@ WriteLiteral("</span>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 423 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 422 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 423 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 422 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (assignment.Device.DeviceBatchId.HasValue)
|
||||
{
|
||||
|
||||
@@ -1542,7 +1549,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Batch\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 430 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 429 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceBatch.ToString());
|
||||
|
||||
|
||||
@@ -1552,7 +1559,7 @@ WriteLiteral("</span>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 433 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 432 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1568,7 +1575,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Assigned\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 437 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 436 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(assignment.AssignedDate));
|
||||
|
||||
|
||||
@@ -1578,15 +1585,14 @@ WriteLiteral("</span>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 440 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 439 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 440 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowFlagAssignments) &&
|
||||
assignment.Device.DeviceFlagAssignments.Any(a => a.RemovedDate.HasValue))
|
||||
#line 439 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (assignment.Device.DeviceFlagAssignments.CanShowAny())
|
||||
{
|
||||
|
||||
|
||||
@@ -1604,50 +1610,52 @@ WriteLiteral(" class=\"User_Show_Assigned_Devices_CurrentAssignment_Flags\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 446 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 444 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 446 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 444 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
foreach (var flag in assignment.Device.DeviceFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, DeviceFlagService.GetDeviceFlag(f.DeviceFlagId))))
|
||||
{
|
||||
if (flag.Item2.permission.CanShow())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 30837), Tuple.Create("\"", 30907)
|
||||
, Tuple.Create(Tuple.Create("", 30845), Tuple.Create("flag", 30845), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 30849), Tuple.Create("fa", 30850), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 30852), Tuple.Create("fa-", 30853), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 30707), Tuple.Create("\"", 30787)
|
||||
, Tuple.Create(Tuple.Create("", 30715), Tuple.Create("flag", 30715), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 30719), Tuple.Create("fa", 30720), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 30722), Tuple.Create("fa-", 30723), true)
|
||||
|
||||
#line 448 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 30856), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
|
||||
, Tuple.Create(Tuple.Create("", 30726), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 30856), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 30874), Tuple.Create("fa-fw", 30875), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 30880), Tuple.Create("d-", 30881), true)
|
||||
, 30726), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 30749), Tuple.Create("fa-fw", 30750), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 30755), Tuple.Create("d-", 30756), true)
|
||||
|
||||
#line 448 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 30883), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
|
||||
, Tuple.Create(Tuple.Create("", 30758), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 30883), false)
|
||||
, 30758), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <s" +
|
||||
"pan");
|
||||
WriteLiteral(">\r\n " +
|
||||
" <span");
|
||||
|
||||
WriteLiteral(" class=\"details\"");
|
||||
|
||||
WriteLiteral(">\r\n " +
|
||||
" <span");
|
||||
" <span");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
@@ -1655,7 +1663,7 @@ WriteLiteral(">");
|
||||
|
||||
|
||||
#line 450 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(flag.Item2.Name);
|
||||
Write(flag.Item2.flag.Name);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -1664,8 +1672,8 @@ WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 450 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (flag.Item1.Comments != null)
|
||||
{
|
||||
if (flag.Item1.Comments != null)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -1677,7 +1685,7 @@ WriteLiteral(">");
|
||||
|
||||
|
||||
#line 451 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(flag.Item1.Comments.ToHtmlComment());
|
||||
Write(flag.Item1.Comments.ToHtmlComment());
|
||||
|
||||
|
||||
#line default
|
||||
@@ -1686,7 +1694,7 @@ WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 451 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -1698,17 +1706,18 @@ WriteLiteral(">");
|
||||
|
||||
|
||||
#line 451 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId));
|
||||
Write(CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n " +
|
||||
" </span>\r\n " +
|
||||
" </i>\r\n");
|
||||
" </span>\r\n " +
|
||||
" </i>\r\n");
|
||||
|
||||
|
||||
#line 454 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1761,7 +1770,7 @@ WriteLiteral(">\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 488 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 489 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1772,7 +1781,7 @@ WriteLiteral(" </tbody>\r\n
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 493 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 494 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1788,7 +1797,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Current Device Assignments</span>\r\n");
|
||||
|
||||
|
||||
#line 498 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 499 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1798,7 +1807,7 @@ WriteLiteral(" </div>\r\n </div>\r\n
|
||||
"\r\n");
|
||||
|
||||
|
||||
#line 502 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 503 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -42,22 +42,22 @@
|
||||
{
|
||||
@item.FriendlyId
|
||||
}
|
||||
@if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
@if (item.UserFlagAssignments.CanShowAny())
|
||||
{
|
||||
@if (item.UserFlagAssignments != null && item.UserFlagAssignments.Count > 0)
|
||||
{
|
||||
<div class="flags">
|
||||
@foreach (var flag in item.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
<div class="flags">
|
||||
@foreach (var flag in item.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
{
|
||||
if (flag.Item2.permission.CanShow())
|
||||
{
|
||||
<i class="flag fa fa-@(flag.Item2.Icon) fa-fw d-@(flag.Item2.IconColour)">
|
||||
<i class="flag fa fa-@(flag.Item2.flag.Icon) fa-fw d-@(flag.Item2.flag.IconColour)">
|
||||
<span class="details">
|
||||
<span class="name">@flag.Item2.Name</span>@if (flag.Item1.Comments != null)
|
||||
<span class="name">@flag.Item2.flag.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>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -173,35 +173,29 @@ WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\User\_UserTable.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
if (item.UserFlagAssignments.CanShowAny())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 47 "..\..\Views\User\_UserTable.cshtml"
|
||||
if (item.UserFlagAssignments != null && item.UserFlagAssignments.Count > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"flags\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\User\_UserTable.cshtml"
|
||||
|
||||
#line 48 "..\..\Views\User\_UserTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 50 "..\..\Views\User\_UserTable.cshtml"
|
||||
foreach (var flag in item.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
#line 48 "..\..\Views\User\_UserTable.cshtml"
|
||||
foreach (var flag in item.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
{
|
||||
if (flag.Item2.permission.CanShow())
|
||||
{
|
||||
|
||||
|
||||
@@ -209,26 +203,26 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2064), Tuple.Create("\"", 2134)
|
||||
, Tuple.Create(Tuple.Create("", 2072), Tuple.Create("flag", 2072), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 2076), Tuple.Create("fa", 2077), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 2079), Tuple.Create("fa-", 2080), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2015), Tuple.Create("\"", 2095)
|
||||
, Tuple.Create(Tuple.Create("", 2023), Tuple.Create("flag", 2023), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 2027), Tuple.Create("fa", 2028), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 2030), Tuple.Create("fa-", 2031), true)
|
||||
|
||||
#line 52 "..\..\Views\User\_UserTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2083), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
|
||||
, Tuple.Create(Tuple.Create("", 2034), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2083), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 2101), Tuple.Create("fa-fw", 2102), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 2107), Tuple.Create("d-", 2108), true)
|
||||
, 2034), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 2057), Tuple.Create("fa-fw", 2058), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 2063), Tuple.Create("d-", 2064), true)
|
||||
|
||||
#line 52 "..\..\Views\User\_UserTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2110), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
|
||||
, Tuple.Create(Tuple.Create("", 2066), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2110), false)
|
||||
, 2066), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
@@ -243,7 +237,7 @@ WriteLiteral(">");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\User\_UserTable.cshtml"
|
||||
Write(flag.Item2.Name);
|
||||
Write(flag.Item2.flag.Name);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -252,7 +246,7 @@ WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\User\_UserTable.cshtml"
|
||||
if (flag.Item1.Comments != null)
|
||||
if (flag.Item1.Comments != null)
|
||||
{
|
||||
|
||||
#line default
|
||||
@@ -297,20 +291,15 @@ WriteLiteral("</span>\r\n </span>
|
||||
|
||||
#line 58 "..\..\Views\User\_UserTable.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
}
|
||||
|
||||
|
||||
#line 60 "..\..\Views\User\_UserTable.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\User\_UserTable.cshtml"
|
||||
|
||||
#line 61 "..\..\Views\User\_UserTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user