From 7603cac01a033b06067e0f250d1661855a949540 Mon Sep 17 00:00:00 2001 From: Gary Sharp Date: Fri, 19 Sep 2025 12:18:45 +1000 Subject: [PATCH] feature: scheduled flag removal --- .../Repository/Device/Flag/DeviceFlag.cs | 2 +- Disco.Models/Repository/User/Flag/UserFlag.cs | 2 +- .../DeviceFlags/DeviceFlagExtensions.cs | 62 ++- .../Devices/DeviceFlags/FlagRemovalTask.cs | 65 +++ Disco.Services/Disco.Services.csproj | 1 + .../Users/UserFlags/UserFlagExtensions.cs | 58 ++- .../Users/UserFlags/UserFlagService.cs | 2 +- .../DeviceFlagAssignmentController.cs | 80 +-- .../API/Controllers/DeviceFlagController.cs | 40 +- .../UserFlagAssignmentController.cs | 80 +-- .../API/Controllers/UserFlagController.cs | 40 +- .../Config/Views/DeviceFlag/Index.cshtml | 6 +- .../Views/DeviceFlag/Index.generated.cs | 71 ++- .../Areas/Config/Views/DeviceFlag/Show.cshtml | 44 ++ .../Config/Views/DeviceFlag/Show.generated.cs | 475 +++++++++++------ .../Areas/Config/Views/UserFlag/Index.cshtml | 6 +- .../Config/Views/UserFlag/Index.generated.cs | 71 ++- .../Areas/Config/Views/UserFlag/Show.cshtml | 44 ++ .../Config/Views/UserFlag/Show.generated.cs | 484 ++++++++++++------ Disco.Web/ClientSource/Style/Config.css | 4 + Disco.Web/ClientSource/Style/Config.less | 4 + Disco.Web/ClientSource/Style/Config.min.css | 2 +- ...eviceFlagAssignmentController.generated.cs | 70 +-- .../API.DeviceFlagController.generated.cs | 32 ++ ....UserFlagAssignmentController.generated.cs | 70 +-- .../T4MVC/API.UserFlagController.generated.cs | 32 ++ .../Views/Device/DeviceParts/_Flags.cshtml | 63 ++- .../Device/DeviceParts/_Flags.generated.cs | 289 +++++++---- .../Views/Device/DeviceParts/_Subject.cshtml | 40 +- .../Device/DeviceParts/_Subject.generated.cs | 292 ++++++----- Disco.Web/Views/User/UserParts/_Flags.cshtml | 59 ++- .../Views/User/UserParts/_Flags.generated.cs | 289 +++++++---- .../Views/User/UserParts/_Subject.cshtml | 36 +- .../User/UserParts/_Subject.generated.cs | 350 ++++++++----- 34 files changed, 2210 insertions(+), 1055 deletions(-) create mode 100644 Disco.Services/Devices/DeviceFlags/FlagRemovalTask.cs diff --git a/Disco.Models/Repository/Device/Flag/DeviceFlag.cs b/Disco.Models/Repository/Device/Flag/DeviceFlag.cs index 8ab90082..7d0f2838 100644 --- a/Disco.Models/Repository/Device/Flag/DeviceFlag.cs +++ b/Disco.Models/Repository/Device/Flag/DeviceFlag.cs @@ -36,7 +36,7 @@ namespace Disco.Models.Repository get => FlagPermission.FromFlag(this); set => PermissionsJson = value?.ToJson(); } - + [Range(0, int.MaxValue)] public int? DefaultRemoveDays { get; set; } public virtual IList DeviceFlagAssignments { get; set; } diff --git a/Disco.Models/Repository/User/Flag/UserFlag.cs b/Disco.Models/Repository/User/Flag/UserFlag.cs index 022c7068..adb64cf9 100644 --- a/Disco.Models/Repository/User/Flag/UserFlag.cs +++ b/Disco.Models/Repository/User/Flag/UserFlag.cs @@ -36,7 +36,7 @@ namespace Disco.Models.Repository get => FlagPermission.FromFlag(this); set => PermissionsJson = value?.ToJson(); } - + [Range(0, int.MaxValue)] public int? DefaultRemoveDays { get; set; } public virtual IList UserFlagAssignments { get; set; } diff --git a/Disco.Services/Devices/DeviceFlags/DeviceFlagExtensions.cs b/Disco.Services/Devices/DeviceFlags/DeviceFlagExtensions.cs index bc5464bc..17b7b700 100644 --- a/Disco.Services/Devices/DeviceFlags/DeviceFlagExtensions.cs +++ b/Disco.Services/Devices/DeviceFlags/DeviceFlagExtensions.cs @@ -14,19 +14,26 @@ namespace Disco.Services public static class DeviceFlagExtensions { - #region Edit Comments + #region Edit public static bool CanEdit(this DeviceFlagAssignment fa) { var (_, permission) = DeviceFlagService.GetDeviceFlag(fa.DeviceFlagId); return permission.CanEdit(); } - public static void OnEdit(this DeviceFlagAssignment fa, string comments) + public static void OnEdit(this DeviceFlagAssignment fa, string comments, DateTime? removeDate) { if (!fa.CanEdit()) throw new InvalidOperationException("Editing comments for device flags is denied"); fa.Comments = string.IsNullOrWhiteSpace(comments) ? null : comments.Trim(); + + if (fa.CanRemove() && removeDate != fa.RemoveDate && + (!removeDate.HasValue || removeDate.Value >= DateTime.Today)) + { + fa.RemoveDate = removeDate?.Date; + fa.RemoveUserId = UserService.CurrentUser.UserId; + } } #endregion @@ -49,6 +56,11 @@ namespace Disco.Services } public static void OnRemoveUnsafe(this DeviceFlagAssignment fa, DiscoDataContext database, User removingUser) + { + OnRemoveUnsafe(fa, database, removingUser, isScheduled: false); + } + + internal static void OnRemoveUnsafe(this DeviceFlagAssignment fa, DiscoDataContext database, User removingUser, bool isScheduled) { fa = database.DeviceFlagAssignments .Include(a => a.DeviceFlag) @@ -58,6 +70,13 @@ namespace Disco.Services fa.RemovedDate = DateTime.Now; fa.RemovedUserId = removingUser.UserId; + if (!isScheduled) + { + fa.RemoveDate = null; + fa.RemoveUser = null; + fa.RemoveUserId = null; + } + if (!string.IsNullOrWhiteSpace(fa.DeviceFlag.OnUnassignmentExpression)) { try @@ -89,15 +108,45 @@ namespace Disco.Services return permission.CanAssign(); } + public static bool CanRemoveDeviceFlag(this Device d, DeviceFlag flag) + { + var (_, permission) = DeviceFlagService.GetDeviceFlag(flag.Id); + + return permission.CanRemove(); + } public static DeviceFlagAssignment OnAddDeviceFlag(this Device d, DiscoDataContext database, DeviceFlag flag, string comments) { if (!d.CanAddDeviceFlag(flag)) throw new InvalidOperationException("Adding device flag is denied"); - return d.OnAddDeviceFlagUnsafe(database, flag, UserService.CurrentUser, comments); + var removeDate = (DateTime?)null; + if (flag.DefaultRemoveDays.HasValue) + removeDate = DateTime.Today.AddDays(flag.DefaultRemoveDays.Value); + + return OnAddDeviceFlag(d, database, flag, comments, removeDate); + } + + public static DeviceFlagAssignment OnAddDeviceFlag(this Device d, DiscoDataContext database, DeviceFlag flag, string comments, DateTime? removeDate) + { + if (!d.CanAddDeviceFlag(flag)) + throw new InvalidOperationException("Adding device flag is denied"); + + if (d.CanRemoveDeviceFlag(flag)) + return d.OnAddDeviceFlagUnsafe(database, flag, UserService.CurrentUser, comments, removeDate); + else + return d.OnAddDeviceFlagUnsafe(database, flag, UserService.CurrentUser, comments); } public static DeviceFlagAssignment OnAddDeviceFlagUnsafe(this Device d, DiscoDataContext database, DeviceFlag flag, User addingUser, string comments) + { + var removeDate = (DateTime?)null; + if (flag.DefaultRemoveDays.HasValue) + removeDate = DateTime.Today.AddDays(flag.DefaultRemoveDays.Value); + + return OnAddDeviceFlagUnsafe(d, database, flag, addingUser, comments, removeDate); + } + + public static DeviceFlagAssignment OnAddDeviceFlagUnsafe(this Device d, DiscoDataContext database, DeviceFlag flag, User addingUser, string comments, DateTime? removeDate) { flag = database.DeviceFlags.First(f => f.Id == flag.Id); d = database.Devices.First(de => de.SerialNumber == d.SerialNumber); @@ -113,6 +162,13 @@ namespace Disco.Services Comments = string.IsNullOrWhiteSpace(comments) ? null : comments.Trim() }; + if (removeDate.HasValue) + { + fa.RemoveDate = removeDate.Value.Date; + fa.RemoveUser = addingUser; + fa.RemoveUserId = addingUser.UserId; + } + database.DeviceFlagAssignments.Add(fa); if (!string.IsNullOrWhiteSpace(flag.OnAssignmentExpression)) diff --git a/Disco.Services/Devices/DeviceFlags/FlagRemovalTask.cs b/Disco.Services/Devices/DeviceFlags/FlagRemovalTask.cs new file mode 100644 index 00000000..8b0cf339 --- /dev/null +++ b/Disco.Services/Devices/DeviceFlags/FlagRemovalTask.cs @@ -0,0 +1,65 @@ +using Disco.Data.Repository; +using Disco.Services.Tasks; +using Quartz; +using System; +using System.Data.Entity; +using System.Linq; + +namespace Disco.Services.Devices.DeviceFlags +{ + public class FlagRemovalTask : ScheduledTask + { + public override string TaskName { get; } = "Flags - Scheduled Removal"; + + public override bool SingleInstanceTask { get; } = false; + public override bool CancelInitiallySupported { get; } = false; + public override bool LogExceptionsOnly { get; } = true; + + public override void InitalizeScheduledTask(DiscoDataContext Database) + { + // Schedule in 1mins + var trigger = TriggerBuilder.Create() + .StartAt(DateTimeOffset.Now.AddMinutes(1)); + + ScheduleTask(trigger); + + // Schedule every day at midnight + trigger = TriggerBuilder.Create() + .WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(0, 0)); + ScheduleTask(trigger); + } + + protected override void ExecuteTask() + { + using (DiscoDataContext database = new DiscoDataContext()) + { + var assignments = database.DeviceFlagAssignments + .Include(a => a.RemoveUser) + .Include(a => a.AddedUser) + .Where(a => a.RemovedDate == null && a.RemoveDate <= DateTime.Today) + .ToList(); + + foreach (var assignment in assignments) + { + assignment.OnRemoveUnsafe(database, assignment.RemoveUser ?? assignment.AddedUser, isScheduled: true); + } + database.SaveChanges(); + } + + using (DiscoDataContext database = new DiscoDataContext()) + { + var assignments = database.UserFlagAssignments + .Include(a => a.RemoveUser) + .Include(a => a.AddedUser) + .Where(a => a.RemovedDate == null && a.RemoveDate <= DateTime.Today) + .ToList(); + + foreach (var assignment in assignments) + { + assignment.OnRemoveUnsafe(database, assignment.RemoveUser ?? assignment.AddedUser, isScheduled: true); + } + database.SaveChanges(); + } + } + } +} diff --git a/Disco.Services/Disco.Services.csproj b/Disco.Services/Disco.Services.csproj index f026d40b..c94f9a01 100644 --- a/Disco.Services/Disco.Services.csproj +++ b/Disco.Services/Disco.Services.csproj @@ -348,6 +348,7 @@ + diff --git a/Disco.Services/Users/UserFlags/UserFlagExtensions.cs b/Disco.Services/Users/UserFlags/UserFlagExtensions.cs index ba5be1cd..ca19ce4d 100644 --- a/Disco.Services/Users/UserFlags/UserFlagExtensions.cs +++ b/Disco.Services/Users/UserFlags/UserFlagExtensions.cs @@ -13,19 +13,26 @@ namespace Disco.Services public static class UserFlagExtensions { - #region Edit Comments + #region Edit public static bool CanEdit(this UserFlagAssignment fa) { var (_, permission) = UserFlagService.GetUserFlag(fa.UserFlagId); return permission.CanEdit(); } - public static void OnEdit(this UserFlagAssignment fa, string comments) + public static void OnEdit(this UserFlagAssignment fa, string comments, DateTime? removeDate) { if (!fa.CanEdit()) throw new InvalidOperationException("Editing comments for user flags is denied"); fa.Comments = string.IsNullOrWhiteSpace(comments) ? null : comments.Trim(); + + if (fa.CanRemove() && removeDate != fa.RemoveDate && + (!removeDate.HasValue || removeDate.Value >= DateTime.Today)) + { + fa.RemoveDate = removeDate?.Date; + fa.RemoveUserId = UserService.CurrentUser.UserId; + } } #endregion @@ -48,6 +55,11 @@ namespace Disco.Services } public static void OnRemoveUnsafe(this UserFlagAssignment fa, DiscoDataContext database, User removingUser) + { + OnRemoveUnsafe(fa, database, removingUser, false); + } + + internal static void OnRemoveUnsafe(this UserFlagAssignment fa, DiscoDataContext database, User removingUser, bool isScheduled) { fa = database.UserFlagAssignments.First(a => a.Id == fa.Id); removingUser = database.Users.First(u => u.UserId == removingUser.UserId); @@ -55,6 +67,13 @@ namespace Disco.Services fa.RemovedDate = DateTime.Now; fa.RemovedUserId = removingUser.UserId; + if (!isScheduled) + { + fa.RemoveDate = null; + fa.RemoveUser = null; + fa.RemoveUserId = null; + } + if (!string.IsNullOrWhiteSpace(fa.UserFlag.OnUnassignmentExpression)) { try @@ -87,14 +106,40 @@ namespace Disco.Services return permission.CanAssign(); } public static UserFlagAssignment OnAddUserFlag(this User u, DiscoDataContext database, UserFlag flag, string comments) + { + var removeDate = (DateTime?)null; + if (flag.DefaultRemoveDays.HasValue) + removeDate = DateTime.Today.AddDays(flag.DefaultRemoveDays.Value); + + return OnAddUserFlag(u, database, flag, comments, removeDate); + } + public static UserFlagAssignment OnAddUserFlag(this User u, DiscoDataContext database, UserFlag flag, string comments, DateTime? removeDate) { if (!u.CanAddUserFlag(flag)) throw new InvalidOperationException("Adding user flag is denied"); - return u.OnAddUserFlagUnsafe(database, flag, UserService.CurrentUser, comments); + if (u.CanRemoveUserFlag(flag)) + return u.OnAddUserFlagUnsafe(database, flag, UserService.CurrentUser, comments, removeDate); + else + return u.OnAddUserFlagUnsafe(database, flag, UserService.CurrentUser, comments); + } + public static bool CanRemoveUserFlag(this User u, UserFlag flag) + { + var (_, permission) = UserFlagService.GetUserFlag(flag.Id); + + return permission.CanRemove(); } public static UserFlagAssignment OnAddUserFlagUnsafe(this User u, DiscoDataContext database, UserFlag flag, User addingUser, string comments) + { + var removeDate = (DateTime?)null; + if (flag.DefaultRemoveDays.HasValue) + removeDate = DateTime.Today.AddDays(flag.DefaultRemoveDays.Value); + + return OnAddUserFlagUnsafe(u, database, flag, addingUser, comments, removeDate); + } + + public static UserFlagAssignment OnAddUserFlagUnsafe(this User u, DiscoDataContext database, UserFlag flag, User addingUser, string comments, DateTime? removeDate) { flag = database.UserFlags.First(f => f.Id == flag.Id); u = database.Users.First(user => user.UserId == u.UserId); @@ -110,6 +155,13 @@ namespace Disco.Services Comments = string.IsNullOrWhiteSpace(comments) ? null : comments.Trim() }; + if (removeDate.HasValue) + { + fa.RemoveDate = removeDate.Value.Date; + fa.RemoveUser = addingUser; + fa.RemoveUserId = addingUser.UserId; + } + database.UserFlagAssignments.Add(fa); if (!string.IsNullOrWhiteSpace(flag.OnAssignmentExpression)) diff --git a/Disco.Services/Users/UserFlags/UserFlagService.cs b/Disco.Services/Users/UserFlags/UserFlagService.cs index 88699bb3..2d89600e 100644 --- a/Disco.Services/Users/UserFlags/UserFlagService.cs +++ b/Disco.Services/Users/UserFlags/UserFlagService.cs @@ -238,7 +238,7 @@ namespace Disco.Services.Users.UserFlags var chunkResults = chunk.Select((user, index) => { - status.UpdateStatus((chunkIndexOffset + index) * progressInterval, string.Format("Assigning Flag: {0}", user.ToString())); + status.UpdateStatus((chunkIndexOffset + index) * progressInterval, $"Assigning Flag: {user}"); return user.OnAddUserFlagUnsafe(database, userFlag, techUser, comments); }).ToList(); diff --git a/Disco.Web/Areas/API/Controllers/DeviceFlagAssignmentController.cs b/Disco.Web/Areas/API/Controllers/DeviceFlagAssignmentController.cs index 4fcb43df..ccff7ccf 100644 --- a/Disco.Web/Areas/API/Controllers/DeviceFlagAssignmentController.cs +++ b/Disco.Web/Areas/API/Controllers/DeviceFlagAssignmentController.cs @@ -1,5 +1,4 @@ -using Disco.Models.Repository; -using Disco.Services; +using Disco.Services; using Disco.Services.Web; using System; using System.Data.Entity; @@ -10,34 +9,25 @@ namespace Disco.Web.Areas.API.Controllers { public partial class DeviceFlagAssignmentController : AuthorizedDatabaseController { - const string pComments = "comments"; [HttpPost, ValidateAntiForgeryToken] - public virtual ActionResult Update(int id, string key, string value = null, bool? redirect = null) + public virtual ActionResult Edit(int id, string comments, DateTime? removeDate, bool? redirect = null) { try { if (id < 0) throw new ArgumentOutOfRangeException(nameof(id)); - if (string.IsNullOrEmpty(key)) - throw new ArgumentNullException(nameof(key)); + var assignment = Database.DeviceFlagAssignments .Include(a => a.DeviceFlag) - .FirstOrDefault(a => a.Id == id); - if (assignment != null) - { - switch (key.ToLower()) - { - case pComments: - UpdateComments(assignment, value); - break; - default: - throw new Exception("Invalid Update Key"); - } - } - else - { - throw new Exception("Invalid Device Flag Assignment Id"); - } + .FirstOrDefault(a => a.Id == id) + ?? throw new Exception("Invalid Device Flag Assignment Id"); + + if (!assignment.CanEdit()) + throw new InvalidOperationException("Editing comments for device flags is denied"); + + assignment.OnEdit(comments, removeDate); + Database.SaveChanges(); + if (redirect.HasValue && redirect.Value) return Redirect($"{Url.Action(MVC.Device.Show(assignment.DeviceSerialNumber))}#DeviceDetailTab-Flags"); else @@ -52,43 +42,30 @@ namespace Disco.Web.Areas.API.Controllers } } - #region Update Shortcut Methods - [HttpPost, ValidateAntiForgeryToken] - public virtual ActionResult UpdateComments(int id, string Comments = null, bool? redirect = null) - { - return Update(id, pComments, Comments, redirect); - } - #endregion - - #region Update Properties - private void UpdateComments(DeviceFlagAssignment assignment, string comments) - { - if (!assignment.CanEdit()) - throw new InvalidOperationException("Editing comments for device flags is denied"); - - assignment.OnEdit(comments); - Database.SaveChanges(); - } - #endregion - #region Actions [HttpPost, ValidateAntiForgeryToken] - public virtual ActionResult AddDevice(int id, string deviceSerialNumber, string comments) + public virtual ActionResult AddDevice(int id, string deviceSerialNumber, string comments, DateTime? removeDate) { Database.Configuration.LazyLoadingEnabled = true; - var flag = Database.DeviceFlags.Find(id); - if (flag == null) - throw new ArgumentException("Invalid Device Flag Id", nameof(id)); + var flag = Database.DeviceFlags.Find(id) + ?? throw new ArgumentException("Invalid Device Flag Id", nameof(id)); - var device = Database.Devices.Include(u => u.DeviceFlagAssignments).FirstOrDefault(d => d.SerialNumber == deviceSerialNumber); - if (device == null) - throw new ArgumentException("Invalid Device Serial Number", nameof(deviceSerialNumber)); + var device = Database.Devices + .Include(u => u.DeviceFlagAssignments) + .FirstOrDefault(d => d.SerialNumber == deviceSerialNumber) + ?? throw new ArgumentException("Invalid Device Serial Number", nameof(deviceSerialNumber)); if (!device.CanAddDeviceFlag(flag)) return Unauthorized("Adding device flag is denied"); - var assignment = device.OnAddDeviceFlag(Database, flag, comments); + if (removeDate.HasValue && removeDate.Value < DateTime.Today.AddDays(1)) + removeDate = null; + + if (device.CanRemoveDeviceFlag(flag)) + device.OnAddDeviceFlag(Database, flag, comments, removeDate); + else + device.OnAddDeviceFlag(Database, flag, comments); Database.SaveChanges(); @@ -102,9 +79,8 @@ namespace Disco.Web.Areas.API.Controllers var assignment = Database.DeviceFlagAssignments .Include(a => a.DeviceFlag) - .FirstOrDefault(a => a.Id == id); - if (assignment == null) - throw new ArgumentException("Invalid Device Flag Assignment Id", nameof(id)); + .FirstOrDefault(a => a.Id == id) + ?? throw new ArgumentException("Invalid Device Flag Assignment Id", nameof(id)); if (!assignment.CanRemove()) return Unauthorized("Removing device flag assignment is denied"); diff --git a/Disco.Web/Areas/API/Controllers/DeviceFlagController.cs b/Disco.Web/Areas/API/Controllers/DeviceFlagController.cs index 3f4a5fad..a504b574 100644 --- a/Disco.Web/Areas/API/Controllers/DeviceFlagController.cs +++ b/Disco.Web/Areas/API/Controllers/DeviceFlagController.cs @@ -10,6 +10,7 @@ using Disco.Web.Areas.API.Models.Shared; using Disco.Web.Areas.Config.Models.DeviceFlag; using Disco.Web.Extensions; using System; +using System.ComponentModel.DataAnnotations; using System.Linq; using System.Web.Mvc; @@ -17,12 +18,13 @@ namespace Disco.Web.Areas.API.Controllers { public partial class DeviceFlagController : AuthorizedDatabaseController { - const string pName = "name"; - const string pDescription = "description"; - const string pIcon = "icon"; - const string pIconColour = "iconcolour"; - const string pOnAssignmentExpression = "onassignmentexpression"; - const string pOnUnassignmentExpression = "onunassignmentexpression"; + private const string pName = "name"; + private const string pDescription = "description"; + private const string pIcon = "icon"; + private const string pIconColour = "iconcolour"; + private const string pDefaultRemoveDays = "defaultremovedays"; + private const string pOnAssignmentExpression = "onassignmentexpression"; + private const string pOnUnassignmentExpression = "onunassignmentexpression"; [DiscoAuthorize(Claims.Config.DeviceFlag.Configure)] [HttpPost, ValidateAntiForgeryToken] @@ -53,6 +55,9 @@ namespace Disco.Web.Areas.API.Controllers case pIconColour: UpdateIconColour(flag, value); break; + case pDefaultRemoveDays: + UpdateDefaultRemoveDays(flag, value); + break; case pOnAssignmentExpression: UpdateOnAssignmentExpression(flag, value); break; @@ -143,6 +148,12 @@ namespace Disco.Web.Areas.API.Controllers } [DiscoAuthorize(Claims.Config.DeviceFlag.Configure)] [HttpPost, ValidateAntiForgeryToken] + public virtual ActionResult UpdateDefaultRemoveDays(int id, [Range(1, int.MaxValue)] int? defaultRemoveDays = null, bool? redirect = null) + { + return Update(id, pDefaultRemoveDays, defaultRemoveDays?.ToString(), redirect); + } + [DiscoAuthorize(Claims.Config.DeviceFlag.Configure)] + [HttpPost, ValidateAntiForgeryToken] public virtual ActionResult UpdateOnAssignmentExpression(int id, string OnAssignmentExpression = null, bool redirect = false) { return Update(id, pOnAssignmentExpression, OnAssignmentExpression, redirect); @@ -280,6 +291,23 @@ namespace Disco.Web.Areas.API.Controllers } } + private void UpdateDefaultRemoveDays(DeviceFlag deviceFlag, string defaultRemoveDays) + { + if (string.IsNullOrWhiteSpace(defaultRemoveDays)) + { + deviceFlag.DefaultRemoveDays = null; + } + else + { + if (!int.TryParse(defaultRemoveDays, out var days) || days < 1) + throw new ArgumentOutOfRangeException(nameof(defaultRemoveDays), "Unable to parse days"); + + deviceFlag.DefaultRemoveDays = days; + } + + DeviceFlagService.Update(Database, deviceFlag); + } + private void UpdateOnAssignmentExpression(DeviceFlag deviceFlag, string onAssignmentExpression) { if (string.IsNullOrWhiteSpace(onAssignmentExpression)) diff --git a/Disco.Web/Areas/API/Controllers/UserFlagAssignmentController.cs b/Disco.Web/Areas/API/Controllers/UserFlagAssignmentController.cs index 33752070..a89d2958 100644 --- a/Disco.Web/Areas/API/Controllers/UserFlagAssignmentController.cs +++ b/Disco.Web/Areas/API/Controllers/UserFlagAssignmentController.cs @@ -1,5 +1,4 @@ -using Disco.Models.Repository; -using Disco.Services; +using Disco.Services; using Disco.Services.Web; using System; using System.Data.Entity; @@ -10,34 +9,25 @@ namespace Disco.Web.Areas.API.Controllers { public partial class UserFlagAssignmentController : AuthorizedDatabaseController { - const string pComments = "comments"; [HttpPost, ValidateAntiForgeryToken] - public virtual ActionResult Update(int id, string key, string value = null, bool? redirect = null) + public virtual ActionResult Edit(int id, string comments, DateTime? removeDate, bool? redirect = null) { try { if (id < 0) throw new ArgumentOutOfRangeException(nameof(id)); - if (string.IsNullOrEmpty(key)) - throw new ArgumentNullException(nameof(key)); + var userFlagAssignment = Database.UserFlagAssignments .Include(a => a.UserFlag) - .FirstOrDefault(a => a.Id == id); - if (userFlagAssignment != null) - { - switch (key.ToLower()) - { - case pComments: - UpdateComments(userFlagAssignment, value); - break; - default: - throw new Exception("Invalid Update Key"); - } - } - else - { - throw new Exception("Invalid User Flag Assignment Id"); - } + .FirstOrDefault(a => a.Id == id) + ?? throw new Exception("Invalid User Flag Assignment Id"); + + if (!userFlagAssignment.CanEdit()) + throw new InvalidOperationException("Editing comments for user flags is denied"); + + userFlagAssignment.OnEdit(comments, removeDate); + Database.SaveChanges(); + if (redirect.HasValue && redirect.Value) return Redirect($"{Url.Action(MVC.User.Show(userFlagAssignment.UserId))}#UserDetailTab-Flags"); else @@ -52,44 +42,31 @@ namespace Disco.Web.Areas.API.Controllers } } - #region Update Shortcut Methods - [HttpPost, ValidateAntiForgeryToken] - public virtual ActionResult UpdateComments(int id, string Comments = null, bool? redirect = null) - { - return Update(id, pComments, Comments, redirect); - } - #endregion - - #region Update Properties - private void UpdateComments(UserFlagAssignment userFlagAssignment, string comments) - { - if (!userFlagAssignment.CanEdit()) - throw new InvalidOperationException("Editing comments for user flags is denied"); - - userFlagAssignment.OnEdit(comments); - Database.SaveChanges(); - } - #endregion - #region Actions [HttpPost, ValidateAntiForgeryToken] - public virtual ActionResult AddUser(int id, string UserId, string Comments) + public virtual ActionResult AddUser(int id, string UserId, string Comments, DateTime? RemoveDate) { Database.Configuration.LazyLoadingEnabled = true; - var userFlag = Database.UserFlags.Find(id); - if (userFlag == null) - throw new ArgumentException("Invalid User Flag Id", nameof(id)); + var userFlag = Database.UserFlags.Find(id) + ?? throw new ArgumentException("Invalid User Flag Id", nameof(id)); - var user = Database.Users.Include(u => u.UserFlagAssignments).FirstOrDefault(u => u.UserId == UserId); - if (user == null) - throw new ArgumentException("Invalid User Id", nameof(UserId)); + var user = Database.Users + .Include(u => u.UserFlagAssignments) + .FirstOrDefault(u => u.UserId == UserId) + ?? throw new ArgumentException("Invalid User Id", nameof(UserId)); if (!user.CanAddUserFlag(userFlag)) return Unauthorized("Adding user flag is denied"); - var userFlagAssignment = user.OnAddUserFlag(Database, userFlag, Comments); + if (RemoveDate.HasValue && RemoveDate.Value < DateTime.Today.AddDays(1)) + RemoveDate = null; + + if (user.CanRemoveUserFlag(userFlag)) + user.OnAddUserFlag(Database, userFlag, Comments, RemoveDate); + else + user.OnAddUserFlag(Database, userFlag, Comments); Database.SaveChanges(); @@ -103,9 +80,8 @@ namespace Disco.Web.Areas.API.Controllers var userFlagAssignment = Database.UserFlagAssignments .Include(a => a.UserFlag) - .FirstOrDefault(a => a.Id == id); - if (userFlagAssignment == null) - throw new ArgumentException("Invalid User Flag Assignment Id", nameof(id)); + .FirstOrDefault(a => a.Id == id) + ?? throw new ArgumentException("Invalid User Flag Assignment Id", nameof(id)); if (!userFlagAssignment.CanRemove()) return Unauthorized("Removing user flag assignment is denied"); diff --git a/Disco.Web/Areas/API/Controllers/UserFlagController.cs b/Disco.Web/Areas/API/Controllers/UserFlagController.cs index 1b7ec5ca..fa21d016 100644 --- a/Disco.Web/Areas/API/Controllers/UserFlagController.cs +++ b/Disco.Web/Areas/API/Controllers/UserFlagController.cs @@ -10,6 +10,7 @@ using Disco.Web.Areas.API.Models.Shared; using Disco.Web.Areas.Config.Models.UserFlag; using Disco.Web.Extensions; using System; +using System.ComponentModel.DataAnnotations; using System.Linq; using System.Web.Mvc; @@ -17,12 +18,13 @@ namespace Disco.Web.Areas.API.Controllers { public partial class UserFlagController : AuthorizedDatabaseController { - const string pName = "name"; - const string pDescription = "description"; - const string pIcon = "icon"; - const string pIconColour = "iconcolour"; - const string pOnAssignmentExpression = "onassignmentexpression"; - const string pOnUnassignmentExpression = "onunassignmentexpression"; + private const string pName = "name"; + private const string pDescription = "description"; + private const string pIcon = "icon"; + private const string pIconColour = "iconcolour"; + private const string pDefaultRemoveDays = "defaultremovedays"; + private const string pOnAssignmentExpression = "onassignmentexpression"; + private const string pOnUnassignmentExpression = "onunassignmentexpression"; [DiscoAuthorize(Claims.Config.UserFlag.Configure)] [HttpPost, ValidateAntiForgeryToken] @@ -53,6 +55,9 @@ namespace Disco.Web.Areas.API.Controllers case pIconColour: UpdateIconColour(flag, value); break; + case pDefaultRemoveDays: + UpdateDefaultRemoveDays(flag, value); + break; case pOnAssignmentExpression: UpdateOnAssignmentExpression(flag, value); break; @@ -143,6 +148,12 @@ namespace Disco.Web.Areas.API.Controllers } [DiscoAuthorize(Claims.Config.UserFlag.Configure)] [HttpPost, ValidateAntiForgeryToken] + public virtual ActionResult UpdateDefaultRemoveDays(int id, [Range(1, int.MaxValue)] int? defaultRemoveDays = null, bool? redirect = null) + { + return Update(id, pDefaultRemoveDays, defaultRemoveDays?.ToString(), redirect); + } + [DiscoAuthorize(Claims.Config.UserFlag.Configure)] + [HttpPost, ValidateAntiForgeryToken] public virtual ActionResult UpdateOnAssignmentExpression(int id, string OnAssignmentExpression = null, bool redirect = false) { return Update(id, pOnAssignmentExpression, OnAssignmentExpression, redirect); @@ -280,6 +291,23 @@ namespace Disco.Web.Areas.API.Controllers } } + private void UpdateDefaultRemoveDays(UserFlag userFlag, string defaultRemoveDays) + { + if (string.IsNullOrWhiteSpace(defaultRemoveDays)) + { + userFlag.DefaultRemoveDays = null; + } + else + { + if (!int.TryParse(defaultRemoveDays, out var days) || days < 1) + throw new ArgumentOutOfRangeException(nameof(defaultRemoveDays), "Unable to parse days"); + + userFlag.DefaultRemoveDays = days; + } + + UserFlagService.Update(Database, userFlag); + } + private void UpdateOnAssignmentExpression(UserFlag UserFlag, string OnAssignmentExpression) { if (string.IsNullOrWhiteSpace(OnAssignmentExpression)) diff --git a/Disco.Web/Areas/Config/Views/DeviceFlag/Index.cshtml b/Disco.Web/Areas/Config/Views/DeviceFlag/Index.cshtml index c85aaf08..7acf4468 100644 --- a/Disco.Web/Areas/Config/Views/DeviceFlag/Index.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceFlag/Index.cshtml @@ -3,7 +3,7 @@ Authorization.Require(Claims.Config.DeviceFlag.Show); ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Flags"); var showTags = Model.DeviceFlags.Keys.Any(i => i.DevicesLinkedGroup != null || i.DeviceUsersLinkedGroup != null || - i.OnAssignmentExpression != null || i.OnUnassignmentExpression != null); + i.OnAssignmentExpression != null || i.OnUnassignmentExpression != null || i.DefaultRemoveDays.HasValue); }
@if (Model.DeviceFlags.Count == 0) @@ -59,6 +59,10 @@ { } + @if (item.DefaultRemoveDays.HasValue) + { + + } } diff --git a/Disco.Web/Areas/Config/Views/DeviceFlag/Index.generated.cs b/Disco.Web/Areas/Config/Views/DeviceFlag/Index.generated.cs index fb825bde..5439017e 100644 --- a/Disco.Web/Areas/Config/Views/DeviceFlag/Index.generated.cs +++ b/Disco.Web/Areas/Config/Views/DeviceFlag/Index.generated.cs @@ -49,7 +49,7 @@ namespace Disco.Web.Areas.Config.Views.DeviceFlag Authorization.Require(Claims.Config.DeviceFlag.Show); ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Flags"); var showTags = Model.DeviceFlags.Keys.Any(i => i.DevicesLinkedGroup != null || i.DeviceUsersLinkedGroup != null || - i.OnAssignmentExpression != null || i.OnUnassignmentExpression != null); + i.OnAssignmentExpression != null || i.OnUnassignmentExpression != null || i.DefaultRemoveDays.HasValue); #line default @@ -141,37 +141,37 @@ WriteLiteral(" \r\n"); #line hidden WriteLiteral(" \r\n \r\n (Url.Action(MVC.Config.DeviceFlag.Index(item.Id)) +, Tuple.Create(Tuple.Create("", 1268), Tuple.Create(Url.Action(MVC.Config.DeviceFlag.Index(item.Id)) #line default #line hidden -, 1236), false) +, 1268), false) ); WriteLiteral(">\r\n (item.Icon +, Tuple.Create(Tuple.Create("", 1365), Tuple.Create(item.Icon #line default #line hidden -, 1333), false) -, Tuple.Create(Tuple.Create(" ", 1345), Tuple.Create("fa-lg", 1346), true) -, Tuple.Create(Tuple.Create(" ", 1351), Tuple.Create("d-", 1352), true) +, 1365), false) +, Tuple.Create(Tuple.Create(" ", 1377), Tuple.Create("fa-lg", 1378), true) +, Tuple.Create(Tuple.Create(" ", 1383), Tuple.Create("d-", 1384), true) #line 34 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" -, Tuple.Create(Tuple.Create("", 1354), Tuple.Create(item.IconColour +, Tuple.Create(Tuple.Create("", 1386), Tuple.Create(item.IconColour #line default #line hidden -, 1354), false) +, 1386), false) ); WriteLiteral(">\r\n"); @@ -313,12 +313,37 @@ WriteLiteral(">\r\n"); } + #line default + #line hidden +WriteLiteral(" "); + + + #line 62 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" + if (item.DefaultRemoveDays.HasValue) + { + + + #line default + #line hidden +WriteLiteral(" \r\n"); + + + #line 65 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" + } + + #line default #line hidden WriteLiteral(" \r\n"); - #line 63 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" + #line 67 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" } @@ -327,7 +352,7 @@ WriteLiteral(" \r\n"); WriteLiteral(" \r\n"); - #line 65 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" + #line 69 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" } @@ -336,7 +361,7 @@ WriteLiteral(" \r\n"); WriteLiteral(" \r\n"); - #line 67 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" + #line 71 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" } @@ -349,13 +374,13 @@ WriteLiteral(" class=\"actionBar\""); WriteLiteral(">\r\n"); - #line 69 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" + #line 73 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" #line default #line hidden - #line 69 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" + #line 73 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" if (Authorization.Has(Claims.Config.DeviceFlag.Export) && Model.DeviceFlags.Count > 0) { @@ -363,14 +388,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 71 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" + #line 75 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" Write(Html.ActionLinkButton("Export", MVC.Config.DeviceFlag.Export())); #line default #line hidden - #line 71 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" + #line 75 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" } @@ -380,7 +405,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 73 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" + #line 77 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" if (Authorization.Has(Claims.Config.DeviceFlag.Create)) { @@ -388,14 +413,14 @@ WriteLiteral(" "); #line default #line hidden - #line 75 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" + #line 79 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" Write(Html.ActionLinkButton("Create Device Flag", MVC.Config.DeviceFlag.Create())); #line default #line hidden - #line 75 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" + #line 79 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml" } diff --git a/Disco.Web/Areas/Config/Views/DeviceFlag/Show.cshtml b/Disco.Web/Areas/Config/Views/DeviceFlag/Show.cshtml index d82d9d12..4ccecfea 100644 --- a/Disco.Web/Areas/Config/Views/DeviceFlag/Show.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceFlag/Show.cshtml @@ -212,6 +212,50 @@ } + + + Scheduled Unassignment: + + + @if (canConfig) + { + + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() + @:days + + } + else + { + if (Model.DeviceFlag.DefaultRemoveDays.HasValue) + { + @Model.DeviceFlag.DefaultRemoveDays days + } + else + { + Not Enabled + } + } +
+

+ + Optionally specify the number of days a flag is removed from a device. + If one (1), the flag will be removed that night (midnight).
+ If the user has permission, the date can be adjusted when assigning the flag. + Changing this value does not affect existing assignments. +

+
+ + @if (hideAdvanced) { diff --git a/Disco.Web/Areas/Config/Views/DeviceFlag/Show.generated.cs b/Disco.Web/Areas/Config/Views/DeviceFlag/Show.generated.cs index b0b3e335..88c93926 100644 --- a/Disco.Web/Areas/Config/Views/DeviceFlag/Show.generated.cs +++ b/Disco.Web/Areas/Config/Views/DeviceFlag/Show.generated.cs @@ -724,16 +724,181 @@ WriteLiteral("
\r\n #line default #line hidden -WriteLiteral(" \r\n \r\n"); +WriteLiteral(" \r\n \r\n \r\n \r\n " + +" Scheduled Unassignment:\r\n \r\n \r\n"); - #line 215 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 220 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + + + #line default + #line hidden + + #line 220 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + if (canConfig) + { + + + #line default + #line hidden +WriteLiteral(" (int.MaxValue + + #line default + #line hidden +, 10548), false) +); + +WriteAttribute("value", Tuple.Create(" value=\"", 10562), Tuple.Create("\"", 10605) + + #line 222 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + , Tuple.Create(Tuple.Create("", 10570), Tuple.Create(Model.DeviceFlag.DefaultRemoveDays + + #line default + #line hidden +, 10570), false) +); + +WriteLiteral(" />\r\n"); + + + #line 223 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + + + #line default + #line hidden + + #line 223 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden + + #line 223 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + + + + #line default + #line hidden + + #line 224 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden + + #line 224 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + + + + #line default + #line hidden +WriteLiteral(" "); + +WriteLiteral("days\r\n"); + +WriteLiteral(" \r\n $(function () {\r\n document.DiscoFunctions.P" + +"ropertyChangeHelper(\r\n $(\'#DeviceFlag_DefaultRemoveDays\')" + +",\r\n \'Invalid Value\',\r\n \'"); + + + #line 231 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + Write(Url.Action(MVC.API.DeviceFlag.UpdateDefaultRemoveDays(Model.DeviceFlag.Id))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'defaultRemoveDays\'\r\n );\r\n " + +" });\r\n \r\n"); + + + #line 236 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + } + else + { + if (Model.DeviceFlag.DefaultRemoveDays.HasValue) + { + + + #line default + #line hidden +WriteLiteral(" "); + + + #line 241 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + Write(Model.DeviceFlag.DefaultRemoveDays); + + + #line default + #line hidden +WriteLiteral(" days\r\n"); + + + #line 242 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + } + else + { + + + #line default + #line hidden +WriteLiteral(" Not Enabled\r\n"); + + + #line 246 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + } + } + + + #line default + #line hidden +WriteLiteral(" \r\n \r\n + Optionally specify the number of days a flag is removed from a device. + If one (1), the flag will be removed that night (midnight).
+ If the user has permission, the date can be adjusted when assigning the flag. + Changing this value does not affect existing assignments. +

+ + + +"); + + + #line 259 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 215 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 259 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (hideAdvanced) { @@ -767,7 +932,7 @@ WriteLiteral(@">Show Advanced Options "); - #line 231 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 275 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -781,13 +946,13 @@ WriteLiteral(">\r\n \r\n Assignment Permission
\r\n \r\n"); - #line 238 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 282 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 238 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 282 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (!Model.Permission.IsDefault()) { var permission = Model.Permission; @@ -798,13 +963,13 @@ WriteLiteral(">\r\n \r\n Assignment Permission
\r\n"); - #line 242 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 286 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 242 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 286 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (permission.Inherit) { @@ -818,7 +983,7 @@ WriteLiteral(" class=\"fa fa-check-square-o\""); WriteLiteral("> Inheriting from Authorization Roles\r\n"); - #line 245 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 289 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } else { @@ -833,7 +998,7 @@ WriteLiteral(" class=\"fa fa-square-o\""); WriteLiteral("> Authorization Roles are Ignored\r\n"); - #line 249 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 293 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -842,7 +1007,7 @@ WriteLiteral("> Authorization Roles are Ignored\r\n"); WriteLiteral(" \r\n"); - #line 251 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 295 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (!permission.HasSubjects()) { @@ -856,7 +1021,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral(">There are no users/groups associated with this permission override\r\n"); - #line 254 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 298 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } else { @@ -880,13 +1045,13 @@ WriteLiteral(@"> "); - #line 266 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 310 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 266 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 310 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" foreach (var subjectId in permission.CanShowSubjectIds) { @@ -897,13 +1062,13 @@ WriteLiteral(" \r\n " \r\n"); - #line 270 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 314 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 270 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 314 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" int roleId; if (subjectId.StartsWith("[") && int.TryParse(subjectId.Trim('[', ']'), out roleId)) @@ -915,7 +1080,7 @@ WriteLiteral(" \r\n WriteLiteral(" "); - #line 274 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 318 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Disco.Services.Users.UserService.GetAuthorizationRoleName(roleId)); @@ -924,7 +1089,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 274 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 318 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(subjectId); @@ -933,7 +1098,7 @@ WriteLiteral(" "); WriteLiteral("\r\n"); - #line 275 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 319 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } else { @@ -944,7 +1109,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 278 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 322 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(subjectId); @@ -953,7 +1118,7 @@ WriteLiteral(" "); WriteLiteral("\r\n"); - #line 279 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 323 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -963,7 +1128,7 @@ WriteLiteral("\r\n \r\n " \r\n"); - #line 283 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 327 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -988,7 +1153,7 @@ WriteLiteral("> All users/groups/roles can view, assign, edit assignments, a " \r\n"); - #line 291 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 335 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } else { @@ -1015,13 +1180,13 @@ WriteLiteral(@"> "); - #line 306 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 350 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 306 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 350 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" foreach (var subjectId in subjects.OrderBy(s => s)) { @@ -1036,7 +1201,7 @@ WriteLiteral(" class=\"fa\""); WriteLiteral("> "); - #line 310 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 354 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" int roleId; if (subjectId.StartsWith("[") && int.TryParse(subjectId.Trim('[', ']'), out roleId)) @@ -1048,7 +1213,7 @@ WriteLiteral("> "); WriteLiteral(" "); - #line 314 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 358 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Disco.Services.Users.UserService.GetAuthorizationRoleName(roleId)); @@ -1057,7 +1222,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 314 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 358 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(subjectId); @@ -1066,7 +1231,7 @@ WriteLiteral(" "); WriteLiteral("\r\n"); - #line 315 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 359 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } else { @@ -1077,7 +1242,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 318 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 362 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(subjectId); @@ -1086,7 +1251,7 @@ WriteLiteral(" "); WriteLiteral("\r\n"); - #line 319 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 363 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -1096,13 +1261,13 @@ WriteLiteral("\r\n \r\n " \r\n"); - #line 323 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 367 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 323 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 367 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (permission.CanShowSubjectIds.Contains(subjectId)) { @@ -1116,7 +1281,7 @@ WriteLiteral(" class=\"fa fa-fw fa-check\""); WriteLiteral(">\r\n"); - #line 326 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 370 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -1126,13 +1291,13 @@ WriteLiteral(" \r\n " \r\n"); - #line 329 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 373 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 329 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 373 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (permission.CanAssignSubjectIds.Contains(subjectId)) { @@ -1146,7 +1311,7 @@ WriteLiteral(" class=\"fa fa-fw fa-check\""); WriteLiteral(">\r\n"); - #line 332 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 376 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -1156,13 +1321,13 @@ WriteLiteral(" \r\n " \r\n"); - #line 335 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 379 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 335 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 379 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (permission.CanEditSubjectIds.Contains(subjectId)) { @@ -1176,7 +1341,7 @@ WriteLiteral(" class=\"fa fa-fw fa-check\""); WriteLiteral(">\r\n"); - #line 338 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 382 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -1186,13 +1351,13 @@ WriteLiteral(" \r\n " \r\n"); - #line 341 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 385 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 341 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 385 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (permission.CanRemoveSubjectIds.Contains(subjectId)) { @@ -1206,7 +1371,7 @@ WriteLiteral(" class=\"fa fa-fw fa-check\""); WriteLiteral(">\r\n"); - #line 344 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 388 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -1216,7 +1381,7 @@ WriteLiteral(" \r\n " \r\n"); - #line 347 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 391 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -1225,7 +1390,7 @@ WriteLiteral(" \r\n WriteLiteral(" \r\n \r\n"); - #line 350 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 394 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } } @@ -1237,7 +1402,7 @@ WriteLiteral(" \r\n WriteLiteral(" "); - #line 354 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 398 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (canConfig) { var permission = Model.Permission; @@ -1254,7 +1419,7 @@ WriteLiteral(" class=\"button small\""); WriteLiteral(">"); - #line 357 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 401 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(permission.IsDefault() ? "Override" : "Edit"); @@ -1263,7 +1428,7 @@ WriteLiteral(">"); WriteLiteral(" Permission\r\n"); - #line 358 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 402 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" @@ -1280,13 +1445,13 @@ WriteLiteral(" title=\"Flag Assignment Permission Override\""); WriteLiteral(">\r\n"); - #line 360 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 404 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 360 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 404 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" using (Html.BeginForm(MVC.API.DeviceFlag.Permission(Model.DeviceFlag.Id))) { @@ -1294,14 +1459,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 362 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 406 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 362 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 406 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" @@ -1335,7 +1500,7 @@ WriteLiteral(" value=\"true\""); WriteLiteral(" "); - #line 366 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 410 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(permission.Inherit ? "checked" : null); @@ -1366,13 +1531,13 @@ WriteLiteral(@"> "); - #line 381 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 425 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 381 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 425 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" var subjects = permission.AllSubjects(); @@ -1387,7 +1552,7 @@ WriteLiteral(" "); - #line 387 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 431 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(subjectId); @@ -1419,20 +1584,20 @@ WriteLiteral(" type=\"checkbox\""); WriteLiteral(" name=\"CanShow\""); -WriteAttribute("value", Tuple.Create(" value=\"", 20122), Tuple.Create("\"", 20140) +WriteAttribute("value", Tuple.Create(" value=\"", 22061), Tuple.Create("\"", 22079) - #line 389 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" - , Tuple.Create(Tuple.Create("", 20130), Tuple.Create(subjectId + #line 433 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + , Tuple.Create(Tuple.Create("", 22069), Tuple.Create(subjectId #line default #line hidden -, 20130), false) +, 22069), false) ); WriteLiteral(" "); - #line 389 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 433 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(permission.CanShowSubjectIds.Contains(subjectId) ? " checked" : null); @@ -1446,20 +1611,20 @@ WriteLiteral(" type=\"checkbox\""); WriteLiteral(" name=\"CanAssign\""); -WriteAttribute("value", Tuple.Create(" value=\"", 20430), Tuple.Create("\"", 20448) +WriteAttribute("value", Tuple.Create(" value=\"", 22369), Tuple.Create("\"", 22387) - #line 392 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" - , Tuple.Create(Tuple.Create("", 20438), Tuple.Create(subjectId + #line 436 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + , Tuple.Create(Tuple.Create("", 22377), Tuple.Create(subjectId #line default #line hidden -, 20438), false) +, 22377), false) ); WriteLiteral(" "); - #line 392 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 436 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(permission.CanAssignSubjectIds.Contains(subjectId) ? " checked" : null); @@ -1473,20 +1638,20 @@ WriteLiteral(" type=\"checkbox\""); WriteLiteral(" name=\"CanEdit\""); -WriteAttribute("value", Tuple.Create(" value=\"", 20738), Tuple.Create("\"", 20756) +WriteAttribute("value", Tuple.Create(" value=\"", 22677), Tuple.Create("\"", 22695) - #line 395 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" - , Tuple.Create(Tuple.Create("", 20746), Tuple.Create(subjectId + #line 439 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + , Tuple.Create(Tuple.Create("", 22685), Tuple.Create(subjectId #line default #line hidden -, 20746), false) +, 22685), false) ); WriteLiteral(" "); - #line 395 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 439 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(permission.CanEditSubjectIds.Contains(subjectId) ? " checked" : null); @@ -1500,20 +1665,20 @@ WriteLiteral(" type=\"checkbox\""); WriteLiteral(" name=\"CanRemove\""); -WriteAttribute("value", Tuple.Create(" value=\"", 21046), Tuple.Create("\"", 21064) +WriteAttribute("value", Tuple.Create(" value=\"", 22985), Tuple.Create("\"", 23003) - #line 398 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" - , Tuple.Create(Tuple.Create("", 21054), Tuple.Create(subjectId + #line 442 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + , Tuple.Create(Tuple.Create("", 22993), Tuple.Create(subjectId #line default #line hidden -, 21054), false) +, 22993), false) ); WriteLiteral(" "); - #line 398 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 442 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(permission.CanRemoveSubjectIds.Contains(subjectId) ? " checked" : null); @@ -1523,7 +1688,7 @@ WriteLiteral(" />\r\n \r " \r\n"); - #line 401 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 445 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -1543,7 +1708,7 @@ WriteLiteral(" placeholder=\"Search Users/Groups/Roles\""); WriteLiteral(" data-autocompleteurl=\""); - #line 407 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 451 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Url.Action(MVC.API.System.SearchSubjects(null, includeAuthorizationRoles: true))); @@ -1562,7 +1727,7 @@ WriteLiteral(" class=\"button small\""); WriteLiteral(" data-subjecturl=\""); - #line 408 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 452 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Url.Action(MVC.API.System.Subject(null, includeAuthorizationRoles: true))); @@ -1573,7 +1738,7 @@ WriteLiteral("\""); WriteLiteral(">Add\r\n \r\n"); - #line 410 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 454 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -1695,7 +1860,7 @@ WriteLiteral(" \r\n"); - #line 549 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 593 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -1716,13 +1881,13 @@ WriteLiteral(" class=\"fa fa-fw fa-info-circle\""); WriteLiteral("> Flag actions are normally authorized globally by\r\n"); - #line 553 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 597 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 553 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 597 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (Authorization.Has(Claims.DiscoAdminAccount)) { @@ -1731,20 +1896,20 @@ WriteLiteral("> Flag actions are normally authorized globally by\r\n"); #line hidden WriteLiteral(" (Url.Action(MVC.Config.AuthorizationRole.Index(null)) + #line 599 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" +, Tuple.Create(Tuple.Create("", 33276), Tuple.Create(Url.Action(MVC.Config.AuthorizationRole.Index(null)) #line default #line hidden -, 31337), false) +, 33276), false) ); WriteLiteral(">Authorization Roles.\r\n"); - #line 556 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 600 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } else { @@ -1755,7 +1920,7 @@ WriteLiteral(">Authorization Roles.\r\n"); WriteLiteral(" Authorization Roles.\r\n"); - #line 560 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 604 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -1771,13 +1936,13 @@ WriteLiteral(">\r\n \r\n On Assignment
Expres "\r\n \r\n"); - #line 571 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 615 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 571 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 615 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (canConfig) { @@ -1785,56 +1950,56 @@ WriteLiteral(">\r\n \r\n On Assignment
Expres #line default #line hidden - #line 573 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 617 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Html.EditorFor(model => model.DeviceFlag.OnAssignmentExpression)); #line default #line hidden - #line 573 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 617 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 574 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 618 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(AjaxHelpers.AjaxRemove()); #line default #line hidden - #line 574 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 618 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 575 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 619 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden - #line 575 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 619 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 576 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 620 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden - #line 576 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 620 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" @@ -1856,7 +2021,7 @@ WriteLiteral(@"> '"); - #line 586 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 630 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Url.Action(MVC.API.DeviceFlag.UpdateOnAssignmentExpression(Model.DeviceFlag.Id))); @@ -1884,7 +2049,7 @@ WriteLiteral("\',\r\n \'OnAssignmentExpressio " \r\n"); - #line 615 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 659 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } else { @@ -1901,7 +2066,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral("><None Specified>
\r\n"); - #line 621 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 665 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } else { @@ -1918,7 +2083,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 625 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 669 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Model.DeviceFlag.OnAssignmentExpression); @@ -1927,7 +2092,7 @@ WriteLiteral(" "); WriteLiteral("\r\n \r\n"); - #line 627 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 671 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } } @@ -1957,13 +2122,13 @@ WriteLiteral(">\r\n \r\n On Unassignment
Expr " \r\n \r\n"); - #line 641 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 685 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 641 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 685 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (canConfig) { @@ -1971,56 +2136,56 @@ WriteLiteral(">\r\n \r\n On Unassignment
Expr #line default #line hidden - #line 643 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 687 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Html.EditorFor(model => model.DeviceFlag.OnUnassignmentExpression)); #line default #line hidden - #line 643 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 687 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 644 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 688 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(AjaxHelpers.AjaxRemove()); #line default #line hidden - #line 644 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 688 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 645 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 689 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden - #line 645 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 689 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 646 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 690 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden - #line 646 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 690 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" @@ -2042,7 +2207,7 @@ WriteLiteral(@"> '"); - #line 656 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 700 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Url.Action(MVC.API.DeviceFlag.UpdateOnUnassignmentExpression(Model.DeviceFlag.Id))); @@ -2080,7 +2245,7 @@ WriteLiteral(@"', "); - #line 685 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 729 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } else { @@ -2097,7 +2262,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral("><None Specified>
\r\n"); - #line 691 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 735 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } else { @@ -2114,7 +2279,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 695 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 739 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Model.DeviceFlag.OnUnassignmentExpression); @@ -2123,7 +2288,7 @@ WriteLiteral(" "); WriteLiteral("\r\n \r\n"); - #line 697 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 741 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } } @@ -2155,7 +2320,7 @@ WriteLiteral(">\r\n \r\n Linked Groups:\r\n WriteLiteral(" "); - #line 713 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 757 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel() { CanConfigure = canConfig, @@ -2174,7 +2339,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 722 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 766 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel() { CanConfigure = canConfig, @@ -2191,13 +2356,13 @@ WriteLiteral(" "); WriteLiteral("\r\n"); - #line 731 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 775 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 731 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 775 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (canConfig) { @@ -2205,14 +2370,14 @@ WriteLiteral("\r\n"); #line default #line hidden - #line 733 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 777 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared)); #line default #line hidden - #line 733 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 777 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -2222,7 +2387,7 @@ WriteLiteral("\r\n"); WriteLiteral(" \r\n \r\n \r\n \r\n\r\n"); - #line 740 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 784 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (canBulkAssignment || canDelete || canShowDevices || canExportCurrent || canExportAll) { @@ -2236,13 +2401,13 @@ WriteLiteral(" class=\"actionBar\""); WriteLiteral(">\r\n"); - #line 743 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 787 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 743 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 787 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (canExportCurrent) { @@ -2250,14 +2415,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 745 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 789 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Html.ActionLinkButton("Export Current Assignments", MVC.Config.DeviceFlag.Export(null, Model.DeviceFlag.Id, true), "Config_DeviceFlags_Actions_ExportCurrent_Button")); #line default #line hidden - #line 745 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 789 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -2267,7 +2432,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 747 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 791 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (canExportAll) { @@ -2275,14 +2440,14 @@ WriteLiteral(" "); #line default #line hidden - #line 749 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 793 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Html.ActionLinkButton("Export All Assignments", MVC.Config.DeviceFlag.Export(null, Model.DeviceFlag.Id, false), "Config_DeviceFlags_Actions_ExportAll_Button")); #line default #line hidden - #line 749 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 793 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -2292,7 +2457,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 751 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 795 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (canBulkAssignment) { @@ -2360,7 +2525,7 @@ WriteLiteral(" title=\"Bulk Assign Devices\""); WriteLiteral(" data-assignedurl=\""); - #line 774 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 818 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Url.Action(MVC.API.DeviceFlag.AssignedDevices(Model.DeviceFlag.Id))); @@ -2397,7 +2562,7 @@ WriteLiteral(" method=\"post\""); WriteLiteral(" data-overrideaction=\""); - #line 783 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 827 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Url.Action(MVC.API.DeviceFlag.BulkAssignDevices(Model.DeviceFlag.Id, true))); @@ -2408,7 +2573,7 @@ WriteLiteral("\""); WriteLiteral(" data-addaction=\""); - #line 783 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 827 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Url.Action(MVC.API.DeviceFlag.BulkAssignDevices(Model.DeviceFlag.Id, false))); @@ -2421,7 +2586,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 784 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 828 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Html.AntiForgeryToken()); @@ -2502,7 +2667,7 @@ WriteLiteral(" + } + else + { + if (Model.UserFlag.DefaultRemoveDays.HasValue) + { + @Model.UserFlag.DefaultRemoveDays days + } + else + { + Not Enabled + } + } +
+

+ + Optionally specify the number of days a flag is removed from a user. + If one (1), the flag will be removed that night (midnight).
+ If the user has permission, the date can be adjusted when assigning the flag. + Changing this value does not affect existing assignments. +

+
+ + @if (hideAdvanced) { diff --git a/Disco.Web/Areas/Config/Views/UserFlag/Show.generated.cs b/Disco.Web/Areas/Config/Views/UserFlag/Show.generated.cs index 78f55638..da9815c8 100644 --- a/Disco.Web/Areas/Config/Views/UserFlag/Show.generated.cs +++ b/Disco.Web/Areas/Config/Views/UserFlag/Show.generated.cs @@ -723,16 +723,184 @@ WriteLiteral(" \r\n #line default #line hidden -WriteLiteral(" \r\n \r\n"); +WriteLiteral(" \r\n \r\n \r\n \r\n " + +" Default Assignment Removal:\r\n \r\n \r\n"); - #line 216 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 221 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + + + #line default + #line hidden + + #line 221 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + if (canConfig) + { + + + #line default + #line hidden +WriteLiteral(" (int.MaxValue + + #line default + #line hidden +, 10523), false) +); + +WriteAttribute("value", Tuple.Create(" value=\"", 10537), Tuple.Create("\"", 10578) + + #line 223 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + , Tuple.Create(Tuple.Create("", 10545), Tuple.Create(Model.UserFlag.DefaultRemoveDays + + #line default + #line hidden +, 10545), false) +); + +WriteLiteral(" />\r\n"); + + + #line 224 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + + + #line default + #line hidden + + #line 224 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden + + #line 224 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + + + + #line default + #line hidden + + #line 225 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden + + #line 225 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + + + + #line default + #line hidden +WriteLiteral(" "); + +WriteLiteral("days\r\n"); + +WriteLiteral(" + $(function () { + document.DiscoFunctions.PropertyChangeHelper( + $('#UserFlag_DefaultRemoveDays'), + 'Invalid Value', + '"); + + + #line 232 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + Write(Url.Action(MVC.API.UserFlag.UpdateDefaultRemoveDays(Model.UserFlag.Id))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'defaultRemoveDays\'\r\n " + +" );\r\n });\r\n \r\n"); + + + #line 237 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + } + else + { + if (Model.UserFlag.DefaultRemoveDays.HasValue) + { + + + #line default + #line hidden +WriteLiteral(" "); + + + #line 242 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + Write(Model.UserFlag.DefaultRemoveDays); + + + #line default + #line hidden +WriteLiteral(" days\r\n"); + + + #line 243 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + } + else + { + + + #line default + #line hidden +WriteLiteral(" Not Enabled\r\n"); + + + #line 247 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + } + } + + + #line default + #line hidden +WriteLiteral(" \r\n \r\n + Optionally specify the number of days a flag is removed from a user. + If one (1), the flag will be removed that night (midnight).
+ If the user has permission, the date can be adjusted when assigning the flag. + Changing this value does not affect existing assignments. +

+ + + +"); + + + #line 260 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 216 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 260 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (hideAdvanced) { @@ -766,7 +934,7 @@ WriteLiteral(@">Show Advanced Options "); - #line 232 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 276 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -780,13 +948,13 @@ WriteLiteral(">\r\n \r\n Assignment Permission
\r\n \r\n"); - #line 239 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 283 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 239 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 283 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (!Model.Permission.IsDefault()) { var permission = Model.Permission; @@ -797,13 +965,13 @@ WriteLiteral(">\r\n \r\n Assignment Permission
\r\n"); - #line 243 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 287 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 243 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 287 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (permission.Inherit) { @@ -817,7 +985,7 @@ WriteLiteral(" class=\"fa fa-check-square-o\""); WriteLiteral("> Inheriting from Authorization Roles\r\n"); - #line 246 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 290 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } else { @@ -832,7 +1000,7 @@ WriteLiteral(" class=\"fa fa-square-o\""); WriteLiteral("> Authorization Roles are Ignored\r\n"); - #line 250 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 294 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -841,7 +1009,7 @@ WriteLiteral("> Authorization Roles are Ignored\r\n"); WriteLiteral(" \r\n"); - #line 252 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 296 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (!permission.HasSubjects()) { @@ -855,7 +1023,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral(">There are no users/groups associated with this permission override\r\n"); - #line 255 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 299 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } else { @@ -879,13 +1047,13 @@ WriteLiteral(@"> "); - #line 267 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 311 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 267 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 311 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" foreach (var subjectId in permission.CanShowSubjectIds) { @@ -896,13 +1064,13 @@ WriteLiteral(" \r\n " \r\n"); - #line 271 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 315 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 271 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 315 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" int roleId; if (subjectId.StartsWith("[") && int.TryParse(subjectId.Trim('[', ']'), out roleId)) @@ -914,7 +1082,7 @@ WriteLiteral(" \r\n WriteLiteral(" "); - #line 275 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 319 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Disco.Services.Users.UserService.GetAuthorizationRoleName(roleId)); @@ -923,7 +1091,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 275 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 319 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(subjectId); @@ -932,7 +1100,7 @@ WriteLiteral(" "); WriteLiteral("\r\n"); - #line 276 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 320 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } else { @@ -943,7 +1111,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 279 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 323 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(subjectId); @@ -952,7 +1120,7 @@ WriteLiteral(" "); WriteLiteral("\r\n"); - #line 280 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 324 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -962,7 +1130,7 @@ WriteLiteral("\r\n \r\n " \r\n"); - #line 284 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 328 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -987,7 +1155,7 @@ WriteLiteral("> All users/groups/roles can view, assign, edit assignments, a " \r\n"); - #line 292 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 336 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } else { @@ -1014,13 +1182,13 @@ WriteLiteral(@"> "); - #line 307 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 351 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 307 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 351 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" foreach (var subjectId in subjects.OrderBy(s => s)) { @@ -1035,7 +1203,7 @@ WriteLiteral(" class=\"fa\""); WriteLiteral("> "); - #line 311 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 355 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" int roleId; if (subjectId.StartsWith("[") && int.TryParse(subjectId.Trim('[', ']'), out roleId)) @@ -1047,7 +1215,7 @@ WriteLiteral("> "); WriteLiteral(" "); - #line 315 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 359 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Disco.Services.Users.UserService.GetAuthorizationRoleName(roleId)); @@ -1056,7 +1224,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 315 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 359 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(subjectId); @@ -1065,7 +1233,7 @@ WriteLiteral(" "); WriteLiteral("\r\n"); - #line 316 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 360 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } else { @@ -1076,7 +1244,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 319 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 363 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(subjectId); @@ -1085,7 +1253,7 @@ WriteLiteral(" "); WriteLiteral("\r\n"); - #line 320 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 364 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -1095,13 +1263,13 @@ WriteLiteral("\r\n \r\n " \r\n"); - #line 324 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 368 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 324 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 368 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (permission.CanShowSubjectIds.Contains(subjectId)) { @@ -1115,7 +1283,7 @@ WriteLiteral(" class=\"fa fa-fw fa-check\""); WriteLiteral(">\r\n"); - #line 327 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 371 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -1125,13 +1293,13 @@ WriteLiteral(" \r\n " \r\n"); - #line 330 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 374 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 330 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 374 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (permission.CanAssignSubjectIds.Contains(subjectId)) { @@ -1145,7 +1313,7 @@ WriteLiteral(" class=\"fa fa-fw fa-check\""); WriteLiteral(">\r\n"); - #line 333 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 377 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -1155,13 +1323,13 @@ WriteLiteral(" \r\n " \r\n"); - #line 336 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 380 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 336 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 380 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (permission.CanEditSubjectIds.Contains(subjectId)) { @@ -1175,7 +1343,7 @@ WriteLiteral(" class=\"fa fa-fw fa-check\""); WriteLiteral(">\r\n"); - #line 339 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 383 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -1185,13 +1353,13 @@ WriteLiteral(" \r\n " \r\n"); - #line 342 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 386 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 342 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 386 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (permission.CanRemoveSubjectIds.Contains(subjectId)) { @@ -1205,7 +1373,7 @@ WriteLiteral(" class=\"fa fa-fw fa-check\""); WriteLiteral(">\r\n"); - #line 345 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 389 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -1215,7 +1383,7 @@ WriteLiteral(" \r\n " \r\n"); - #line 348 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 392 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -1224,7 +1392,7 @@ WriteLiteral(" \r\n WriteLiteral(" \r\n \r\n"); - #line 351 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 395 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } } @@ -1236,7 +1404,7 @@ WriteLiteral(" \r\n WriteLiteral(" "); - #line 355 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 399 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (canConfig) { var permission = Model.Permission; @@ -1253,7 +1421,7 @@ WriteLiteral(" class=\"button small\""); WriteLiteral(">"); - #line 358 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 402 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(permission.IsDefault() ? "Override" : "Edit"); @@ -1262,7 +1430,7 @@ WriteLiteral(">"); WriteLiteral(" Permission\r\n"); - #line 359 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 403 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" @@ -1279,13 +1447,13 @@ WriteLiteral(" title=\"Flag Assignment Permission Override\""); WriteLiteral(">\r\n"); - #line 361 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 405 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 361 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 405 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" using (Html.BeginForm(MVC.API.UserFlag.Permission(Model.UserFlag.Id))) { @@ -1293,14 +1461,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 363 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 407 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 363 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 407 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" @@ -1334,7 +1502,7 @@ WriteLiteral(" value=\"true\""); WriteLiteral(" "); - #line 367 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 411 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(permission.Inherit ? "checked" : null); @@ -1365,13 +1533,13 @@ WriteLiteral(@"> "); - #line 382 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 426 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 382 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 426 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" var subjects = permission.AllSubjects(); @@ -1386,7 +1554,7 @@ WriteLiteral(" "); - #line 388 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 432 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(subjectId); @@ -1418,20 +1586,20 @@ WriteLiteral(" type=\"checkbox\""); WriteLiteral(" name=\"CanShow\""); -WriteAttribute("value", Tuple.Create(" value=\"", 20091), Tuple.Create("\"", 20109) +WriteAttribute("value", Tuple.Create(" value=\"", 22082), Tuple.Create("\"", 22100) - #line 390 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" - , Tuple.Create(Tuple.Create("", 20099), Tuple.Create(subjectId + #line 434 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + , Tuple.Create(Tuple.Create("", 22090), Tuple.Create(subjectId #line default #line hidden -, 20099), false) +, 22090), false) ); WriteLiteral(" "); - #line 390 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 434 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(permission.CanShowSubjectIds.Contains(subjectId) ? " checked" : null); @@ -1445,20 +1613,20 @@ WriteLiteral(" type=\"checkbox\""); WriteLiteral(" name=\"CanAssign\""); -WriteAttribute("value", Tuple.Create(" value=\"", 20399), Tuple.Create("\"", 20417) +WriteAttribute("value", Tuple.Create(" value=\"", 22390), Tuple.Create("\"", 22408) - #line 393 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" - , Tuple.Create(Tuple.Create("", 20407), Tuple.Create(subjectId + #line 437 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + , Tuple.Create(Tuple.Create("", 22398), Tuple.Create(subjectId #line default #line hidden -, 20407), false) +, 22398), false) ); WriteLiteral(" "); - #line 393 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 437 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(permission.CanAssignSubjectIds.Contains(subjectId) ? " checked" : null); @@ -1472,20 +1640,20 @@ WriteLiteral(" type=\"checkbox\""); WriteLiteral(" name=\"CanEdit\""); -WriteAttribute("value", Tuple.Create(" value=\"", 20707), Tuple.Create("\"", 20725) +WriteAttribute("value", Tuple.Create(" value=\"", 22698), Tuple.Create("\"", 22716) - #line 396 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" - , Tuple.Create(Tuple.Create("", 20715), Tuple.Create(subjectId + #line 440 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + , Tuple.Create(Tuple.Create("", 22706), Tuple.Create(subjectId #line default #line hidden -, 20715), false) +, 22706), false) ); WriteLiteral(" "); - #line 396 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 440 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(permission.CanEditSubjectIds.Contains(subjectId) ? " checked" : null); @@ -1499,20 +1667,20 @@ WriteLiteral(" type=\"checkbox\""); WriteLiteral(" name=\"CanRemove\""); -WriteAttribute("value", Tuple.Create(" value=\"", 21015), Tuple.Create("\"", 21033) +WriteAttribute("value", Tuple.Create(" value=\"", 23006), Tuple.Create("\"", 23024) - #line 399 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" - , Tuple.Create(Tuple.Create("", 21023), Tuple.Create(subjectId + #line 443 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + , Tuple.Create(Tuple.Create("", 23014), Tuple.Create(subjectId #line default #line hidden -, 21023), false) +, 23014), false) ); WriteLiteral(" "); - #line 399 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 443 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(permission.CanRemoveSubjectIds.Contains(subjectId) ? " checked" : null); @@ -1522,7 +1690,7 @@ WriteLiteral(" />\r\n \r " \r\n"); - #line 402 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 446 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -1542,7 +1710,7 @@ WriteLiteral(" placeholder=\"Search Users/Groups\""); WriteLiteral(" data-autocompleteurl=\""); - #line 408 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 452 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Url.Action(MVC.API.System.SearchSubjects(null, includeAuthorizationRoles: true))); @@ -1561,7 +1729,7 @@ WriteLiteral(" class=\"button small\""); WriteLiteral(" data-subjecturl=\""); - #line 409 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 453 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Url.Action(MVC.API.System.Subject(null, includeAuthorizationRoles: true))); @@ -1572,7 +1740,7 @@ WriteLiteral("\""); WriteLiteral(">Add\r\n \r\n"); - #line 411 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 455 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -1694,7 +1862,7 @@ WriteLiteral(" \r\n"); - #line 550 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 594 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -1715,13 +1883,13 @@ WriteLiteral(" class=\"fa fa-fw fa-info-circle\""); WriteLiteral("> Flag actions are normally authorized globally by\r\n"); - #line 554 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 598 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 554 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 598 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (Authorization.Has(Claims.DiscoAdminAccount)) { @@ -1730,20 +1898,20 @@ WriteLiteral("> Flag actions are normally authorized globally by\r\n"); #line hidden WriteLiteral(" (Url.Action(MVC.Config.AuthorizationRole.Index(null)) + #line 600 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" +, Tuple.Create(Tuple.Create("", 33286), Tuple.Create(Url.Action(MVC.Config.AuthorizationRole.Index(null)) #line default #line hidden -, 31295), false) +, 33286), false) ); WriteLiteral(">Authorization Roles.\r\n"); - #line 557 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 601 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } else { @@ -1754,7 +1922,7 @@ WriteLiteral(">Authorization Roles.\r\n"); WriteLiteral(" Authorization Roles.\r\n"); - #line 561 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 605 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -1770,13 +1938,13 @@ WriteLiteral(">\r\n \r\n On Assignment
Expres "\r\n \r\n"); - #line 572 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 616 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 572 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 616 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (canConfig) { @@ -1784,56 +1952,56 @@ WriteLiteral(">\r\n \r\n On Assignment
Expres #line default #line hidden - #line 574 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 618 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Html.EditorFor(model => model.UserFlag.OnAssignmentExpression)); #line default #line hidden - #line 574 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 618 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 575 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 619 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(AjaxHelpers.AjaxRemove()); #line default #line hidden - #line 575 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 619 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 576 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 620 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden - #line 576 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 620 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 577 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 621 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden - #line 577 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 621 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" @@ -1855,7 +2023,7 @@ WriteLiteral(@"> '"); - #line 587 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 631 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Url.Action(MVC.API.UserFlag.UpdateOnAssignmentExpression(Model.UserFlag.Id))); @@ -1883,7 +2051,7 @@ WriteLiteral("\',\r\n \'OnAssignmentExpressio " \r\n"); - #line 616 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 660 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } else { @@ -1900,7 +2068,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral("><None Specified>
\r\n"); - #line 622 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 666 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } else { @@ -1917,7 +2085,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 626 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 670 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Model.UserFlag.OnAssignmentExpression); @@ -1926,7 +2094,7 @@ WriteLiteral(" "); WriteLiteral("\r\n \r\n"); - #line 628 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 672 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } } @@ -1956,13 +2124,13 @@ WriteLiteral(">\r\n \r\n On Unassignment
Expr " \r\n \r\n"); - #line 642 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 686 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 642 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 686 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (canConfig) { @@ -1970,56 +2138,56 @@ WriteLiteral(">\r\n \r\n On Unassignment
Expr #line default #line hidden - #line 644 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 688 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Html.EditorFor(model => model.UserFlag.OnUnassignmentExpression)); #line default #line hidden - #line 644 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 688 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 645 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 689 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(AjaxHelpers.AjaxRemove()); #line default #line hidden - #line 645 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 689 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 646 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 690 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden - #line 646 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 690 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 647 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 691 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden - #line 647 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 691 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" @@ -2041,7 +2209,7 @@ WriteLiteral(@"> '"); - #line 657 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 701 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Url.Action(MVC.API.UserFlag.UpdateOnUnassignmentExpression(Model.UserFlag.Id))); @@ -2079,7 +2247,7 @@ WriteLiteral(@"', "); - #line 686 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 730 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } else { @@ -2096,7 +2264,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral("><None Specified>
\r\n"); - #line 692 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 736 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } else { @@ -2113,7 +2281,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 696 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 740 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Model.UserFlag.OnUnassignmentExpression); @@ -2122,7 +2290,7 @@ WriteLiteral(" "); WriteLiteral("\r\n \r\n"); - #line 698 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 742 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } } @@ -2154,7 +2322,7 @@ WriteLiteral(">\r\n \r\n Linked Groups:\r\n WriteLiteral(" "); - #line 713 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 757 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel() { CanConfigure = canConfig, @@ -2173,7 +2341,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 722 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 766 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel() { CanConfigure = canConfig, @@ -2190,13 +2358,13 @@ WriteLiteral(" "); WriteLiteral("\r\n"); - #line 731 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 775 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 731 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 775 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (canConfig) { @@ -2204,14 +2372,14 @@ WriteLiteral("\r\n"); #line default #line hidden - #line 733 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 777 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared)); #line default #line hidden - #line 733 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 777 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -2221,7 +2389,7 @@ WriteLiteral("\r\n"); WriteLiteral(" \r\n \r\n \r\n \r\n\r\n"); - #line 740 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 784 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (canBulkAssignment || canDelete || canShowUsers || canExportCurrent || canExportAll) { @@ -2235,13 +2403,13 @@ WriteLiteral(" class=\"actionBar\""); WriteLiteral(">\r\n"); - #line 743 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 787 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 743 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 787 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (canExportCurrent) { @@ -2249,14 +2417,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 745 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 789 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Html.ActionLinkButton("Export Current Assignments", MVC.Config.UserFlag.Export(null, Model.UserFlag.Id, true), "Config_UserFlags_Actions_ExportCurrent_Button")); #line default #line hidden - #line 745 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 789 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -2266,7 +2434,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 747 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 791 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (canExportAll) { @@ -2274,14 +2442,14 @@ WriteLiteral(" "); #line default #line hidden - #line 749 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 793 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Html.ActionLinkButton("Export All Assignments", MVC.Config.UserFlag.Export(null, Model.UserFlag.Id, false), "Config_UserFlags_Actions_ExportAll_Button")); #line default #line hidden - #line 749 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 793 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -2291,7 +2459,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 751 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 795 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (canBulkAssignment) { @@ -2359,7 +2527,7 @@ WriteLiteral(" title=\"Bulk Assign Users\""); WriteLiteral(" data-assignedurl=\""); - #line 774 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 818 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Url.Action(MVC.API.UserFlag.AssignedUsers(Model.UserFlag.Id))); @@ -2388,7 +2556,7 @@ WriteLiteral(">\r\n user6
\r\n WriteLiteral(" "); - #line 784 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 828 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(ActiveDirectory.Context.PrimaryDomain.NetBiosName); @@ -2401,7 +2569,7 @@ WriteLiteral(" class=\"code\""); WriteLiteral(">user6,smi0099,"); - #line 786 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 830 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(ActiveDirectory.Context.PrimaryDomain.NetBiosName); @@ -2414,7 +2582,7 @@ WriteLiteral(" class=\"code\""); WriteLiteral(">user6;smi0099;"); - #line 787 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 831 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(ActiveDirectory.Context.PrimaryDomain.NetBiosName); @@ -2441,7 +2609,7 @@ WriteLiteral(" method=\"post\""); WriteLiteral(" data-overrideaction=\""); - #line 793 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 837 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Url.Action(MVC.API.UserFlag.BulkAssignUsers(Model.UserFlag.Id, true))); @@ -2452,7 +2620,7 @@ WriteLiteral("\""); WriteLiteral(" data-addaction=\""); - #line 793 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 837 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Url.Action(MVC.API.UserFlag.BulkAssignUsers(Model.UserFlag.Id, false))); @@ -2465,7 +2633,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 794 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 838 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Html.AntiForgeryToken()); @@ -2545,7 +2713,7 @@ WriteLiteral(" \r\n"); +WriteLiteral(">\r\n $(function () {\r\n const deviceFlags = $(\'#deviceFla" + +"gs\');\r\n\r\n let dialog = null;\r\n let dialogEditComme" + +"nts = null;\r\n\r\n deviceFlags.on(\'click\', \'button.remove\', function" + +" (e) {\r\n const $this = $(this);\r\n const De" + +"viceFlagAssignmentId = $this.closest(\'tr\').attr(\'data-deviceflagassignmentid\');\r" + +"\n\r\n if (!dialog) {\r\n dialog = $(\'#Devi" + +"ce_Show_Flags_Actions_Remove_Dialog\');\r\n dialog.dialog({\r" + +"\n resizable: false,\r\n moda" + +"l: true,\r\n autoOpen: false,\r\n " + +" buttons: {\r\n \"Remove Flag\": function () {\r\n " + +" const $this = $(this);\r\n " + +" $this.dialog(\"disable\");\r\n $thi" + +"s.dialog(\"option\", \"buttons\", null);\r\n $this." + +"find(\'form\').submit();\r\n },\r\n " + +" Cancel: function () {\r\n $(this).d" + +"ialog(\"close\");\r\n }\r\n " + +"}\r\n });\r\n }\r\n\r\n $(\'" + +"#Device_Show_Flags_Actions_Remove_Dialog_Id\').val(DeviceFlagAssignmentId);\r\n " + +" dialog.dialog(\'open\');\r\n\r\n e.preventDefault()" + +";\r\n return false;\r\n });\r\n\r\n dev" + +"iceFlags.on(\'click\', \'td.comments i.fa-edit\', function (e) {\r\n " + +" const $this = $(this);\r\n const $row = $this.closest(\'tr\');\r" + +"\n const DeviceFlagAssignmentId = $row.attr(\'data-deviceflagas" + +"signmentid\');\r\n const canRemove = $row.attr(\'data-canremove\')" + +" === \'True\';\r\n const removeOn = $row.attr(\'data-removeon\');\r\n" + +"\r\n if (!dialogEditComments) {\r\n dialog" + +"EditComments = $(\'#Device_Show_Flags_Actions_EditComments_Dialog\');\r\n " + +" dialogEditComments.dialog({\r\n resizable:" + +" false,\r\n modal: true,\r\n w" + +"idth: 320,\r\n autoOpen: false,\r\n " + +" buttons: {\r\n \"Save Changes\": function () {\r" + +"\n const $this = $(this);\r\n " + +" $this.dialog(\"disable\");\r\n $" + +"this.dialog(\"option\", \"buttons\", null);\r\n $th" + +"is.find(\'form\').submit();\r\n },\r\n " + +" Cancel: function () {\r\n $(this" + +").dialog(\"close\");\r\n }\r\n " + +" }\r\n });\r\n }\r\n\r\n " + +"const $comments = $this.closest(\'td\').find(\'.commentsRaw\');\r\n " + +" if ($comments.hasClass(\'smallMessage\')) {\r\n $(\'#Device_S" + +"how_Flags_Actions_EditComments_Dialog_Comments\').val(\'\');\r\n }" + +" else {\r\n $(\'#Device_Show_Flags_Actions_EditComments_Dial" + +"og_Comments\').val($comments.text());\r\n }\r\n\r\n " + +" const removeOnInput = $(\'#Device_Show_Flags_Actions_EditComments_Dialog_Remov" + +"eDate\');\r\n if (canRemove) {\r\n removeOn" + +"Input.prop(\'disabled\', false);\r\n if (removeOn) {\r\n " + +" removeOnInput.val(removeOn);\r\n } els" + +"e {\r\n removeOnInput.val(\'\');\r\n " + +" }\r\n removeOnInput.closest(\'div\').css(\'display\', \'block\')" + +";\r\n } else {\r\n removeOnInput.prop(\'dis" + +"abled\', true);\r\n removeOnInput.val(\'\');\r\n " + +" removeOnInput.closest(\'div\').css(\'display\', \'none\');\r\n " + +" }\r\n\r\n $(\'#Device_Show_Flags_Actions_EditComments_Dialog_Id\'" + +").val(DeviceFlagAssignmentId);\r\n dialogEditComments.dialog(\'o" + +"pen\');\r\n e.preventDefault();\r\n return fals" + +"e;\r\n });\r\n });\r\n \r\n"); - #line 169 "..\..\Views\Device\DeviceParts\_Flags.cshtml" + #line 200 "..\..\Views\Device\DeviceParts\_Flags.cshtml" } else { @@ -687,7 +796,7 @@ WriteLiteral(" class=\"none\""); WriteLiteral(">This device has no associated flags\r\n"); - #line 173 "..\..\Views\Device\DeviceParts\_Flags.cshtml" + #line 204 "..\..\Views\Device\DeviceParts\_Flags.cshtml" } @@ -697,7 +806,7 @@ WriteLiteral(" \r\n"); +"= null;\r\n let flagAddRemoveDate = null;\r\n " + +" let details = null;\r\n\r\n function flagSelected() {" + +"\r\n const flag = $(this);\r\n\r\n " + +" flagPicker.children().removeClass(\'selected\');\r\n f" + +"lag.addClass(\'selected\');\r\n\r\n flagAddId.val(flag.attr" + +"(\'data-flagid\'));\r\n\r\n const removeDays = flag.attr(\'d" + +"ata-flagremovedays\');\r\n if (removeDays) {\r\n " + +" const date = new Date();\r\n " + +"date.setDate(date.getDate() + parseInt(removeDays) - 1);\r\n " + +" flagAddRemoveDate[0].valueAsDate = date;\r\n " + +" flagAddRemoveDate.trigger(\'change\');\r\n } else {\r\n" + +" flagAddRemoveDate[0].valueAsDate = null;\r\n " + +" flagAddRemoveDate.trigger(\'change\');\r\n " + +" }\r\n flagAddRemoveDate.closest(\'div\').show" + +"();\r\n if (flag.attr(\'data-flagcanremove\') === \'True\')" + +" {\r\n flagAddRemoveDate.prop(\'disabled\', false);\r\n" + +" } else {\r\n flagAddRem" + +"oveDate.prop(\'disabled\', true);\r\n if (!removeDays" + +") {\r\n flagAddRemoveDate.closest(\'div\').hide()" + +";\r\n }\r\n }\r\n\r\n " + +" details.show();\r\n\r\n flagAddComment" + +"s.focus().select();\r\n }\r\n\r\n button" + +".click(function (e) {\r\n if (!buttonDialog) {\r\n " + +" buttonDialog = $(\'#Device_Show_Details_Actions_AddFlag_" + +"Dialog\');\r\n buttonDialog.dialog({\r\n " + +" width: 600,\r\n height: 4" + +"10,\r\n resizable: false,\r\n " + +" modal: true,\r\n autoOpen: fals" + +"e,\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 } e" + +"lse {\r\n alert(\'Select a Device Fl" + +"ag\');\r\n }\r\n " + +" }\r\n }\r\n " + +" });\r\n\r\n flagAddId = $(\'#Device_Show_Detai" + +"ls_Actions_AddFlag_Dialog_Id\');\r\n flagAddComments" + +" = buttonDialog.find(\'#Device_Show_Details_Actions_AddFlag_Dialog_Comments\');\r\n " + +" flagAddRemoveDate = buttonDialog.find(\'#Device_Sh" + +"ow_Details_Actions_AddFlag_Dialog_RemoveDate\');\r\n " + +" flagPicker = buttonDialog.find(\'.flagPicker\');\r\n " + +" details = buttonDialog.find(\'.details\');\r\n\r\n $(\'" + +"#Device_Show_Details_Actions_AddFlag_Dialog_Filter\').on(\'keyup\', function (e) {\r" + +"\n const filter = $(e.currentTarget).val().toL" + +"owerCase();\r\n if (filter) {\r\n " + +" flagPicker.children(\'div.flag\').each(function () {\r\n " + +" const $this = $(this);\r\n " + +" if ($this.attr(\'data-flagname\').toLowerCase().indexO" + +"f(filter) >= 0) {\r\n $this.css(\'di" + +"splay\', \'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 () { $(this).css(\'displa" + +"y\', \'block\'); });\r\n }\r\n " + +" });\r\n\r\n flagPicker.on(\'click\', \'div.fla" + +"g\', flagSelected);\r\n flagAddRemoveDate.on(\'change" + +"\', function () {\r\n if (flagAddRemoveDate.val(" + +")) {\r\n flagAddRemoveDate.next(\'span\').sho" + +"w();\r\n } else {\r\n " + +" flagAddRemoveDate.next(\'span\').hide();\r\n " + +" }\r\n });\r\n }\r\n\r" + +"\n $(\'#Device_Show_Details_Actions_AddFlag_Dialog_Filt" + +"er\').val(\'\');\r\n buttonDialog.dialog(\'open\');\r\n " + +" });\r\n });\r\n \r\n"); - #line 874 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 908 "..\..\Views\Device\DeviceParts\_Subject.cshtml" } @@ -3046,7 +3110,7 @@ WriteLiteral(">\r\n $(function () {\r\n WriteLiteral(" "); - #line 875 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 909 "..\..\Views\Device\DeviceParts\_Subject.cshtml" if (Model.Device.CanUpdateTrustEnrol()) { @@ -3074,13 +3138,13 @@ WriteLiteral(" title=\"Trust this Device?\""); WriteLiteral(">\r\n"); - #line 879 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 913 "..\..\Views\Device\DeviceParts\_Subject.cshtml" #line default #line hidden - #line 879 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 913 "..\..\Views\Device\DeviceParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, true.ToString(), true))) { @@ -3088,14 +3152,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 881 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 915 "..\..\Views\Device\DeviceParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 881 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 915 "..\..\Views\Device\DeviceParts\_Subject.cshtml" } @@ -3128,7 +3192,7 @@ WriteLiteral(">This action will allow a device claiming to have the "\'"); - #line 891 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 925 "..\..\Views\Device\DeviceParts\_Subject.cshtml" Write(Model.Device.SerialNumber); @@ -3176,7 +3240,7 @@ WriteLiteral(@"> "); - #line 924 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 958 "..\..\Views\Device\DeviceParts\_Subject.cshtml" } @@ -3185,7 +3249,7 @@ WriteLiteral(@"> WriteLiteral(" "); - #line 925 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 959 "..\..\Views\Device\DeviceParts\_Subject.cshtml" if (Model.Device.CanUpdateUntrustEnrol()) { @@ -3213,13 +3277,13 @@ WriteLiteral(" title=\"Untrust this Device?\""); WriteLiteral(">\r\n"); - #line 929 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 963 "..\..\Views\Device\DeviceParts\_Subject.cshtml" #line default #line hidden - #line 929 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 963 "..\..\Views\Device\DeviceParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, false.ToString(), true))) { @@ -3227,14 +3291,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 931 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 965 "..\..\Views\Device\DeviceParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 931 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 965 "..\..\Views\Device\DeviceParts\_Subject.cshtml" } @@ -3297,7 +3361,7 @@ WriteLiteral(@"> "); - #line 968 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1002 "..\..\Views\Device\DeviceParts\_Subject.cshtml" } @@ -3306,7 +3370,7 @@ WriteLiteral(@"> WriteLiteral(" "); - #line 969 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1003 "..\..\Views\Device\DeviceParts\_Subject.cshtml" if (Model.Device.CanDecommission()) { @@ -3334,13 +3398,13 @@ WriteLiteral(" title=\"Device Decommissioning\""); WriteLiteral(">\r\n"); - #line 973 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1007 "..\..\Views\Device\DeviceParts\_Subject.cshtml" #line default #line hidden - #line 973 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1007 "..\..\Views\Device\DeviceParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.Device.Decommission(Model.Device.SerialNumber, null, true))) { @@ -3348,14 +3412,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 975 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1009 "..\..\Views\Device\DeviceParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 975 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1009 "..\..\Views\Device\DeviceParts\_Subject.cshtml" @@ -3381,13 +3445,13 @@ WriteLiteral(" class=\"none\""); WriteLiteral(">\r\n"); - #line 981 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1015 "..\..\Views\Device\DeviceParts\_Subject.cshtml" #line default #line hidden - #line 981 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1015 "..\..\Views\Device\DeviceParts\_Subject.cshtml" foreach (DecommissionReasons decommissionReason in Enum.GetValues(typeof(DecommissionReasons)).Cast().OrderBy(r => r.ToString())) { @@ -3399,33 +3463,33 @@ WriteLiteral("
  • \r\n WriteLiteral(" type=\"radio\""); -WriteAttribute("id", Tuple.Create(" id=\"", 61379), Tuple.Create("\"", 61457) -, Tuple.Create(Tuple.Create("", 61384), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 61384), true) +WriteAttribute("id", Tuple.Create(" id=\"", 63637), Tuple.Create("\"", 63715) +, Tuple.Create(Tuple.Create("", 63642), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 63642), true) - #line 984 "..\..\Views\Device\DeviceParts\_Subject.cshtml" - , Tuple.Create(Tuple.Create("", 61431), Tuple.Create((int)decommissionReason + #line 1018 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + , Tuple.Create(Tuple.Create("", 63689), Tuple.Create((int)decommissionReason #line default #line hidden -, 61431), false) +, 63689), false) ); WriteLiteral("\r\n name=\"Reason\""); -WriteAttribute("value", Tuple.Create(" value=\"", 61520), Tuple.Create("\"", 61554) +WriteAttribute("value", Tuple.Create(" value=\"", 63778), Tuple.Create("\"", 63812) - #line 985 "..\..\Views\Device\DeviceParts\_Subject.cshtml" -, Tuple.Create(Tuple.Create("", 61528), Tuple.Create((int)decommissionReason + #line 1019 "..\..\Views\Device\DeviceParts\_Subject.cshtml" +, Tuple.Create(Tuple.Create("", 63786), Tuple.Create((int)decommissionReason #line default #line hidden -, 61528), false) +, 63786), false) ); WriteLiteral(" "); - #line 985 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1019 "..\..\Views\Device\DeviceParts\_Subject.cshtml" Write((decommissionReason == DecommissionReasons.EndOfLife) ? "checked=\"checked\"" : string.Empty); @@ -3433,21 +3497,21 @@ WriteLiteral(" "); #line hidden WriteLiteral(" />\r\n ((int)decommissionReason + #line 1020 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + , Tuple.Create(Tuple.Create("", 64013), Tuple.Create((int)decommissionReason #line default #line hidden -, 61755), false) +, 64013), false) ); WriteLiteral(">"); - #line 986 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1020 "..\..\Views\Device\DeviceParts\_Subject.cshtml" Write(decommissionReason.ReasonMessage()); @@ -3456,7 +3520,7 @@ WriteLiteral(">"); WriteLiteral("\r\n
  • \r\n"); - #line 988 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1022 "..\..\Views\Device\DeviceParts\_Subject.cshtml" } @@ -3465,7 +3529,7 @@ WriteLiteral("\r\n \r\n"); WriteLiteral(" \r\n \r\n"); - #line 991 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1025 "..\..\Views\Device\DeviceParts\_Subject.cshtml" } @@ -3506,7 +3570,7 @@ WriteLiteral(@"> "); - #line 1019 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1053 "..\..\Views\Device\DeviceParts\_Subject.cshtml" } @@ -3515,7 +3579,7 @@ WriteLiteral(@"> WriteLiteral(" "); - #line 1020 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1054 "..\..\Views\Device\DeviceParts\_Subject.cshtml" if (Model.Device.CanRecommission()) { @@ -3543,13 +3607,13 @@ WriteLiteral(" title=\"Recommission this Device?\""); WriteLiteral(">\r\n"); - #line 1024 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1058 "..\..\Views\Device\DeviceParts\_Subject.cshtml" #line default #line hidden - #line 1024 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1058 "..\..\Views\Device\DeviceParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.Device.Recommission(Model.Device.SerialNumber, true))) { @@ -3557,14 +3621,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 1026 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1060 "..\..\Views\Device\DeviceParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 1026 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1060 "..\..\Views\Device\DeviceParts\_Subject.cshtml" } @@ -3611,7 +3675,7 @@ WriteLiteral(@"> "); - #line 1059 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1093 "..\..\Views\Device\DeviceParts\_Subject.cshtml" } @@ -3620,7 +3684,7 @@ WriteLiteral(@"> WriteLiteral(" "); - #line 1060 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1094 "..\..\Views\Device\DeviceParts\_Subject.cshtml" if (Model.Device.CanDelete()) { @@ -3648,13 +3712,13 @@ WriteLiteral(" title=\"Delete this Device?\""); WriteLiteral(">\r\n"); - #line 1064 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1098 "..\..\Views\Device\DeviceParts\_Subject.cshtml" #line default #line hidden - #line 1064 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1098 "..\..\Views\Device\DeviceParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.Device.Delete(Model.Device.SerialNumber, true))) { @@ -3662,14 +3726,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 1066 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1100 "..\..\Views\Device\DeviceParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 1066 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1100 "..\..\Views\Device\DeviceParts\_Subject.cshtml" } @@ -3721,7 +3785,7 @@ WriteLiteral(@"> "); - #line 1101 "..\..\Views\Device\DeviceParts\_Subject.cshtml" + #line 1135 "..\..\Views\Device\DeviceParts\_Subject.cshtml" } diff --git a/Disco.Web/Views/User/UserParts/_Flags.cshtml b/Disco.Web/Views/User/UserParts/_Flags.cshtml index 16d0c1cc..036cb501 100644 --- a/Disco.Web/Views/User/UserParts/_Flags.cshtml +++ b/Disco.Web/Views/User/UserParts/_Flags.cshtml @@ -11,12 +11,12 @@ Name Added - Comments + Detail Removed @foreach (var fa in flagAssignments.OrderByDescending(a => a.Item1.AddedDate)) { - + @if (Authorization.Has(Claims.Config.UserFlag.Show)) @@ -49,11 +49,19 @@
    @fa.Item1.Comments.ToHtmlComment()
    @fa.Item1.Comments
    } + @if (!fa.Item1.RemovedDate.HasValue && fa.Item1.RemoveDate.HasValue) + { +
    Removing @CommonHelpers.FriendlyDate(fa.Item1.RemoveDate.Value)
    + } @if (fa.Item1.RemovedDate.HasValue) { @CommonHelpers.FriendlyDateAndUser(fa.Item1.RemovedDate.Value, fa.Item1.RemovedUser) + if (fa.Item1.RemoveDate.HasValue) + { + (scheduled) + } if (fa.Item1.OnUnassignmentExpressionResult != null) {
    @fa.Item1.OnUnassignmentExpressionResult
    @@ -61,7 +69,7 @@ } else if (fa.Item1.CanRemove()) { - Remove + } @@ -77,8 +85,8 @@

    } -
    - @using (Html.BeginForm(MVC.API.UserFlagAssignment.UpdateComments())) +
    + @using (Html.BeginForm(MVC.API.UserFlagAssignment.Edit())) { @Html.AntiForgeryToken() @@ -87,18 +95,23 @@

    +
    +

    Remove On

    + + 12:00 AM +
    }
    \r\n"); +WriteLiteral(">\r\n $(function () {\r\n const userFlags = $(\'#userFlags\')" + +";\r\n\r\n let dialog = null;\r\n let dialogEditComments " + +"= null;\r\n\r\n userFlags.on(\'click\', \'button.remove\', function (e) {" + +"\r\n const $this = $(this);\r\n const UserFlag" + +"AssignmentId = $this.closest(\'tr\').attr(\'data-userflagassignmentid\');\r\n\r\n " + +" if (!dialog) {\r\n dialog = $(\'#User_Show_Flag" + +"s_Actions_Remove_Dialog\');\r\n dialog.dialog({\r\n " + +" resizable: false,\r\n modal: true,\r\n " + +" autoOpen: false,\r\n buttons:" + +" {\r\n \"Remove Flag\": function () {\r\n " + +" const $this = $(this);\r\n " + +" $this.dialog(\"disable\");\r\n $this.dialog(\"op" + +"tion\", \"buttons\", null);\r\n $this.find(\'form\')" + +".submit();\r\n },\r\n " + +"Cancel: function () {\r\n $(this).dialog(\"close" + +"\");\r\n }\r\n }\r\n " + +" });\r\n }\r\n\r\n $(\'#User_Show_F" + +"lags_Actions_Remove_Dialog_Id\').val(UserFlagAssignmentId);\r\n " + +"dialog.dialog(\'open\');\r\n\r\n e.preventDefault();\r\n " + +" return false;\r\n });\r\n\r\n userFlags.on(\'click" + +"\', \'td.comments i.fa-edit\', function (e) {\r\n const $this = $(" + +"this);\r\n const $row = $this.closest(\'tr\');\r\n " + +" const UserFlagAssignmentId = $row.attr(\'data-userflagassignmentid\');\r\n " + +" const canRemove = $row.attr(\'data-canremove\') === \'True\';\r\n " + +" const removeOn = $row.attr(\'data-removeon\');\r\n\r\n " + +"if (!dialogEditComments) {\r\n dialogEditComments = $(\'#Use" + +"r_Show_Flags_Actions_EditComments_Dialog\');\r\n dialogEditC" + +"omments.dialog({\r\n resizable: false,\r\n " + +" modal: true,\r\n width: 320,\r\n " + +" autoOpen: false,\r\n buttons: {\r\n " + +" \"Save Changes\": function () {\r\n " + +" var $this = $(this);\r\n $this.dia" + +"log(\"disable\");\r\n $this.dialog(\"option\", \"but" + +"tons\", null);\r\n $this.find(\'form\').submit();\r" + +"\n },\r\n Cancel: fun" + +"ction () {\r\n $(this).dialog(\"close\");\r\n " + +" }\r\n }\r\n " + +" });\r\n }\r\n\r\n var $comments = $this.clos" + +"est(\'td\').find(\'.commentsRaw\');\r\n if ($comments.hasClass(\'sma" + +"llMessage\')) {\r\n $(\'#User_Show_Flags_Actions_EditComments" + +"_Dialog_Comments\').val(\'\');\r\n } else {\r\n " + +" $(\'#User_Show_Flags_Actions_EditComments_Dialog_Comments\').val($comments.text" + +"());\r\n }\r\n\r\n const removeOnInput = $(\'#Use" + +"r_Show_Flags_Actions_EditComments_Dialog_RemoveDate\');\r\n if (" + +"canRemove) {\r\n removeOnInput.prop(\'disabled\', false);\r\n " + +" if (removeOn) {\r\n removeOnInput" + +".val(removeOn);\r\n } else {\r\n r" + +"emoveOnInput.val(\'\');\r\n }\r\n remove" + +"OnInput.closest(\'div\').css(\'display\', \'block\');\r\n } else {\r\n " + +" removeOnInput.prop(\'disabled\', true);\r\n " + +" removeOnInput.val(\'\');\r\n removeOnInput.closest(\'div" + +"\').css(\'display\', \'none\');\r\n }\r\n\r\n $(\'#Use" + +"r_Show_Flags_Actions_EditComments_Dialog_Id\').val(UserFlagAssignmentId);\r\n " + +" dialogEditComments.dialog(\'open\');\r\n e.preventD" + +"efault();\r\n return false;\r\n });\r\n }" + +");\r\n \r\n"); - #line 169 "..\..\Views\User\UserParts\_Flags.cshtml" + #line 200 "..\..\Views\User\UserParts\_Flags.cshtml" } else { @@ -687,7 +796,7 @@ WriteLiteral(" class=\"none\""); WriteLiteral(">This user has no associated flags
    \r\n"); - #line 173 "..\..\Views\User\UserParts\_Flags.cshtml" + #line 204 "..\..\Views\User\UserParts\_Flags.cshtml" } @@ -697,7 +806,7 @@ WriteLiteral(" \r\n"); +" let flagAddRemoveDate = null;\r\n " + +" let details = null;\r\n\r\n " + +" function flagSelected() {\r\n const flag =" + +" $(this);\r\n\r\n flagPicker.children().remov" + +"eClass(\'selected\');\r\n flag.addClass(\'sele" + +"cted\');\r\n\r\n flagAddId.val(flag.attr(\'data" + +"-userflagid\'));\r\n\r\n const removeDays = fl" + +"ag.attr(\'data-userflagremovedays\');\r\n if " + +"(removeDays) {\r\n const date = new Dat" + +"e();\r\n date.setDate(date.getDate() + " + +"parseInt(removeDays) - 1);\r\n flagAddR" + +"emoveDate[0].valueAsDate = date;\r\n fl" + +"agAddRemoveDate.trigger(\'change\');\r\n } el" + +"se {\r\n flagAddRemoveDate[0].valueAsDa" + +"te = null;\r\n flagAddRemoveDate.trigge" + +"r(\'change\');\r\n }\r\n " + +" flagAddRemoveDate.closest(\'div\').show();\r\n " + +" if (flag.attr(\'data-userflagcanremove\') === \'True\') {\r\n " + +" flagAddRemoveDate.prop(\'disabled\', false);" + +"\r\n } else {\r\n " + +" flagAddRemoveDate.prop(\'disabled\', true);\r\n " + +" if (!removeDays) {\r\n " + +" flagAddRemoveDate.closest(\'div\').hide();\r\n " + +" }\r\n }\r\n\r\n " + +" details.show();\r\n\r\n " + +" flagAddComments.focus().select();\r\n }\r\n\r\n" + +" button.click(function (e) {\r\n " + +" e.preventDefault();\r\n\r\n " + +" if (!buttonDialog) {\r\n button" + +"Dialog = $(\'#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 Cance" + +"l: 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\", \"button" + +"s\", null)\r\n .find" + +"(\'form\').submit();\r\n } el" + +"se {\r\n alert(\'Select " + +"a User Flag\');\r\n }\r\n " + +" }\r\n " + +" }\r\n });\r\n\r\n " + +" flagAddId = $(\'#User_Show_Details_Actions_Ad" + +"dFlag_Dialog_Id\');\r\n flagAddComments " + +"= buttonDialog.find(\'#User_Show_Details_Actions_AddFlag_Dialog_Comments\');\r\n " + +" flagAddRemoveDate = buttonDialog.find(\'#" + +"User_Show_Details_Actions_AddFlag_Dialog_RemoveDate\');\r\n " + +" flagPicker = buttonDialog.find(\'.flagPicker\');\r\n " + +" details = buttonDialog.find(\'.details\');\r\n\r\n " + +" $(\'#User_Show_Details_Actions_AddFlag_Di" + +"alog_Filter\').on(\'keyup\', function (e) {\r\n " + +" const 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-userflagna" + +"me\').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.children(\'div.flag\').each(func" + +"tion () { $(this).css(\'display\', \'block\'); });\r\n " + +" }\r\n });\r\n\r\n " + +" flagPicker.on(\'click\', \'div.flag\', flagSelecte" + +"d);\r\n flagAddRemoveDate.on(\'change\', " + +"function () {\r\n if (flagAddRemove" + +"Date.val()) {\r\n flagAddRemove" + +"Date.next(\'span\').show();\r\n } els" + +"e {\r\n flagAddRemoveDate.next(" + +"\'span\').hide();\r\n }\r\n " + +" });\r\n }\r\n" + +"\r\n $(\'#User_Show_Details_Actions_AddFlag_" + +"Dialog_Filter\').val(\'\');\r\n buttonDialog.d" + +"ialog(\'open\');\r\n return false;\r\n " + +" });\r\n });\r\n " + +" \r\n"); - #line 345 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 379 "..\..\Views\User\UserParts\_Subject.cshtml" } @@ -1178,13 +1248,13 @@ WriteLiteral(">\r\n $(function () {\r\n WriteLiteral(" \r\n \r\n \r\n"); - #line 349 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 383 "..\..\Views\User\UserParts\_Subject.cshtml" #line default #line hidden - #line 349 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 383 "..\..\Views\User\UserParts\_Subject.cshtml" if (Authorization.Has(Claims.User.ShowAssignments)) { @@ -1202,13 +1272,13 @@ WriteLiteral(" id=\"User_Show_AssignedDevices_Active\""); WriteLiteral(">\r\n

    Current Device Assignments

    \r\n"); - #line 355 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 389 "..\..\Views\User\UserParts\_Subject.cshtml" #line default #line hidden - #line 355 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 389 "..\..\Views\User\UserParts\_Subject.cshtml" if (currentDeviceAssignments.Count > 0) { foreach (var assignment in currentDeviceAssignments) @@ -1224,7 +1294,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment clearfix\""); WriteLiteral(" data-deviceserialnumber=\""); - #line 359 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 393 "..\..\Views\User\UserParts\_Subject.cshtml" Write(assignment.DeviceSerialNumber); @@ -1235,13 +1305,13 @@ WriteLiteral("\""); WriteLiteral(">\r\n"); - #line 360 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 394 "..\..\Views\User\UserParts\_Subject.cshtml" #line default #line hidden - #line 360 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 394 "..\..\Views\User\UserParts\_Subject.cshtml" if (Authorization.Has(Claims.Device.Show)) { @@ -1250,14 +1320,14 @@ WriteLiteral(">\r\n"); #line hidden WriteLiteral(" (Url.Action(MVC.Device.Show(assignment.Device.SerialNumber)) + #line 396 "..\..\Views\User\UserParts\_Subject.cshtml" +, Tuple.Create(Tuple.Create("", 25941), Tuple.Create(Url.Action(MVC.Device.Show(assignment.Device.SerialNumber)) #line default #line hidden -, 23271), false) +, 25941), false) ); WriteLiteral(">\r\n (Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash())) + #line 397 "..\..\Views\User\UserParts\_Subject.cshtml" + , Tuple.Create(Tuple.Create("", 26139), Tuple.Create(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash())) #line default #line hidden -, 23469), false) +, 26139), false) ); WriteLiteral(" />\r\n \r\n"); - #line 365 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 399 "..\..\Views\User\UserParts\_Subject.cshtml" } else { @@ -1293,20 +1363,20 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Image\""); WriteLiteral(" alt=\"Model Image\""); -WriteAttribute("src", Tuple.Create(" src=\"", 23896), Tuple.Create("\"", 24017) +WriteAttribute("src", Tuple.Create(" src=\"", 26566), Tuple.Create("\"", 26687) - #line 368 "..\..\Views\User\UserParts\_Subject.cshtml" - , Tuple.Create(Tuple.Create("", 23902), Tuple.Create(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash())) + #line 402 "..\..\Views\User\UserParts\_Subject.cshtml" + , Tuple.Create(Tuple.Create("", 26572), Tuple.Create(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash())) #line default #line hidden -, 23902), false) +, 26572), false) ); WriteLiteral(" />\r\n"); - #line 369 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 403 "..\..\Views\User\UserParts\_Subject.cshtml" } @@ -1334,13 +1404,13 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_SerialNumber\ WriteLiteral(" data-clipboard>\r\n"); - #line 379 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 413 "..\..\Views\User\UserParts\_Subject.cshtml" #line default #line hidden - #line 379 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 413 "..\..\Views\User\UserParts\_Subject.cshtml" if (Authorization.Has(Claims.Device.Show)) { @@ -1348,14 +1418,14 @@ WriteLiteral(" data-clipboard>\r\n"); #line default #line hidden - #line 381 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 415 "..\..\Views\User\UserParts\_Subject.cshtml" Write(Html.ActionLink(assignment.Device.SerialNumber, MVC.Device.Show(assignment.Device.SerialNumber))); #line default #line hidden - #line 381 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 415 "..\..\Views\User\UserParts\_Subject.cshtml" } else @@ -1365,14 +1435,14 @@ WriteLiteral(" data-clipboard>\r\n"); #line default #line hidden - #line 385 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 419 "..\..\Views\User\UserParts\_Subject.cshtml" Write(assignment.Device.SerialNumber); #line default #line hidden - #line 385 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 419 "..\..\Views\User\UserParts\_Subject.cshtml" } @@ -1382,13 +1452,13 @@ WriteLiteral(" data-clipboard>\r\n"); WriteLiteral(" \r\n"); - #line 388 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 422 "..\..\Views\User\UserParts\_Subject.cshtml" #line default #line hidden - #line 388 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 422 "..\..\Views\User\UserParts\_Subject.cshtml" if (!string.IsNullOrWhiteSpace(assignment.Device.ComputerName)) { @@ -1404,7 +1474,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_ComputerName\ WriteLiteral(" data-clipboard>"); - #line 390 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 424 "..\..\Views\User\UserParts\_Subject.cshtml" Write(assignment.Device.ComputerName); @@ -1415,7 +1485,7 @@ WriteLiteral(")"); WriteLiteral("\r\n"); - #line 391 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 425 "..\..\Views\User\UserParts\_Subject.cshtml" } @@ -1425,13 +1495,13 @@ WriteLiteral(" \r\n " \r\n"); - #line 394 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 428 "..\..\Views\User\UserParts\_Subject.cshtml" #line default #line hidden - #line 394 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 428 "..\..\Views\User\UserParts\_Subject.cshtml" if (!string.IsNullOrEmpty(assignment.Device.AssetNumber)) { @@ -1448,7 +1518,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Asset\""); WriteLiteral(" data-clipboard>"); - #line 399 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 433 "..\..\Views\User\UserParts\_Subject.cshtml" Write(assignment.Device.AssetNumber); @@ -1458,7 +1528,7 @@ WriteLiteral("\r\n " \r\n"); - #line 402 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 436 "..\..\Views\User\UserParts\_Subject.cshtml" } @@ -1467,7 +1537,7 @@ WriteLiteral("\r\n WriteLiteral(" "); - #line 403 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 437 "..\..\Views\User\UserParts\_Subject.cshtml" if (assignment.Device.DeviceModelId.HasValue) { @@ -1486,7 +1556,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Model\""); WriteLiteral(">"); - #line 410 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 444 "..\..\Views\User\UserParts\_Subject.cshtml" Write(assignment.Device.DeviceModel.ToString()); @@ -1496,7 +1566,7 @@ WriteLiteral("\r\n " \r\n"); - #line 413 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 447 "..\..\Views\User\UserParts\_Subject.cshtml" } @@ -1514,7 +1584,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Profile\""); WriteLiteral(">"); - #line 419 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 453 "..\..\Views\User\UserParts\_Subject.cshtml" Write(assignment.Device.DeviceProfile.ToString()); @@ -1524,13 +1594,13 @@ WriteLiteral("\r\n " \r\n"); - #line 422 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 456 "..\..\Views\User\UserParts\_Subject.cshtml" #line default #line hidden - #line 422 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 456 "..\..\Views\User\UserParts\_Subject.cshtml" if (assignment.Device.DeviceBatchId.HasValue) { @@ -1549,7 +1619,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Batch\""); WriteLiteral(">"); - #line 429 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 463 "..\..\Views\User\UserParts\_Subject.cshtml" Write(assignment.Device.DeviceBatch.ToString()); @@ -1559,7 +1629,7 @@ WriteLiteral("\r\n " \r\n"); - #line 432 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 466 "..\..\Views\User\UserParts\_Subject.cshtml" } @@ -1575,7 +1645,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Assigned\""); WriteLiteral(">"); - #line 436 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 470 "..\..\Views\User\UserParts\_Subject.cshtml" Write(CommonHelpers.FriendlyDate(assignment.AssignedDate)); @@ -1585,13 +1655,13 @@ WriteLiteral("\r\n " \r\n"); - #line 439 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 473 "..\..\Views\User\UserParts\_Subject.cshtml" #line default #line hidden - #line 439 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 473 "..\..\Views\User\UserParts\_Subject.cshtml" if (assignment.Device.DeviceFlagAssignments.CanShowAny()) { @@ -1610,13 +1680,13 @@ WriteLiteral(" class=\"User_Show_Assigned_Devices_CurrentAssignment_Flags\""); WriteLiteral(">\r\n"); - #line 444 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 478 "..\..\Views\User\UserParts\_Subject.cshtml" #line default #line hidden - #line 444 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 478 "..\..\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()) @@ -1627,26 +1697,26 @@ WriteLiteral(">\r\n"); #line hidden WriteLiteral(" (flag.Item2.flag.Icon + #line 482 "..\..\Views\User\UserParts\_Subject.cshtml" + , Tuple.Create(Tuple.Create("", 33396), Tuple.Create(flag.Item2.flag.Icon #line default #line hidden -, 30726), false) -, Tuple.Create(Tuple.Create(" ", 30749), Tuple.Create("fa-fw", 30750), true) -, Tuple.Create(Tuple.Create(" ", 30755), Tuple.Create("d-", 30756), true) +, 33396), false) +, Tuple.Create(Tuple.Create(" ", 33419), Tuple.Create("fa-fw", 33420), true) +, Tuple.Create(Tuple.Create(" ", 33425), Tuple.Create("d-", 33426), true) - #line 448 "..\..\Views\User\UserParts\_Subject.cshtml" - , Tuple.Create(Tuple.Create("", 30758), Tuple.Create(flag.Item2.flag.IconColour + #line 482 "..\..\Views\User\UserParts\_Subject.cshtml" + , Tuple.Create(Tuple.Create("", 33428), Tuple.Create(flag.Item2.flag.IconColour #line default #line hidden -, 30758), false) +, 33428), false) ); WriteLiteral(">\r\n " + @@ -1662,7 +1732,7 @@ WriteLiteral(" class=\"name\""); WriteLiteral(">"); - #line 450 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 484 "..\..\Views\User\UserParts\_Subject.cshtml" Write(flag.Item2.flag.Name); @@ -1671,7 +1741,7 @@ WriteLiteral(">"); WriteLiteral(""); - #line 450 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 484 "..\..\Views\User\UserParts\_Subject.cshtml" if (flag.Item1.Comments != null) { @@ -1684,7 +1754,7 @@ WriteLiteral(" class=\"comments\""); WriteLiteral(">"); - #line 451 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 485 "..\..\Views\User\UserParts\_Subject.cshtml" Write(flag.Item1.Comments.ToHtmlComment()); @@ -1693,7 +1763,7 @@ WriteLiteral(">"); WriteLiteral(""); - #line 451 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 485 "..\..\Views\User\UserParts\_Subject.cshtml" } #line default @@ -1705,7 +1775,7 @@ WriteLiteral(" class=\"added\""); WriteLiteral(">"); - #line 451 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 485 "..\..\Views\User\UserParts\_Subject.cshtml" Write(CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId)); @@ -1716,7 +1786,7 @@ WriteLiteral("\r\n " \r\n"); - #line 454 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 488 "..\..\Views\User\UserParts\_Subject.cshtml" } } @@ -1770,7 +1840,7 @@ WriteLiteral(">\r\n " \r\n"); - #line 489 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 523 "..\..\Views\User\UserParts\_Subject.cshtml" } @@ -1781,7 +1851,7 @@ WriteLiteral(" \r\n " \r\n"); - #line 494 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 528 "..\..\Views\User\UserParts\_Subject.cshtml" } } else @@ -1797,7 +1867,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral(">No Current Device Assignments\r\n"); - #line 499 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 533 "..\..\Views\User\UserParts\_Subject.cshtml" } @@ -1807,7 +1877,7 @@ WriteLiteral(" \r\n \r\n "\r\n"); - #line 503 "..\..\Views\User\UserParts\_Subject.cshtml" + #line 537 "..\..\Views\User\UserParts\_Subject.cshtml" }