Feature #49: Active Directory Managed Groups
Document Template Attachments, Device Batches, Device Profiles and User Flags can be associated with an Active Directory group. This AD group is then automatically synchronized with relevant User/Machine accounts. Contains various other UI tweaks and configuration enhancements.
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
{
|
||||
if (UserId != null)
|
||||
{
|
||||
@prepend <span>@Disco.Services.UserExtensions.FriendlyUserId(UserId)</span>
|
||||
@prepend <span>@Disco.Services.Interop.ActiveDirectory.ActiveDirectory.FriendlyAccountId(UserId)</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -674,7 +674,7 @@ WriteLiteralTo(@__razor_helper_writer, " <span>");
|
||||
|
||||
|
||||
#line 58 "..\..\App_Code\CommonHelpers.cshtml"
|
||||
WriteTo(@__razor_helper_writer, Disco.Services.UserExtensions.FriendlyUserId(UserId));
|
||||
WriteTo(@__razor_helper_writer, Disco.Services.Interop.ActiveDirectory.ActiveDirectory.FriendlyAccountId(UserId));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
@@ -59,6 +59,10 @@ namespace Disco.Web
|
||||
// Initialize User Flags
|
||||
Disco.Services.Users.UserFlags.UserFlagService.Initialize(Database);
|
||||
|
||||
// Initialize Satellite Managed Groups (which don't belong to any other component)
|
||||
Disco.Services.Devices.ManagedGroups.DeviceManagedGroups.Initialize(Database);
|
||||
Disco.BI.DocumentTemplateBI.ManagedGroups.DocumentTemplateManagedGroups.Initialize(Database);
|
||||
|
||||
// Initialize Plugins
|
||||
Disco.Services.Plugins.Plugins.InitalizePlugins(Database);
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Devices.ManagedGroups;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Tasks;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web.Extensions;
|
||||
using System;
|
||||
@@ -27,6 +30,8 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
const string pInsuredUntil = "insureduntil";
|
||||
const string pInsuranceDetails = "insurancedetails";
|
||||
const string pComments = "comments";
|
||||
const string pDevicesLinkedGroup = "deviceslinkedgroup";
|
||||
const string pAssignedUsersLinkedGroup = "assigneduserslinkedgroup";
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DeviceBatch.Configure)]
|
||||
public virtual ActionResult Update(int id, string key, string value = null, bool redirect = false)
|
||||
@@ -86,6 +91,12 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
case pComments:
|
||||
UpdateComments(deviceBatch, value);
|
||||
break;
|
||||
case pDevicesLinkedGroup:
|
||||
UpdateDevicesLinkedGroup(deviceBatch, value);
|
||||
break;
|
||||
case pAssignedUsersLinkedGroup:
|
||||
UpdateAssignedUsersLinkedGroup(deviceBatch, value);
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Invalid Update Key");
|
||||
}
|
||||
@@ -193,6 +204,71 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
return Update(id, pComments, Comments, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DeviceBatch.Configure)]
|
||||
public virtual ActionResult UpdateDevicesLinkedGroup(int id, string GroupId = null, bool redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (id < 0)
|
||||
throw new ArgumentOutOfRangeException("id");
|
||||
|
||||
var deviceBatch = Database.DeviceBatches.Find(id);
|
||||
if (deviceBatch == null)
|
||||
throw new ArgumentException("Invalid Device Batch Id", "id");
|
||||
|
||||
var syncTaskStatus = UpdateDevicesLinkedGroup(deviceBatch, GroupId);
|
||||
if (redirect)
|
||||
if (syncTaskStatus == null)
|
||||
return RedirectToAction(MVC.Config.DeviceBatch.Index(deviceBatch.Id));
|
||||
else
|
||||
{
|
||||
syncTaskStatus.SetFinishedUrl(Url.Action(MVC.Config.DeviceBatch.Index(deviceBatch.Id)));
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(syncTaskStatus.SessionId));
|
||||
}
|
||||
else
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (redirect)
|
||||
throw;
|
||||
else
|
||||
return Json(string.Format("Error: {0}", ex.Message), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
[DiscoAuthorize(Claims.Config.DeviceBatch.Configure)]
|
||||
public virtual ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId = null, bool redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (id < 0)
|
||||
throw new ArgumentOutOfRangeException("id");
|
||||
|
||||
var deviceBatch = Database.DeviceBatches.Find(id);
|
||||
if (deviceBatch == null)
|
||||
throw new ArgumentException("Invalid Device Batch Id", "id");
|
||||
|
||||
var syncTaskStatus = UpdateAssignedUsersLinkedGroup(deviceBatch, GroupId);
|
||||
if (redirect)
|
||||
if (syncTaskStatus == null)
|
||||
return RedirectToAction(MVC.Config.DeviceBatch.Index(deviceBatch.Id));
|
||||
else
|
||||
{
|
||||
syncTaskStatus.SetFinishedUrl(Url.Action(MVC.Config.DeviceBatch.Index(deviceBatch.Id)));
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(syncTaskStatus.SessionId));
|
||||
}
|
||||
else
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (redirect)
|
||||
throw;
|
||||
else
|
||||
return Json(string.Format("Error: {0}", ex.Message), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Update Properties
|
||||
@@ -397,6 +473,40 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
deviceBatch.Comments = Comments;
|
||||
Database.SaveChanges();
|
||||
}
|
||||
|
||||
private ScheduledTaskStatus UpdateDevicesLinkedGroup(DeviceBatch DeviceBatch, string DevicesLinkedGroup)
|
||||
{
|
||||
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceBatchDevicesManagedGroup.GetKey(DeviceBatch), DevicesLinkedGroup, null);
|
||||
|
||||
if (DeviceBatch.DevicesLinkedGroup != configJson)
|
||||
{
|
||||
DeviceBatch.DevicesLinkedGroup = configJson;
|
||||
Database.SaveChanges();
|
||||
|
||||
var managedGroup = DeviceBatchDevicesManagedGroup.Initialize(DeviceBatch);
|
||||
if (managedGroup != null) // Sync Group
|
||||
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private ScheduledTaskStatus UpdateAssignedUsersLinkedGroup(DeviceBatch DeviceBatch, string AssignedUsersLinkedGroup)
|
||||
{
|
||||
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceBatchAssignedUsersManagedGroup.GetKey(DeviceBatch), AssignedUsersLinkedGroup, null);
|
||||
|
||||
if (DeviceBatch.AssignedUsersLinkedGroup != configJson)
|
||||
{
|
||||
DeviceBatch.AssignedUsersLinkedGroup = configJson;
|
||||
Database.SaveChanges();
|
||||
|
||||
var managedGroup = DeviceBatchDevicesManagedGroup.Initialize(DeviceBatch);
|
||||
if (managedGroup != null) // Sync Group
|
||||
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Actions
|
||||
|
||||
@@ -131,15 +131,10 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Device.Actions.AssignUser)]
|
||||
public virtual ActionResult UpdateAssignedUserId(string id, string AssignedUserId = null, string AssignedUserDomain = null, bool redirect = false)
|
||||
public virtual ActionResult UpdateAssignedUserId(string id, string AssignedUserId = null, bool redirect = false)
|
||||
{
|
||||
if (AssignedUserId != null && !AssignedUserId.Contains('\\'))
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(AssignedUserDomain))
|
||||
AssignedUserId = string.Format(@"{0}\{1}", ActiveDirectory.Context.PrimaryDomain.NetBiosName, AssignedUserId);
|
||||
else
|
||||
AssignedUserId = string.Format(@"{0}\{1}", AssignedUserDomain, AssignedUserId);
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(AssignedUserId))
|
||||
AssignedUserId = ActiveDirectory.ParseDomainAccountId(AssignedUserId);
|
||||
|
||||
return Update(id, pAssignedUserId, AssignedUserId, redirect);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Devices.ManagedGroups;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Tasks;
|
||||
using Disco.Services.Web;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public partial class DeviceProfileController : AuthorizedDatabaseController
|
||||
{
|
||||
|
||||
const string pDescription = "description";
|
||||
const string pName = "name";
|
||||
const string pShortName = "shortname";
|
||||
@@ -25,6 +25,8 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
const string pProvisionADAccount = "provisionadaccount";
|
||||
const string pAssignedUserLocalAdmin = "assigneduserlocaladmin";
|
||||
const string pAllowUntrustedReimageJobEnrolment = "allowuntrustedreimagejobrnrolment";
|
||||
const string pDevicesLinkedGroup = "deviceslinkedgroup";
|
||||
const string pAssignedUsersLinkedGroup = "assigneduserslinkedgroup";
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DeviceProfile.Configure)]
|
||||
public virtual ActionResult Update(int id, string key, string value = null, Nullable<bool> redirect = null)
|
||||
@@ -82,6 +84,12 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
case pAllowUntrustedReimageJobEnrolment:
|
||||
UpdateAllowUntrustedReimageJobEnrolment(deviceProfile, value);
|
||||
break;
|
||||
case pDevicesLinkedGroup:
|
||||
UpdateDevicesLinkedGroup(deviceProfile, value);
|
||||
break;
|
||||
case pAssignedUsersLinkedGroup:
|
||||
UpdateAssignedUsersLinkedGroup(deviceProfile, value);
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Invalid Update Key");
|
||||
}
|
||||
@@ -183,6 +191,71 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
return Update(id, pAllowUntrustedReimageJobEnrolment, AllowUntrustedReimageJobEnrolment, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DeviceProfile.Configure)]
|
||||
public virtual ActionResult UpdateDevicesLinkedGroup(int id, string GroupId = null, bool redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (id < 0)
|
||||
throw new ArgumentOutOfRangeException("id");
|
||||
|
||||
var deviceProfile = Database.DeviceProfiles.Find(id);
|
||||
if (deviceProfile == null)
|
||||
throw new ArgumentException("Invalid Device Profile Id", "id");
|
||||
|
||||
var syncTaskStatus = UpdateDevicesLinkedGroup(deviceProfile, GroupId);
|
||||
if (redirect)
|
||||
if (syncTaskStatus == null)
|
||||
return RedirectToAction(MVC.Config.DeviceProfile.Index(deviceProfile.Id));
|
||||
else
|
||||
{
|
||||
syncTaskStatus.SetFinishedUrl(Url.Action(MVC.Config.DeviceProfile.Index(deviceProfile.Id)));
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(syncTaskStatus.SessionId));
|
||||
}
|
||||
else
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (redirect)
|
||||
throw;
|
||||
else
|
||||
return Json(string.Format("Error: {0}", ex.Message), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
[DiscoAuthorize(Claims.Config.DeviceProfile.Configure)]
|
||||
public virtual ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId = null, bool redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (id < 0)
|
||||
throw new ArgumentOutOfRangeException("id");
|
||||
|
||||
var deviceProfile = Database.DeviceProfiles.Find(id);
|
||||
if (deviceProfile == null)
|
||||
throw new ArgumentException("Invalid Device Profile Id", "id");
|
||||
|
||||
var syncTaskStatus = UpdateAssignedUsersLinkedGroup(deviceProfile, GroupId);
|
||||
if (redirect)
|
||||
if (syncTaskStatus == null)
|
||||
return RedirectToAction(MVC.Config.DeviceProfile.Index(deviceProfile.Id));
|
||||
else
|
||||
{
|
||||
syncTaskStatus.SetFinishedUrl(Url.Action(MVC.Config.DeviceProfile.Index(deviceProfile.Id)));
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(syncTaskStatus.SessionId));
|
||||
}
|
||||
else
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (redirect)
|
||||
throw;
|
||||
else
|
||||
return Json(string.Format("Error: {0}", ex.Message), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Update Properties
|
||||
@@ -365,6 +438,40 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
throw new Exception("Invalid Boolean Value");
|
||||
}
|
||||
|
||||
private ScheduledTaskStatus UpdateDevicesLinkedGroup(DeviceProfile DeviceProfile, string DevicesLinkedGroup)
|
||||
{
|
||||
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceProfileDevicesManagedGroup.GetKey(DeviceProfile), DevicesLinkedGroup, null);
|
||||
|
||||
if (DeviceProfile.DevicesLinkedGroup != configJson)
|
||||
{
|
||||
DeviceProfile.DevicesLinkedGroup = configJson;
|
||||
Database.SaveChanges();
|
||||
|
||||
var managedGroup = DeviceProfileDevicesManagedGroup.Initialize(DeviceProfile);
|
||||
if (managedGroup != null) // Sync Group
|
||||
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private ScheduledTaskStatus UpdateAssignedUsersLinkedGroup(DeviceProfile DeviceProfile, string AssignedUsersLinkedGroup)
|
||||
{
|
||||
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceProfileAssignedUsersManagedGroup.GetKey(DeviceProfile), AssignedUsersLinkedGroup, null);
|
||||
|
||||
if (DeviceProfile.AssignedUsersLinkedGroup != configJson)
|
||||
{
|
||||
DeviceProfile.AssignedUsersLinkedGroup = configJson;
|
||||
Database.SaveChanges();
|
||||
|
||||
var managedGroup = DeviceProfileAssignedUsersManagedGroup.Initialize(DeviceProfile);
|
||||
if (managedGroup != null) // Sync Group
|
||||
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Actions
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using Disco.BI;
|
||||
using Disco.BI.DocumentTemplateBI.ManagedGroups;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Tasks;
|
||||
using Disco.Services.Users;
|
||||
using Disco.Services.Web;
|
||||
using System;
|
||||
@@ -30,7 +32,10 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
throw new ArgumentNullException("id");
|
||||
if (string.IsNullOrEmpty(key))
|
||||
throw new ArgumentNullException("key");
|
||||
|
||||
ScheduledTaskStatus resultTask = null;
|
||||
var documentTemplate = Database.DocumentTemplates.Find(id);
|
||||
|
||||
if (documentTemplate != null)
|
||||
{
|
||||
switch (key.ToLower())
|
||||
@@ -39,7 +44,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
UpdateDescription(documentTemplate, value);
|
||||
break;
|
||||
case pScope:
|
||||
UpdateScope(documentTemplate, value);
|
||||
resultTask = UpdateScope(documentTemplate, value);
|
||||
break;
|
||||
case pFilterExpression:
|
||||
Authorization.Require(Claims.Config.DocumentTemplate.ConfigureFilterExpression);
|
||||
@@ -57,7 +62,15 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
throw new Exception("Invalid Document Template Id");
|
||||
}
|
||||
if (redirect)
|
||||
return RedirectToAction(MVC.Config.DocumentTemplate.Index(documentTemplate.Id));
|
||||
if (resultTask == null)
|
||||
{
|
||||
return RedirectToAction(MVC.Config.DocumentTemplate.Index(documentTemplate.Id));
|
||||
}
|
||||
else
|
||||
{
|
||||
resultTask.SetFinishedUrl(Url.Action(MVC.Config.DocumentTemplate.Index(documentTemplate.Id)));
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(resultTask.SessionId));
|
||||
}
|
||||
else
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
@@ -163,6 +176,72 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DocumentTemplate.Configure)]
|
||||
public virtual ActionResult UpdateDevicesLinkedGroup(string id, string GroupId = null, DateTime? FilterBeginDate = null, bool redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(id))
|
||||
throw new ArgumentNullException("id");
|
||||
|
||||
var documentTemplate = Database.DocumentTemplates.Find(id);
|
||||
if (documentTemplate == null)
|
||||
throw new ArgumentException("Invalid Document Template Id", "id");
|
||||
|
||||
var syncTaskStatus = UpdateDevicesLinkedGroup(documentTemplate, GroupId, FilterBeginDate);
|
||||
if (redirect)
|
||||
if (syncTaskStatus == null)
|
||||
return RedirectToAction(MVC.Config.DocumentTemplate.Index(documentTemplate.Id));
|
||||
else
|
||||
{
|
||||
syncTaskStatus.SetFinishedUrl(Url.Action(MVC.Config.DocumentTemplate.Index(documentTemplate.Id)));
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(syncTaskStatus.SessionId));
|
||||
}
|
||||
else
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (redirect)
|
||||
throw;
|
||||
else
|
||||
return Json(string.Format("Error: {0}", ex.Message), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DocumentTemplate.Configure)]
|
||||
public virtual ActionResult UpdateUsersLinkedGroup(string id, string GroupId = null, DateTime? FilterBeginDate = null, bool redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(id))
|
||||
throw new ArgumentNullException("id");
|
||||
|
||||
var documentTemplate = Database.DocumentTemplates.Find(id);
|
||||
if (documentTemplate == null)
|
||||
throw new ArgumentException("Invalid Document Template Id", "id");
|
||||
|
||||
var syncTaskStatus = UpdateUsersLinkedGroup(documentTemplate, GroupId, FilterBeginDate);
|
||||
if (redirect)
|
||||
if (syncTaskStatus == null)
|
||||
return RedirectToAction(MVC.Config.DocumentTemplate.Index(documentTemplate.Id));
|
||||
else
|
||||
{
|
||||
syncTaskStatus.SetFinishedUrl(Url.Action(MVC.Config.DocumentTemplate.Index(documentTemplate.Id)));
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(syncTaskStatus.SessionId));
|
||||
}
|
||||
else
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (redirect)
|
||||
throw;
|
||||
else
|
||||
return Json(string.Format("Error: {0}", ex.Message), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Update Properties
|
||||
@@ -176,28 +255,38 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
throw new Exception("Invalid Description");
|
||||
}
|
||||
private void UpdateScope(Disco.Models.Repository.DocumentTemplate documentTemplate, string Scope)
|
||||
private ScheduledTaskStatus UpdateScope(Disco.Models.Repository.DocumentTemplate documentTemplate, string Scope)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(Scope))
|
||||
if (string.IsNullOrWhiteSpace(Scope) || !Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.ToList().Contains(Scope))
|
||||
throw new ArgumentException("Invalid Scope", "Scope");
|
||||
|
||||
Database.Configuration.LazyLoadingEnabled = true;
|
||||
|
||||
if (documentTemplate.Scope != Scope)
|
||||
{
|
||||
if (Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.ToList().Contains(Scope))
|
||||
|
||||
documentTemplate.Scope = Scope;
|
||||
|
||||
if (documentTemplate.Scope != Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.Job &&
|
||||
documentTemplate.JobSubTypes != null)
|
||||
{
|
||||
Database.Configuration.LazyLoadingEnabled = true;
|
||||
|
||||
documentTemplate.Scope = Scope;
|
||||
|
||||
if (documentTemplate.Scope != Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.Job &&
|
||||
documentTemplate.JobSubTypes != null)
|
||||
{
|
||||
foreach (var st in documentTemplate.JobSubTypes.ToArray())
|
||||
documentTemplate.JobSubTypes.Remove(st);
|
||||
}
|
||||
|
||||
Database.SaveChanges();
|
||||
return;
|
||||
foreach (var st in documentTemplate.JobSubTypes.ToArray())
|
||||
documentTemplate.JobSubTypes.Remove(st);
|
||||
}
|
||||
|
||||
Database.SaveChanges();
|
||||
|
||||
// Trigger Managed Group Sync
|
||||
var managedGroups = new ADManagedGroup[] {
|
||||
DocumentTemplateDevicesManagedGroup.Initialize(documentTemplate),
|
||||
DocumentTemplateUsersManagedGroup.Initialize(documentTemplate)
|
||||
};
|
||||
|
||||
if (managedGroups.Any(mg => mg != null)) // Sync Group
|
||||
return ADManagedGroupsSyncTask.ScheduleSync(managedGroups.Where(mg => mg != null));
|
||||
}
|
||||
throw new Exception("Invalid Scope");
|
||||
|
||||
return null;
|
||||
}
|
||||
private void UpdateFilterExpression(Disco.Models.Repository.DocumentTemplate documentTemplate, string FilterExpression)
|
||||
{
|
||||
@@ -257,6 +346,40 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
Database.SaveChanges();
|
||||
}
|
||||
|
||||
private ScheduledTaskStatus UpdateDevicesLinkedGroup(DocumentTemplate DocumentTemplate, string DevicesLinkedGroup, DateTime? FilterBeginDate)
|
||||
{
|
||||
var configJson = ADManagedGroup.ValidConfigurationToJson(DocumentTemplateDevicesManagedGroup.GetKey(DocumentTemplate), DevicesLinkedGroup, FilterBeginDate);
|
||||
|
||||
if (DocumentTemplate.DevicesLinkedGroup != configJson)
|
||||
{
|
||||
DocumentTemplate.DevicesLinkedGroup = configJson;
|
||||
Database.SaveChanges();
|
||||
|
||||
var managedGroup = DocumentTemplateDevicesManagedGroup.Initialize(DocumentTemplate);
|
||||
if (managedGroup != null) // Sync Group
|
||||
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private ScheduledTaskStatus UpdateUsersLinkedGroup(DocumentTemplate DocumentTemplate, string UsersLinkedGroup, DateTime? FilterBeginDate)
|
||||
{
|
||||
var configJson = ADManagedGroup.ValidConfigurationToJson(DocumentTemplateUsersManagedGroup.GetKey(DocumentTemplate), UsersLinkedGroup, FilterBeginDate);
|
||||
|
||||
if (DocumentTemplate.UsersLinkedGroup != configJson)
|
||||
{
|
||||
DocumentTemplate.UsersLinkedGroup = configJson;
|
||||
Database.SaveChanges();
|
||||
|
||||
var managedGroup = DocumentTemplateUsersManagedGroup.Initialize(DocumentTemplate);
|
||||
if (managedGroup != null) // Sync Group
|
||||
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Actions
|
||||
@@ -340,7 +463,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
if (results != null)
|
||||
return Json(results, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return Json(null, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[DiscoAuthorize(Claims.Config.System.Show)]
|
||||
public virtual ActionResult UpdateLastNetworkLogonDates()
|
||||
{
|
||||
var taskStatus = Disco.Services.Interop.ActiveDirectory.ADTaskUpdateNetworkLogonDates.ScheduleImmediately();
|
||||
var taskStatus = Disco.Services.Interop.ActiveDirectory.ADNetworkLogonDatesUpdateTask.ScheduleImmediately();
|
||||
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskStatus.SessionId));
|
||||
}
|
||||
@@ -294,6 +294,17 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
return Json(results, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
[DiscoAuthorizeAny(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult SearchGroupSubjects(string term)
|
||||
{
|
||||
var groupResults = ActiveDirectory.SearchADGroups(term).Cast<IADObject>();
|
||||
|
||||
var results = groupResults.OrderBy(r => r.SamAccountName)
|
||||
.Select(r => Models.Shared.SubjectDescriptorModel.FromActiveDirectoryObject(r)).ToList();
|
||||
|
||||
return Json(results, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
[DiscoAuthorizeAny(Claims.DiscoAdminAccount, Claims.Config.JobQueue.Configure)]
|
||||
public virtual ActionResult Subject(string Id)
|
||||
{
|
||||
@@ -305,6 +316,22 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
return Json(Models.Shared.SubjectDescriptorModel.FromActiveDirectoryObject(subject), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
[DiscoAuthorizeAny(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult SyncActiveDirectoryManagedGroup(string id, string redirectUrl = null)
|
||||
{
|
||||
ADManagedGroup managedGroup;
|
||||
|
||||
if (!ActiveDirectory.Context.ManagedGroups.TryGetValue(id, out managedGroup))
|
||||
throw new ArgumentException("Unknown Managed Group Key");
|
||||
|
||||
var taskStatus = ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
||||
|
||||
if (redirectUrl != null)
|
||||
taskStatus.SetFinishedUrl(redirectUrl);
|
||||
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskStatus.SessionId));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Proxy Settings
|
||||
|
||||
@@ -58,10 +58,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[DiscoAuthorize(Claims.User.Actions.AddAttachments)]
|
||||
public virtual ActionResult AttachmentUpload(string id, string Domain, string Comments)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Domain))
|
||||
id = ActiveDirectory.Context.PrimaryDomain.NetBiosName + @"\" + id;
|
||||
else
|
||||
id = Domain + @"\" + id;
|
||||
id = ActiveDirectory.ParseDomainAccountId(id, Domain);
|
||||
|
||||
var u = Database.Users.Find(id);
|
||||
if (u != null)
|
||||
@@ -120,10 +117,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[DiscoAuthorize(Claims.User.ShowAttachments)]
|
||||
public virtual ActionResult Attachments(string id, string Domain)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Domain))
|
||||
id = ActiveDirectory.Context.PrimaryDomain.NetBiosName + @"\" + id;
|
||||
else
|
||||
id = Domain + @"\" + id;
|
||||
id = ActiveDirectory.ParseDomainAccountId(id, Domain);
|
||||
|
||||
var u = Database.Users.Include("UserAttachments.DocumentTemplate").Include("UserAttachments.TechUser").Where(m => m.UserId == id).FirstOrDefault();
|
||||
if (u != null)
|
||||
@@ -167,10 +161,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
if (string.IsNullOrEmpty(DocumentTemplateId))
|
||||
throw new ArgumentNullException("AttachmentTypeId");
|
||||
|
||||
if (string.IsNullOrEmpty(Domain))
|
||||
id = ActiveDirectory.Context.PrimaryDomain.NetBiosName + @"\" + id;
|
||||
else
|
||||
id = Domain + @"\" + id;
|
||||
id = ActiveDirectory.ParseDomainAccountId(id, Domain);
|
||||
|
||||
var user = Database.Users.Find(id);
|
||||
if (user != null)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Tasks;
|
||||
using Disco.Services.Users.UserFlags;
|
||||
using Disco.Services.Web;
|
||||
@@ -15,6 +17,8 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
const string pDescription = "description";
|
||||
const string pIcon = "icon";
|
||||
const string pIconColour = "iconcolour";
|
||||
const string pAssignedUsersLinkedGroup = "assigneduserslinkedgroup";
|
||||
const string pAssignedUserDevicesLinkedGroup = "assigneduserdeviceslinkedgroup";
|
||||
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult Update(int id, string key, string value = null, Nullable<bool> redirect = null)
|
||||
@@ -44,6 +48,12 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
case pIconColour:
|
||||
UpdateIconColour(flag, value);
|
||||
break;
|
||||
case pAssignedUsersLinkedGroup:
|
||||
UpdateAssignedUsersLinkedGroup(flag, value);
|
||||
break;
|
||||
case pAssignedUserDevicesLinkedGroup:
|
||||
UpdateAssignedUserDevicesLinkedGroup(flag, value);
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Invalid Update Key");
|
||||
}
|
||||
@@ -106,7 +116,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
else
|
||||
{
|
||||
return Json("Invalid User Flag Id", JsonRequestBehavior.AllowGet);
|
||||
throw new ArgumentException("Invalid User Flag Id", "id");
|
||||
}
|
||||
if (redirect)
|
||||
return RedirectToAction(MVC.Config.UserFlag.Index(UserFlag.Id));
|
||||
@@ -121,6 +131,72 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
return Json(string.Format("Error: {0}", ex.Message), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId = null, bool redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (id < 0)
|
||||
throw new ArgumentOutOfRangeException("id");
|
||||
|
||||
var UserFlag = Database.UserFlags.Find(id);
|
||||
if (UserFlag == null)
|
||||
throw new ArgumentException("Invalid User Flag Id", "id");
|
||||
|
||||
|
||||
var syncTaskStatus = UpdateAssignedUsersLinkedGroup(UserFlag, GroupId);
|
||||
if (redirect)
|
||||
if (syncTaskStatus == null)
|
||||
return RedirectToAction(MVC.Config.UserFlag.Index(UserFlag.Id));
|
||||
else
|
||||
{
|
||||
syncTaskStatus.SetFinishedUrl(Url.Action(MVC.Config.UserFlag.Index(UserFlag.Id)));
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(syncTaskStatus.SessionId));
|
||||
}
|
||||
else
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (redirect)
|
||||
throw;
|
||||
else
|
||||
return Json(string.Format("Error: {0}", ex.Message), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult UpdateAssignedUserDevicesLinkedGroup(int id, string GroupId = null, bool redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (id < 0)
|
||||
throw new ArgumentOutOfRangeException("id");
|
||||
|
||||
var UserFlag = Database.UserFlags.Find(id);
|
||||
if (UserFlag == null)
|
||||
throw new ArgumentException("Invalid User Flag Id", "id");
|
||||
|
||||
|
||||
var syncTaskStatus = UpdateAssignedUserDevicesLinkedGroup(UserFlag, GroupId);
|
||||
if (redirect)
|
||||
if (syncTaskStatus == null)
|
||||
return RedirectToAction(MVC.Config.UserFlag.Index(UserFlag.Id));
|
||||
else
|
||||
{
|
||||
syncTaskStatus.SetFinishedUrl(Url.Action(MVC.Config.UserFlag.Index(UserFlag.Id)));
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(syncTaskStatus.SessionId));
|
||||
}
|
||||
else
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (redirect)
|
||||
throw;
|
||||
else
|
||||
return Json(string.Format("Error: {0}", ex.Message), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Update Properties
|
||||
@@ -131,37 +207,98 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
if (string.IsNullOrWhiteSpace(IconColour))
|
||||
throw new ArgumentNullException("IconColour");
|
||||
|
||||
UserFlag.Icon = Icon;
|
||||
UserFlag.IconColour = IconColour;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
if (UserFlag.Icon != Icon ||
|
||||
UserFlag.IconColour != IconColour)
|
||||
{
|
||||
UserFlag.Icon = Icon;
|
||||
UserFlag.IconColour = IconColour;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
}
|
||||
}
|
||||
private void UpdateIcon(UserFlag UserFlag, string Icon)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Icon))
|
||||
throw new ArgumentNullException("Icon");
|
||||
|
||||
UserFlag.Icon = Icon;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
if (UserFlag.Icon != Icon)
|
||||
{
|
||||
UserFlag.Icon = Icon;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
}
|
||||
}
|
||||
private void UpdateIconColour(UserFlag UserFlag, string IconColour)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(IconColour))
|
||||
throw new ArgumentNullException("IconColour");
|
||||
|
||||
UserFlag.IconColour = IconColour;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
if (UserFlag.IconColour != IconColour)
|
||||
{
|
||||
UserFlag.IconColour = IconColour;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateName(UserFlag UserFlag, string Name)
|
||||
{
|
||||
UserFlag.Name = Name;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
if (UserFlag.Name != Name)
|
||||
{
|
||||
UserFlag.Name = Name;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateDescription(UserFlag UserFlag, string Description)
|
||||
{
|
||||
UserFlag.Description = Description;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
if (UserFlag.Description != Description)
|
||||
{
|
||||
UserFlag.Description = Description;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
}
|
||||
}
|
||||
|
||||
private ScheduledTaskStatus UpdateAssignedUsersLinkedGroup(UserFlag UserFlag, string AssignedUsersLinkedGroup)
|
||||
{
|
||||
var configJson = ADManagedGroup.ValidConfigurationToJson(UserFlagUsersManagedGroup.GetKey(UserFlag), AssignedUsersLinkedGroup, null);
|
||||
|
||||
if (UserFlag.UsersLinkedGroup != configJson)
|
||||
{
|
||||
UserFlag.UsersLinkedGroup = configJson;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
|
||||
if (UserFlag.UsersLinkedGroup != null)
|
||||
{
|
||||
// Sync Group
|
||||
UserFlagUsersManagedGroup managedGroup;
|
||||
if (UserFlagUsersManagedGroup.TryGetManagedGroup(UserFlag, out managedGroup))
|
||||
{
|
||||
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
private ScheduledTaskStatus UpdateAssignedUserDevicesLinkedGroup(UserFlag UserFlag, string AssignedUserDevicesLinkedGroup)
|
||||
{
|
||||
var configJson = ADManagedGroup.ValidConfigurationToJson(UserFlagUserDevicesManagedGroup.GetKey(UserFlag), AssignedUserDevicesLinkedGroup, null);
|
||||
|
||||
if (UserFlag.UserDevicesLinkedGroup != configJson)
|
||||
{
|
||||
UserFlag.UserDevicesLinkedGroup = configJson;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
|
||||
if (UserFlag.UserDevicesLinkedGroup != null)
|
||||
{
|
||||
// Sync Group
|
||||
UserFlagUserDevicesManagedGroup managedGroup;
|
||||
if (UserFlagUserDevicesManagedGroup.TryGetManagedGroup(UserFlag, out managedGroup))
|
||||
{
|
||||
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -218,7 +355,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
throw new ArgumentException("Invalid User Flag Id", "id");
|
||||
|
||||
var assignedUsers = Database.UserFlagAssignments.Where(a => a.UserFlagId == userFlag.Id && !a.RemovedDate.HasValue).OrderBy(a => a.UserId).Select(a => a.UserId).ToList();
|
||||
|
||||
|
||||
return Json(assignedUsers, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.UI.Config.DeviceBatch;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Devices.ManagedGroups;
|
||||
using Disco.Services.Plugins.Features.UIExtension;
|
||||
using Disco.Services.Web;
|
||||
using System;
|
||||
@@ -36,6 +37,13 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
DeviceDecommissionedCount = dG.Count(d => d.DecommissionedDate.HasValue)
|
||||
}).ToArray().Cast<ConfigDeviceBatchShowModelMembership>().ToList();
|
||||
|
||||
DeviceBatchAssignedUsersManagedGroup assignedUsersManagedGroup;
|
||||
if (DeviceBatchAssignedUsersManagedGroup.TryGetManagedGroup(m.DeviceBatch, out assignedUsersManagedGroup))
|
||||
m.AssignedUsersLinkedGroup = assignedUsersManagedGroup;
|
||||
DeviceBatchDevicesManagedGroup devicesManagedGroup;
|
||||
if (DeviceBatchDevicesManagedGroup.TryGetManagedGroup(m.DeviceBatch, out devicesManagedGroup))
|
||||
m.DevicesLinkedGroup = devicesManagedGroup;
|
||||
|
||||
if (Authorization.Has(Claims.Config.DeviceBatch.Delete))
|
||||
m.CanDelete = m.DeviceBatch.CanDelete(Database);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.UI.Config.DeviceProfile;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Devices.ManagedGroups;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Plugins;
|
||||
using Disco.Services.Plugins.Features.CertificateProvider;
|
||||
@@ -36,6 +37,13 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
if (m.DeviceProfile.DefaultOrganisationAddress.HasValue)
|
||||
m.DefaultOrganisationAddress = Database.DiscoConfiguration.OrganisationAddresses.GetAddress(m.DeviceProfile.DefaultOrganisationAddress.Value);
|
||||
|
||||
DeviceProfileAssignedUsersManagedGroup assignedUsersManagedGroup;
|
||||
if (DeviceProfileAssignedUsersManagedGroup.TryGetManagedGroup(m.DeviceProfile, out assignedUsersManagedGroup))
|
||||
m.AssignedUsersLinkedGroup = assignedUsersManagedGroup;
|
||||
DeviceProfileDevicesManagedGroup devicesManagedGroup;
|
||||
if (DeviceProfileDevicesManagedGroup.TryGetManagedGroup(m.DeviceProfile, out devicesManagedGroup))
|
||||
m.DevicesLinkedGroup = devicesManagedGroup;
|
||||
|
||||
m.CertificateProviders = Plugins.GetPluginFeatures(typeof(CertificateProviderFeature));
|
||||
|
||||
var DistributionValues = Enum.GetValues(typeof(Disco.Models.Repository.DeviceProfile.DistributionTypes));
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.BI.DocumentTemplateBI.ManagedGroups;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.UI.Config.DocumentTemplate;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Plugins.Features.UIExtension;
|
||||
@@ -33,6 +34,13 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
m.TemplateExpressions = m.DocumentTemplate.ExtractPdfExpressions(Database);
|
||||
m.UpdateModel(Database);
|
||||
|
||||
DocumentTemplateDevicesManagedGroup devicesManagedGroup;
|
||||
if (DocumentTemplateDevicesManagedGroup.TryGetManagedGroup(m.DocumentTemplate, out devicesManagedGroup))
|
||||
m.DevicesLinkedGroup = devicesManagedGroup;
|
||||
DocumentTemplateUsersManagedGroup usersManagedGroup;
|
||||
if (DocumentTemplateUsersManagedGroup.TryGetManagedGroup(m.DocumentTemplate, out usersManagedGroup))
|
||||
m.UsersLinkedGroup = usersManagedGroup;
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<ConfigDocumentTemplateShowModel>(this.ControllerContext, m);
|
||||
|
||||
|
||||
@@ -30,6 +30,13 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
if (m == null)
|
||||
throw new ArgumentException("Invalid User Flag Id");
|
||||
|
||||
UserFlagUsersManagedGroup assignedUsersManagedGroup;
|
||||
if (UserFlagUsersManagedGroup.TryGetManagedGroup(m.UserFlag, out assignedUsersManagedGroup))
|
||||
m.UsersLinkedGroup = assignedUsersManagedGroup;
|
||||
UserFlagUserDevicesManagedGroup assignedUserDevicesManagedGroup;
|
||||
if (UserFlagUserDevicesManagedGroup.TryGetManagedGroup(m.UserFlag, out assignedUserDevicesManagedGroup))
|
||||
m.UserDevicesLinkedGroup = assignedUserDevicesManagedGroup;
|
||||
|
||||
if (Authorization.Has(Claims.Config.UserFlag.Configure))
|
||||
{
|
||||
m.Icons = UIHelpers.Icons;
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
using Disco.Models.UI.Config.DeviceBatch;
|
||||
using System;
|
||||
using Disco.Services.Devices.ManagedGroups;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceBatch
|
||||
{
|
||||
public class ShowModel : ConfigDeviceBatchShowModel
|
||||
{
|
||||
public Disco.Models.Repository.DeviceBatch DeviceBatch { get; set; }
|
||||
|
||||
public Disco.Models.Repository.DeviceModel DefaultDeviceModel { get; set; }
|
||||
|
||||
public List<Disco.Models.Repository.DeviceModel> DeviceModels { get; set; }
|
||||
public List<ConfigDeviceBatchShowModelMembership> DeviceModelMembers { get; set; }
|
||||
|
||||
public DeviceBatchAssignedUsersManagedGroup AssignedUsersLinkedGroup { get; set; }
|
||||
public DeviceBatchDevicesManagedGroup DevicesLinkedGroup { get; set; }
|
||||
|
||||
public int DeviceCount { get; set; }
|
||||
public int DeviceDecommissionedCount { get; set; }
|
||||
public bool CanDelete { get; set; }
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Disco.Services.Plugins;
|
||||
using Disco.Models.UI.Config.DeviceProfile;
|
||||
using Disco.Models.UI.Config.DeviceProfile;
|
||||
using Disco.Services.Devices.ManagedGroups;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Plugins;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
{
|
||||
@@ -16,6 +14,9 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
public Disco.Models.BI.Config.OrganisationAddress DefaultOrganisationAddress { get; set; }
|
||||
public List<Disco.Models.BI.Config.OrganisationAddress> OrganisationAddresses { get; set; }
|
||||
|
||||
public DeviceProfileAssignedUsersManagedGroup AssignedUsersLinkedGroup { get; set; }
|
||||
public DeviceProfileDevicesManagedGroup DevicesLinkedGroup { get; set; }
|
||||
|
||||
public string FriendlyOrganisationalUnitName
|
||||
{
|
||||
get
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Web;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.UI.Config.DocumentTemplate;
|
||||
using Disco.BI.DocumentTemplateBI.ManagedGroups;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||
{
|
||||
@@ -26,6 +27,9 @@ namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||
}
|
||||
}
|
||||
|
||||
public DocumentTemplateDevicesManagedGroup DevicesLinkedGroup { get; set; }
|
||||
public DocumentTemplateUsersManagedGroup UsersLinkedGroup { get; set; }
|
||||
|
||||
public void UpdateModel(DiscoDataContext Database)
|
||||
{
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.Shared
|
||||
{
|
||||
public class LinkedGroupModel
|
||||
{
|
||||
public bool CanConfigure { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
public string CategoryDescription { get; set; }
|
||||
|
||||
public string UpdateUrl { get; set; }
|
||||
|
||||
public ADManagedGroup ManagedGroup { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Disco.Models.UI.Config.UserFlag;
|
||||
using Disco.Services.Users.UserFlags;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.UserFlag
|
||||
@@ -10,6 +11,9 @@ namespace Disco.Web.Areas.Config.Models.UserFlag
|
||||
public int CurrentAssignmentCount { get; set; }
|
||||
public int TotalAssignmentCount { get; set; }
|
||||
|
||||
public UserFlagUsersManagedGroup UsersLinkedGroup { get; set; }
|
||||
public UserFlagUserDevicesManagedGroup UserDevicesLinkedGroup { get; set; }
|
||||
|
||||
public IEnumerable<KeyValuePair<string, string>> Icons { get; set; }
|
||||
public IEnumerable<KeyValuePair<string, string>> ThemeColours { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
@model Disco.Web.Areas.Config.Models.DeviceBatch.ShowModel
|
||||
@using Disco.Services.Devices.ManagedGroups;
|
||||
@using Disco.Web.Areas.Config.Models.Shared;
|
||||
@{
|
||||
Authorization.Require(Claims.Config.DeviceBatch.Show);
|
||||
|
||||
@@ -7,6 +9,10 @@
|
||||
var canConfig = Authorization.Has(Claims.Config.DeviceBatch.Configure);
|
||||
var canDeviceModelShow = Authorization.Has(Claims.Config.DeviceModel.Show);
|
||||
|
||||
var hideAdvanced =
|
||||
Model.DeviceBatch.AssignedUsersLinkedGroup == null &&
|
||||
Model.DeviceBatch.DevicesLinkedGroup == null;
|
||||
|
||||
if (canConfig)
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
@@ -14,7 +20,7 @@
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/tinymce");
|
||||
}
|
||||
}
|
||||
<div class="form deviceBatches" style="width: 730px">
|
||||
<div class="form deviceBatches@(hideAdvanced ? " Config_HideAdvanced" : null)" style="width: 730px">
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 150px">Id:
|
||||
@@ -652,6 +658,54 @@
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
@if (hideAdvanced)
|
||||
{
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: right;">
|
||||
<button id="Config_HideAdvanced_Show" class="button small">Show Advanced Options</button>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#Config_HideAdvanced_Show').click(function () {
|
||||
var $this = $(this);
|
||||
$this.closest('.Config_HideAdvanced').removeClass('Config_HideAdvanced');
|
||||
$this.closest('tr').remove();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
<tr class="Config_HideAdvanced_Item">
|
||||
<th>Linked Groups:
|
||||
</th>
|
||||
<td>
|
||||
<div>
|
||||
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
||||
{
|
||||
CanConfigure = canConfig,
|
||||
CategoryDescription = DeviceBatchDevicesManagedGroup.GetCategoryDescription(Model.DeviceBatch),
|
||||
Description = DeviceBatchDevicesManagedGroup.GetDescription(Model.DeviceBatch),
|
||||
ManagedGroup = Model.DevicesLinkedGroup,
|
||||
UpdateUrl = Url.Action(MVC.API.DeviceBatch.UpdateDevicesLinkedGroup(Model.DeviceBatch.Id, redirect: true))
|
||||
})
|
||||
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
||||
{
|
||||
CanConfigure = canConfig,
|
||||
CategoryDescription = DeviceBatchAssignedUsersManagedGroup.GetCategoryDescription(Model.DeviceBatch),
|
||||
Description = DeviceBatchAssignedUsersManagedGroup.GetDescription(Model.DeviceBatch),
|
||||
ManagedGroup = Model.AssignedUsersLinkedGroup,
|
||||
UpdateUrl = Url.Action(MVC.API.DeviceBatch.UpdateAssignedUsersLinkedGroup(Model.DeviceBatch.Id, redirect: true))
|
||||
})
|
||||
@if (canConfig)
|
||||
{
|
||||
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared)
|
||||
}
|
||||
</div>
|
||||
<div style="padding: 0.7em 0.7em;" class="ui-state-highlight ui-corner-all">
|
||||
<i class="fa fa-info-circle information"></i> Linked Active Directory Groups are automatically synchronized to include members currently associated with this Device Batch.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="actionBar">
|
||||
@@ -670,4 +724,4 @@
|
||||
@Html.ActionLinkButton(string.Format("View {0} Device{1}", Model.DeviceCount, (Model.DeviceCount != 1 ? "s" : null)), MVC.Search.Query(Model.DeviceBatch.Id.ToString(), "DeviceBatch"))
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,6 @@
|
||||
@model Disco.Web.Areas.Config.Models.DeviceProfile.ShowModel
|
||||
@using Disco.Services.Devices.ManagedGroups;
|
||||
@using Disco.Web.Areas.Config.Models.Shared;
|
||||
@{
|
||||
Authorization.Require(Claims.Config.DeviceProfile.Show);
|
||||
|
||||
@@ -8,13 +10,17 @@
|
||||
var canConfigExpression = Authorization.Has(Claims.Config.DeviceProfile.ConfigureComputerNameTemplate);
|
||||
var canDelete = (Authorization.Has(Claims.Config.DeviceProfile.Delete) && Model.CanDelete);
|
||||
|
||||
var hideAdvanced =
|
||||
Model.DeviceProfile.AssignedUsersLinkedGroup == null &&
|
||||
Model.DeviceProfile.DevicesLinkedGroup == null;
|
||||
|
||||
if (canConfig)
|
||||
{
|
||||
Html.BundleDeferred("~/Style/Fancytree");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-Fancytree");
|
||||
}
|
||||
}
|
||||
<div id="configurationDeviceProfileShow" class="form" style="width: 640px">
|
||||
<div id="configurationDeviceProfileShow" class="form@(hideAdvanced ? " Config_HideAdvanced" : null)" style="width: 640px">
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 170px;">Id:
|
||||
@@ -689,6 +695,54 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@if (hideAdvanced)
|
||||
{
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: right;">
|
||||
<button id="Config_HideAdvanced_Show" class="button small">Show Advanced Options</button>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#Config_HideAdvanced_Show').click(function () {
|
||||
var $this = $(this);
|
||||
$this.closest('.Config_HideAdvanced').removeClass('Config_HideAdvanced');
|
||||
$this.closest('tr').remove();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
<tr class="Config_HideAdvanced_Item">
|
||||
<th>Linked Groups:
|
||||
</th>
|
||||
<td>
|
||||
<div>
|
||||
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
||||
{
|
||||
CanConfigure = canConfig,
|
||||
CategoryDescription = DeviceProfileDevicesManagedGroup.GetCategoryDescription(Model.DeviceProfile),
|
||||
Description = DeviceProfileDevicesManagedGroup.GetDescription(Model.DeviceProfile),
|
||||
ManagedGroup = Model.DevicesLinkedGroup,
|
||||
UpdateUrl = Url.Action(MVC.API.DeviceProfile.UpdateDevicesLinkedGroup(Model.DeviceProfile.Id, redirect: true))
|
||||
})
|
||||
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
||||
{
|
||||
CanConfigure = canConfig,
|
||||
CategoryDescription = DeviceProfileAssignedUsersManagedGroup.GetCategoryDescription(Model.DeviceProfile),
|
||||
Description = DeviceProfileAssignedUsersManagedGroup.GetDescription(Model.DeviceProfile),
|
||||
ManagedGroup = Model.AssignedUsersLinkedGroup,
|
||||
UpdateUrl = Url.Action(MVC.API.DeviceProfile.UpdateAssignedUsersLinkedGroup(Model.DeviceProfile.Id, redirect: true))
|
||||
})
|
||||
@if (canConfig)
|
||||
{
|
||||
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared)
|
||||
}
|
||||
</div>
|
||||
<div style="padding: 0.7em 0.7em;" class="ui-state-highlight ui-corner-all">
|
||||
<i class="fa fa-info-circle information"></i> Linked Active Directory Groups are automatically synchronized to include members currently associated with this Device Profile.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@if (canDelete)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,24 +10,24 @@
|
||||
Expressions within Disco are based on the <a href="http://www.springframework.net/"
|
||||
target="_blank">Spring.NET Framework</a>. Please refer to the <a href="http://www.springframework.net/doc-latest/reference/html/expressions.html"
|
||||
target="_blank">Expression Evaluation</a> documentation.
|
||||
<h2>
|
||||
<h2 id="DeviceScope">
|
||||
Device Scope</h2>
|
||||
<div id="deviceScopeTree" class="expressionTree">
|
||||
</div>
|
||||
<h2>
|
||||
<h2 id="JobScope">
|
||||
Job Scope</h2>
|
||||
<div id="jobScopeTree" class="expressionTree">
|
||||
</div>
|
||||
<h2>
|
||||
<h2 id="UserScope">
|
||||
User Scope</h2>
|
||||
<div id="userScopeTree" class="expressionTree">
|
||||
</div>
|
||||
<h2>
|
||||
<h2 id="Variables">
|
||||
Variables
|
||||
</h2>
|
||||
<div id="variableScopeTree" class="expressionTree">
|
||||
</div>
|
||||
<h2>
|
||||
<h2 id="ExtensionLibraries">
|
||||
Extension Libraries</h2>
|
||||
<div id="extScopeTree" class="expressionTree">
|
||||
</div>
|
||||
|
||||
@@ -73,32 +73,51 @@ WriteLiteral(" href=\"http://www.springframework.net/doc-latest/reference/html/e
|
||||
|
||||
WriteLiteral("\r\n target=\"_blank\"");
|
||||
|
||||
WriteLiteral(">Expression Evaluation</a> documentation.\r\n <h2>\r\n Device Scope</h2>\r\n " +
|
||||
" <div");
|
||||
WriteLiteral(">Expression Evaluation</a> documentation.\r\n <h2");
|
||||
|
||||
WriteLiteral(" id=\"DeviceScope\"");
|
||||
|
||||
WriteLiteral(">\r\n Device Scope</h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"deviceScopeTree\"");
|
||||
|
||||
WriteLiteral(" class=\"expressionTree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <h2>\r\n Job Scope</h2>\r\n <div");
|
||||
WriteLiteral(">\r\n </div>\r\n <h2");
|
||||
|
||||
WriteLiteral(" id=\"JobScope\"");
|
||||
|
||||
WriteLiteral(">\r\n Job Scope</h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"jobScopeTree\"");
|
||||
|
||||
WriteLiteral(" class=\"expressionTree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <h2>\r\n User Scope</h2>\r\n <div");
|
||||
WriteLiteral(">\r\n </div>\r\n <h2");
|
||||
|
||||
WriteLiteral(" id=\"UserScope\"");
|
||||
|
||||
WriteLiteral(">\r\n User Scope</h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"userScopeTree\"");
|
||||
|
||||
WriteLiteral(" class=\"expressionTree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <h2>\r\n Variables\r\n </h2>\r\n <div");
|
||||
WriteLiteral(">\r\n </div>\r\n <h2");
|
||||
|
||||
WriteLiteral(" id=\"Variables\"");
|
||||
|
||||
WriteLiteral(">\r\n Variables\r\n </h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"variableScopeTree\"");
|
||||
|
||||
WriteLiteral(" class=\"expressionTree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <h2>\r\n Extension Libraries</h2>\r\n <div");
|
||||
WriteLiteral(">\r\n </div>\r\n <h2");
|
||||
|
||||
WriteLiteral(" id=\"ExtensionLibraries\"");
|
||||
|
||||
WriteLiteral(">\r\n Extension Libraries</h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"extScopeTree\"");
|
||||
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
@model Disco.Web.Areas.Config.Models.DocumentTemplate.ShowModel
|
||||
@using Disco.BI.DocumentTemplateBI.ManagedGroups;
|
||||
@using Disco.Services.Interop.ActiveDirectory;
|
||||
@using Disco.Web.Areas.Config.Models.Shared;
|
||||
@{
|
||||
Authorization.Require(Claims.Config.DocumentTemplate.Show);
|
||||
|
||||
var canConfig = Authorization.Has(Claims.Config.DocumentTemplate.Configure);
|
||||
|
||||
var hideAdvanced =
|
||||
Model.DocumentTemplate.UsersLinkedGroup == null &&
|
||||
Model.DocumentTemplate.DevicesLinkedGroup == null &&
|
||||
Model.DocumentTemplate.FilterExpression == null &&
|
||||
Model.TemplateExpressions.All(e => e.All(p => !p.ParseError));
|
||||
|
||||
#region Can Bulk Generate
|
||||
var canBulkGenerate = Authorization.Has(Claims.Config.DocumentTemplate.BulkGenerate);
|
||||
if (canBulkGenerate)
|
||||
@@ -28,243 +36,179 @@
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), Model.DocumentTemplate.Description);
|
||||
}
|
||||
<div class="form" style="width: 650px">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Id:
|
||||
</th>
|
||||
<td>@Html.DisplayFor(model => model.DocumentTemplate.Id)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Stored Instances:
|
||||
</th>
|
||||
<td>@Html.DisplayFor(model => model.StoredInstanceCount)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Description:
|
||||
</th>
|
||||
<td>@if (canConfig)
|
||||
{
|
||||
@Html.TextBoxFor(model => model.DocumentTemplate.Description)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $Description = $('#DocumentTemplate_Description');
|
||||
var $DescriptionAjaxSave = $Description.next('.ajaxSave');
|
||||
$Description
|
||||
.watermark('Description')
|
||||
.focus(function () { $Description.select() })
|
||||
.keydown(function (e) {
|
||||
$DescriptionAjaxSave.show();
|
||||
if (e.which == 13) {
|
||||
$(this).blur();
|
||||
}
|
||||
}).blur(function () {
|
||||
$DescriptionAjaxSave.hide();
|
||||
})
|
||||
.change(function () {
|
||||
$DescriptionAjaxSave.hide();
|
||||
var $ajaxLoading = $DescriptionAjaxSave.next('.ajaxLoading').show();
|
||||
var data = { Description: $Description.val() };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.DocumentTemplate.UpdateDescription(Model.DocumentTemplate.Id))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
} else {
|
||||
$ajaxLoading.hide();
|
||||
alert('Unable to update description: ' + d);
|
||||
<div id="Config_DocumentTemplates_Show" class="@(hideAdvanced ? "Config_HideAdvanced" : null)">
|
||||
<div class="form" style="width: 650px; margin: 10px auto 20px;">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id:
|
||||
</th>
|
||||
<td>@Html.DisplayFor(model => model.DocumentTemplate.Id)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Statistics:
|
||||
</th>
|
||||
<td>
|
||||
<strong>@Html.DisplayFor(model => model.StoredInstanceCount)</strong> Stored Instance@(Model.StoredInstanceCount == 1 ? null : "s")
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Description:
|
||||
</th>
|
||||
<td>@if (canConfig)
|
||||
{
|
||||
@Html.TextBoxFor(model => model.DocumentTemplate.Description)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $Description = $('#DocumentTemplate_Description');
|
||||
var $DescriptionAjaxSave = $Description.next('.ajaxSave');
|
||||
$Description
|
||||
.watermark('Description')
|
||||
.focus(function () { $Description.select() })
|
||||
.keydown(function (e) {
|
||||
$DescriptionAjaxSave.show();
|
||||
if (e.which == 13) {
|
||||
$(this).blur();
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update description: ' + textStatus);
|
||||
$ajaxLoading.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(Model.DocumentTemplate.Description))
|
||||
{
|
||||
<span class="smallMessage"><None Specified></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.DocumentTemplate.Description
|
||||
}
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Always Flatten Form:
|
||||
</th>
|
||||
<td>@if (canConfig)
|
||||
{
|
||||
<input id="DocumentTemplate_FlattenForm" type="checkbox" @(Model.DocumentTemplate.FlattenForm ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty))/>
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#DocumentTemplate_FlattenForm').click(function () {
|
||||
var $this = $(this);
|
||||
var $ajaxLoading = $this.next('.ajaxLoading').show();
|
||||
var data = { FlattenForm: $this.is(':checked') };
|
||||
$.getJSON('@(Url.Action(MVC.API.DocumentTemplate.UpdateFlattenForm(Model.DocumentTemplate.Id)))', data, function (response, result) {
|
||||
if (result != 'success' || response != 'OK') {
|
||||
alert('Unable to change Flatten Form:\n' + response);
|
||||
$ajaxLoading.hide();
|
||||
} else {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
<input id="DocumentTemplate_FlattenForm" type="checkbox" @(Model.DocumentTemplate.FlattenForm ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty)) disabled="disabled" />
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Scope:
|
||||
</th>
|
||||
<td>@if (canConfig)
|
||||
{
|
||||
@Html.DropDownListFor(model => model.DocumentTemplate.Scope, Model.Scopes.ToSelectListItems(null))
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $scope = $('#DocumentTemplate_Scope');
|
||||
$scope.change(function () {
|
||||
var $ajaxLoading = $scope.next('.ajaxLoading').show();
|
||||
var data = { Scope: $scope.val() };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.DocumentTemplate.UpdateScope(Model.DocumentTemplate.Id))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
scopeChange();
|
||||
} else {
|
||||
$ajaxLoading.hide();
|
||||
alert('Unable to update scope: ' + d);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update scope: ' + textStatus);
|
||||
$ajaxLoading.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var $JobSubTypes = $('#Config_DocumentTemplates_JobSubTypes');
|
||||
|
||||
function scopeChange() {
|
||||
if ($scope.val() == 'Job') {
|
||||
$JobSubTypes.slideDown('fast');
|
||||
} else {
|
||||
$JobSubTypes.slideUp('fast');
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div>@Model.DocumentTemplate.Scope</div>
|
||||
}
|
||||
@if (canConfig || (Model.DocumentTemplate.Scope == DocumentTemplate.DocumentTemplateScopes.Job))
|
||||
{
|
||||
<div id="Config_DocumentTemplates_JobSubTypes" @(Model.DocumentTemplate.Scope != DocumentTemplate.DocumentTemplateScopes.Job ? "style=\"display: none;\" " : null)>
|
||||
<h4>Filter:</h4>
|
||||
<div>
|
||||
@if (Model.DocumentTemplate.JobSubTypes.Count > 0)
|
||||
{
|
||||
<ul>
|
||||
@foreach (var jobType in Model.DocumentTemplate.JobSubTypes.GroupBy(jst => jst.JobType).OrderBy(jtg => jtg.Key.Description))
|
||||
{
|
||||
<li>
|
||||
@jobType.Key.Description
|
||||
<ul>
|
||||
@if (jobType.Count() == Model.JobTypes.FirstOrDefault(jt => jt.Id == jobType.Key.Id).JobSubTypes.Count)
|
||||
{
|
||||
<li><span class="smallMessage">[All Sub Types]</span></li>
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var jobSubType in jobType)
|
||||
{
|
||||
<li>@jobSubType.Description</li>
|
||||
}).blur(function () {
|
||||
$DescriptionAjaxSave.hide();
|
||||
})
|
||||
.change(function () {
|
||||
$DescriptionAjaxSave.hide();
|
||||
var $ajaxLoading = $DescriptionAjaxSave.next('.ajaxLoading').show();
|
||||
var data = { Description: $Description.val() };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.DocumentTemplate.UpdateDescription(Model.DocumentTemplate.Id))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
} else {
|
||||
$ajaxLoading.hide();
|
||||
alert('Unable to update description: ' + d);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update description: ' + textStatus);
|
||||
$ajaxLoading.hide();
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(Model.DocumentTemplate.Description))
|
||||
{
|
||||
<span class="smallMessage"><None Specified></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage"><No Filter></span>
|
||||
@Model.DocumentTemplate.Description
|
||||
}
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Always Flatten Form:
|
||||
</th>
|
||||
<td>@if (canConfig)
|
||||
{
|
||||
<input id="DocumentTemplate_FlattenForm" type="checkbox" @(Model.DocumentTemplate.FlattenForm ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty))/>
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#DocumentTemplate_FlattenForm').click(function () {
|
||||
var $this = $(this);
|
||||
var $ajaxLoading = $this.next('.ajaxLoading').show();
|
||||
var data = { FlattenForm: $this.is(':checked') };
|
||||
$.getJSON('@(Url.Action(MVC.API.DocumentTemplate.UpdateFlattenForm(Model.DocumentTemplate.Id)))', data, function (response, result) {
|
||||
if (result != 'success' || response != 'OK') {
|
||||
alert('Unable to change Flatten Form:\n' + response);
|
||||
$ajaxLoading.hide();
|
||||
} else {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
<input id="DocumentTemplate_FlattenForm" type="checkbox" @(Model.DocumentTemplate.FlattenForm ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty)) disabled="disabled" />
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Scope:
|
||||
</th>
|
||||
<td>
|
||||
<h4>@Model.DocumentTemplate.Scope Scope</h4>
|
||||
<div class="infoBox">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-info-circle"></i>This template is generated from @(Model.DocumentTemplate.Scope)s. Any expressions within the Template PDF will be evaluated within the <a href="@(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()))#@(Model.DocumentTemplate.Scope)Scope">@(Model.DocumentTemplate.Scope) Scope</a>.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<button id="Config_DocumentTemplates_Scope_Button" class="button small">Change Scope</button>
|
||||
</div>
|
||||
@if (canConfig)
|
||||
{
|
||||
<a id="Config_DocumentTemplates_JobSubTypes_Update" href="#" class="button small">Update</a>
|
||||
<div id="Config_DocumentTemplates_JobSubTypes_Update_Dialog" class="dialog" title="Job Type Filter">
|
||||
@using (Html.BeginForm(MVC.API.DocumentTemplate.UpdateJobSubTypes(Model.DocumentTemplate.Id, null, true)))
|
||||
<div id="Config_DocumentTemplates_Scope_Dialog" title="Change Document Template Scope" class="dialog">
|
||||
@using (Html.BeginForm(MVC.API.DocumentTemplate.UpdateScope(Model.DocumentTemplate.Id, redirect: true)))
|
||||
{
|
||||
var selectedTypes = Model.DocumentTemplate.JobSubTypes.Select(jst => jst.JobType).Distinct().ToList();
|
||||
foreach (var jt in Model.JobTypes)
|
||||
{
|
||||
<div class="jobTypes">
|
||||
<h4>
|
||||
<input id="Types_@(jt.Id)" class="jobType" type="checkbox" value="@(jt.Id)" @(selectedTypes.Contains(jt) ? "checked=\"checked\"" : null) /><label for="Types_@(jt.Id)">@jt.Description</label></h4>
|
||||
<div id="SubTypes_@(jt.Id)" class="jobSubTypes">
|
||||
@CommonHelpers.CheckboxBulkSelect(string.Format("CheckboxBulkSelect_{0}", jt.Id), "div")
|
||||
@CommonHelpers.CheckBoxList("JobSubTypes", jt.JobSubTypes.OrderBy(jst => jst.Description).ToSelectListItems(Model.DocumentTemplate.JobSubTypes), 2)
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="input">
|
||||
<label for="Config_DocumentTemplates_Scope_Scope">Scope: </label>
|
||||
<select id="Config_DocumentTemplates_Scope_Scope" name="Scope">
|
||||
@foreach (var scope in Model.Scopes)
|
||||
{
|
||||
<option value="@scope" selected="@(scope == Model.DocumentTemplate.Scope ? "selected" : null)">@scope</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
}
|
||||
<div class="infoBox">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-info-circle"></i>Expressions within the Template PDF may need to be updated to reflect any changes to the Document Template Scope.
|
||||
</p>
|
||||
</div>
|
||||
@if (Model.DocumentTemplate.UsersLinkedGroup != null || Model.DocumentTemplate.DevicesLinkedGroup != null)
|
||||
{
|
||||
<div class="infoBox error">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-exclamation-circle"></i><strong>Warning:</strong> This Document Template contains Linked Groups, these will be automatically updated to reflect the new Document Template Scope which <strong>may result in undesired behaviour</strong>.
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var dialog;
|
||||
|
||||
function showDialog() {
|
||||
if (!dialog) {
|
||||
dialog = $('#Config_DocumentTemplates_JobSubTypes_Update_Dialog').dialog({
|
||||
if (dialog == null) {
|
||||
dialog = $('#Config_DocumentTemplates_Scope_Dialog').dialog({
|
||||
width: 400,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
width: 750,
|
||||
height: 620,
|
||||
buttons: {
|
||||
"Save Changes": saveChanges,
|
||||
Cancel: cancel
|
||||
'Save Changes': function () {
|
||||
dialog.dialog('option', 'buttons', null);
|
||||
dialog.dialog('disable');
|
||||
$('#Config_DocumentTemplates_Scope_Scope').closest('form').submit();
|
||||
},
|
||||
'Cancel': function () {
|
||||
dialog.dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
dialog.find('.jobSubTypes').hide();
|
||||
dialog.on('change', 'input.jobType', function () {
|
||||
var $this = $(this);
|
||||
if ($this.is(':checked'))
|
||||
$('#SubTypes_' + $this.val()).slideDown('fast');
|
||||
else
|
||||
$('#SubTypes_' + $this.val()).slideUp('fast');
|
||||
}).find('input.jobType:checked').each(function () {
|
||||
$('#SubTypes_' + $(this).val()).show();
|
||||
});
|
||||
}
|
||||
|
||||
dialog.dialog('open');
|
||||
@@ -272,140 +216,321 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
dialog.dialog("disable");
|
||||
dialog.dialog("option", "buttons", null);
|
||||
|
||||
// Refresh Page
|
||||
window.location.href = window.location.href;
|
||||
}
|
||||
|
||||
function saveChanges() {
|
||||
var form = dialog.find('form');
|
||||
|
||||
$('input.jobType:unchecked').each(function () {
|
||||
$('#SubTypes_' + $(this).val()).find('input').prop('checked', false);
|
||||
});
|
||||
|
||||
form.submit();
|
||||
|
||||
dialog.dialog("disable");
|
||||
dialog.dialog("option", "buttons", null);
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$('#Config_DocumentTemplates_JobSubTypes_Update').click(showDialog);
|
||||
});
|
||||
|
||||
})();
|
||||
$('#Config_DocumentTemplates_Scope_Button').click(showDialog);
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Template PDF
|
||||
</th>
|
||||
<td>
|
||||
@Html.ActionLink("Download Template", MVC.API.DocumentTemplate.Template(Model.DocumentTemplate.Id))
|
||||
@if (canConfig && Authorization.Has(Claims.Config.DocumentTemplate.Upload))
|
||||
{
|
||||
<br />
|
||||
using (Html.BeginForm(MVC.API.DocumentTemplate.Template(Model.DocumentTemplate.Id, true, null), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
<input type="file" name="Template" id="Template" style="width: 250px;" />
|
||||
<input class="button" type="submit" value="Upload" />
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $template = $('#Template');
|
||||
$template.closest('form').submit(function () {
|
||||
if ($template.val() == '') {
|
||||
alert('A template file is required to upload.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Filter Expression:
|
||||
</th>
|
||||
<td>@if (canConfig && Authorization.Has(Claims.Config.DocumentTemplate.ConfigureFilterExpression))
|
||||
{
|
||||
@Html.TextBoxFor(model => model.DocumentTemplate.FilterExpression)
|
||||
@AjaxHelpers.AjaxRemove()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $FilterExpression = $('#DocumentTemplate_FilterExpression');
|
||||
var $ajaxLoading = $FilterExpression.nextAll('.ajaxLoading').first();
|
||||
var $ajaxRemove = $FilterExpression.nextAll('.ajaxRemove').first();
|
||||
$FilterExpression
|
||||
.watermark('Filter Expression')
|
||||
.focus(function () { $FilterExpression.select() })
|
||||
.keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
$(this).blur();
|
||||
@if (Model.DocumentTemplate.Scope == DocumentTemplate.DocumentTemplateScopes.Job)
|
||||
{
|
||||
<hr />
|
||||
<h4>Job Type Filters:</h4>
|
||||
<div id="Config_DocumentTemplates_JobSubTypes" @(Model.DocumentTemplate.Scope != DocumentTemplate.DocumentTemplateScopes.Job ? "style=\"display: none;\" " : null)>
|
||||
<div>
|
||||
@if (Model.DocumentTemplate.JobSubTypes.Count > 0)
|
||||
{
|
||||
<ul>
|
||||
@foreach (var jobType in Model.DocumentTemplate.JobSubTypes.GroupBy(jst => jst.JobType).OrderBy(jtg => jtg.Key.Description))
|
||||
{
|
||||
<li>
|
||||
@jobType.Key.Description
|
||||
<ul>
|
||||
@if (jobType.Count() == Model.JobTypes.FirstOrDefault(jt => jt.Id == jobType.Key.Id).JobSubTypes.Count)
|
||||
{
|
||||
<li><span class="smallMessage">[All Sub Types]</span></li>
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var jobSubType in jobType)
|
||||
{
|
||||
<li>@jobSubType.Description</li>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
}).change(function () {
|
||||
updateFilterExpression($FilterExpression.val());
|
||||
else
|
||||
{
|
||||
<span class="smallMessage"><No Filter></span>
|
||||
}
|
||||
</div>
|
||||
@if (canConfig)
|
||||
{
|
||||
<a id="Config_DocumentTemplates_JobSubTypes_Update" href="#" class="button small">Update</a>
|
||||
<div id="Config_DocumentTemplates_JobSubTypes_Update_Dialog" class="dialog" title="Job Type Filter">
|
||||
@using (Html.BeginForm(MVC.API.DocumentTemplate.UpdateJobSubTypes(Model.DocumentTemplate.Id, null, true)))
|
||||
{
|
||||
var selectedTypes = Model.DocumentTemplate.JobSubTypes.Select(jst => jst.JobType).Distinct().ToList();
|
||||
foreach (var jt in Model.JobTypes)
|
||||
{
|
||||
<div class="jobTypes">
|
||||
<h4>
|
||||
<input id="Types_@(jt.Id)" class="jobType" type="checkbox" value="@(jt.Id)" @(selectedTypes.Contains(jt) ? "checked=\"checked\"" : null) /><label for="Types_@(jt.Id)">@jt.Description</label></h4>
|
||||
<div id="SubTypes_@(jt.Id)" class="jobSubTypes">
|
||||
@CommonHelpers.CheckboxBulkSelect(string.Format("CheckboxBulkSelect_{0}", jt.Id), "div")
|
||||
@CommonHelpers.CheckBoxList("JobSubTypes", jt.JobSubTypes.OrderBy(jst => jst.Description).ToSelectListItems(Model.DocumentTemplate.JobSubTypes), 2)
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
var dialog;
|
||||
|
||||
function showDialog() {
|
||||
if (!dialog) {
|
||||
dialog = $('#Config_DocumentTemplates_JobSubTypes_Update_Dialog').dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
width: 750,
|
||||
height: 620,
|
||||
buttons: {
|
||||
"Save Changes": saveChanges,
|
||||
Cancel: cancel
|
||||
}
|
||||
});
|
||||
|
||||
dialog.find('.jobSubTypes').hide();
|
||||
dialog.on('change', 'input.jobType', function () {
|
||||
var $this = $(this);
|
||||
if ($this.is(':checked'))
|
||||
$('#SubTypes_' + $this.val()).slideDown('fast');
|
||||
else
|
||||
$('#SubTypes_' + $this.val()).slideUp('fast');
|
||||
}).find('input.jobType:checked').each(function () {
|
||||
$('#SubTypes_' + $(this).val()).show();
|
||||
});
|
||||
}
|
||||
|
||||
dialog.dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
dialog.dialog("disable");
|
||||
dialog.dialog("option", "buttons", null);
|
||||
|
||||
// Refresh Page
|
||||
window.location.href = window.location.href;
|
||||
}
|
||||
|
||||
function saveChanges() {
|
||||
var form = dialog.find('form');
|
||||
|
||||
$('input.jobType:unchecked').each(function () {
|
||||
$('#SubTypes_' + $(this).val()).find('input').prop('checked', false);
|
||||
});
|
||||
|
||||
form.submit();
|
||||
|
||||
dialog.dialog("disable");
|
||||
dialog.dialog("option", "buttons", null);
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$('#Config_DocumentTemplates_JobSubTypes_Update').click(showDialog);
|
||||
});
|
||||
|
||||
})();
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>PDF Template
|
||||
</th>
|
||||
<td>
|
||||
@Html.ActionLinkSmallButton("Download Template", MVC.API.DocumentTemplate.Template(Model.DocumentTemplate.Id))
|
||||
@if (canConfig && Authorization.Has(Claims.Config.DocumentTemplate.Upload))
|
||||
{
|
||||
<button class="button small" id="Config_DocumentTemplates_TemplatePdf_Button">Replace Template</button>
|
||||
<div id="Config_DocumentTemplates_TemplatePdf_Dialog" title="Replace Document PDF Template" class="dialog">
|
||||
<h4>Select a PDF Template to upload:</h4>
|
||||
<div>
|
||||
@using (Html.BeginForm(MVC.API.DocumentTemplate.Template(Model.DocumentTemplate.Id, true, null), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
<input type="file" name="Template" id="Config_DocumentTemplates_TemplatePdf_Template" style="width: 250px;" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var dialog, template;
|
||||
|
||||
function showDialog() {
|
||||
if (dialog == null) {
|
||||
template = $('#Config_DocumentTemplates_TemplatePdf_Template');
|
||||
|
||||
dialog = $('#Config_DocumentTemplates_TemplatePdf_Dialog').dialog({
|
||||
width: 350,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
'Upload': function () {
|
||||
if (template.val() == '') {
|
||||
alert('A template file is required to upload.');
|
||||
} else {
|
||||
dialog.dialog('option', 'buttons', null);
|
||||
dialog.dialog('disable');
|
||||
template.closest('form').submit();
|
||||
}
|
||||
},
|
||||
'Cancel': function () {
|
||||
dialog.dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
dialog.dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#Config_DocumentTemplates_TemplatePdf_Button').click(showDialog);
|
||||
});
|
||||
if ($FilterExpression.val() != '')
|
||||
$ajaxRemove.show();
|
||||
$ajaxRemove.click(function () {
|
||||
updateFilterExpression('');
|
||||
$FilterExpression.val('');
|
||||
});
|
||||
var updateFilterExpression = function (filterExpression) {
|
||||
$ajaxLoading.show();
|
||||
$ajaxRemove.hide();
|
||||
var data = { FilterExpression: filterExpression };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.DocumentTemplate.UpdateFilterExpression(Model.DocumentTemplate.Id))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
if (data.FilterExpression != '')
|
||||
$ajaxRemove.fadeIn('fast');
|
||||
} else {
|
||||
$ajaxLoading.hide();
|
||||
alert('Unable to update filter expression: ' + d);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update filter expression: ' + textStatus);
|
||||
$ajaxLoading.hide();
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
</script>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
@if (hideAdvanced)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Model.DocumentTemplate.FilterExpression))
|
||||
{
|
||||
<span class="smallMessage"><None Specified></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="code">
|
||||
@Model.DocumentTemplate.FilterExpression
|
||||
</div>
|
||||
}
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: right;">
|
||||
<button id="Config_HideAdvanced_Show" class="button small">Show Advanced Options</button>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#Config_HideAdvanced_Show').click(function () {
|
||||
var $this = $(this);
|
||||
$this.closest('.Config_HideAdvanced').removeClass('Config_HideAdvanced');
|
||||
$this.closest('tr').remove();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form Config_HideAdvanced_Item" style="width: 650px;">
|
||||
<h2>Advanced Options</h2>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Filter Expression:
|
||||
</th>
|
||||
<td>@if (canConfig && Authorization.Has(Claims.Config.DocumentTemplate.ConfigureFilterExpression))
|
||||
{
|
||||
@Html.TextBoxFor(model => model.DocumentTemplate.FilterExpression)
|
||||
@AjaxHelpers.AjaxRemove()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $FilterExpression = $('#DocumentTemplate_FilterExpression');
|
||||
var $ajaxLoading = $FilterExpression.nextAll('.ajaxLoading').first();
|
||||
var $ajaxRemove = $FilterExpression.nextAll('.ajaxRemove').first();
|
||||
$FilterExpression
|
||||
.watermark('Filter Expression')
|
||||
.focus(function () { $FilterExpression.select() })
|
||||
.keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
$(this).blur();
|
||||
}
|
||||
}).change(function () {
|
||||
updateFilterExpression($FilterExpression.val());
|
||||
});
|
||||
if ($FilterExpression.val() != '')
|
||||
$ajaxRemove.show();
|
||||
$ajaxRemove.click(function () {
|
||||
updateFilterExpression('');
|
||||
$FilterExpression.val('');
|
||||
});
|
||||
var updateFilterExpression = function (filterExpression) {
|
||||
$ajaxLoading.show();
|
||||
$ajaxRemove.hide();
|
||||
var data = { FilterExpression: filterExpression };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.DocumentTemplate.UpdateFilterExpression(Model.DocumentTemplate.Id))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
if (data.FilterExpression != '')
|
||||
$ajaxRemove.fadeIn('fast');
|
||||
} else {
|
||||
$ajaxLoading.hide();
|
||||
alert('Unable to update filter expression: ' + d);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update filter expression: ' + textStatus);
|
||||
$ajaxLoading.hide();
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Model.DocumentTemplate.FilterExpression))
|
||||
{
|
||||
<span class="smallMessage"><None Specified></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="code">
|
||||
@Model.DocumentTemplate.FilterExpression
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Linked Groups:
|
||||
</th>
|
||||
<td>
|
||||
<div>
|
||||
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
||||
{
|
||||
CanConfigure = canConfig,
|
||||
CategoryDescription = DocumentTemplateUsersManagedGroup.GetCategoryDescription(Model.DocumentTemplate),
|
||||
Description = DocumentTemplateUsersManagedGroup.GetDescription(Model.DocumentTemplate),
|
||||
ManagedGroup = Model.UsersLinkedGroup,
|
||||
UpdateUrl = Url.Action(MVC.API.DocumentTemplate.UpdateUsersLinkedGroup(Model.DocumentTemplate.Id, redirect: true))
|
||||
})
|
||||
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
||||
{
|
||||
CanConfigure = canConfig,
|
||||
CategoryDescription = DocumentTemplateDevicesManagedGroup.GetCategoryDescription(Model.DocumentTemplate),
|
||||
Description = DocumentTemplateDevicesManagedGroup.GetDescription(Model.DocumentTemplate),
|
||||
ManagedGroup = Model.DevicesLinkedGroup,
|
||||
UpdateUrl = Url.Action(MVC.API.DocumentTemplate.UpdateDevicesLinkedGroup(Model.DocumentTemplate.Id, redirect: true))
|
||||
})
|
||||
@if (canConfig)
|
||||
{
|
||||
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared)
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="Config_HideAdvanced_Item">
|
||||
<h2>Template Expressions</h2>
|
||||
@Html.Partial(MVC.Config.DocumentTemplate.Views._ExpressionsTable, Model.TemplateExpressions)
|
||||
</div>
|
||||
</div>
|
||||
<h2>Template Expressions</h2>
|
||||
@Html.Partial(MVC.Config.DocumentTemplate.Views._ExpressionsTable, Model.TemplateExpressions)
|
||||
<div id="dialogConfirmDelete" title="Delete this Document Template?">
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg warning"></i>This item will be permanently deleted and cannot be recovered.<br />
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
@model Disco.Web.Areas.Config.Models.JobQueue.IndexModel
|
||||
@{
|
||||
Authorization.RequireAll(Claims.Config.JobQueue.Create, Claims.Config.JobQueue.Configure);
|
||||
Authorization.Require(Claims.Config.JobQueue.Show);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Job Queues", MVC.Config.JobQueue.Index(null));
|
||||
}
|
||||
<div id="Config_JobQueues_Index">
|
||||
@@ -54,7 +54,10 @@
|
||||
}
|
||||
</table>
|
||||
}
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Create Job Queue", MVC.Config.JobQueue.Create())
|
||||
</div>
|
||||
@if (Authorization.Has(Claims.Config.JobQueue.Create))
|
||||
{
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Create Job Queue", MVC.Config.JobQueue.Create())
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Disco.Web.Areas.Config.Views.JobQueue
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\JobQueue\Index.cshtml"
|
||||
|
||||
Authorization.RequireAll(Claims.Config.JobQueue.Create, Claims.Config.JobQueue.Configure);
|
||||
Authorization.Require(Claims.Config.JobQueue.Show);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Job Queues", MVC.Config.JobQueue.Index(null));
|
||||
|
||||
|
||||
@@ -114,37 +114,37 @@ WriteLiteral(">\r\n <tr>\r\n <th>Name</th>\r\n
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 890), Tuple.Create("\"", 953)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 851), Tuple.Create("\"", 914)
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\JobQueue\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 897), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.JobQueue.Index(item.JobQueue.Id))
|
||||
, Tuple.Create(Tuple.Create("", 858), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.JobQueue.Index(item.JobQueue.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 897), false)
|
||||
, 858), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 987), Tuple.Create("\"", 1058)
|
||||
, Tuple.Create(Tuple.Create("", 995), Tuple.Create("fa", 995), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 997), Tuple.Create("fa-", 998), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 948), Tuple.Create("\"", 1019)
|
||||
, Tuple.Create(Tuple.Create("", 956), Tuple.Create("fa", 956), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 958), Tuple.Create("fa-", 959), true)
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\JobQueue\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1001), Tuple.Create<System.Object, System.Int32>(item.JobQueue.Icon
|
||||
, Tuple.Create(Tuple.Create("", 962), Tuple.Create<System.Object, System.Int32>(item.JobQueue.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1001), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1022), Tuple.Create("fa-lg", 1023), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1028), Tuple.Create("d-", 1029), true)
|
||||
, 962), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 983), Tuple.Create("fa-lg", 984), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 989), Tuple.Create("d-", 990), true)
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\JobQueue\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1031), Tuple.Create<System.Object, System.Int32>(item.JobQueue.IconColour
|
||||
, Tuple.Create(Tuple.Create("", 992), Tuple.Create<System.Object, System.Int32>(item.JobQueue.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1031), false)
|
||||
, 992), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
@@ -201,27 +201,27 @@ WriteLiteral("><none></span>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1613), Tuple.Create("\"", 1681)
|
||||
, Tuple.Create(Tuple.Create("", 1621), Tuple.Create("fa", 1621), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1623), Tuple.Create("d-priority-", 1624), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1574), Tuple.Create("\"", 1642)
|
||||
, Tuple.Create(Tuple.Create("", 1582), Tuple.Create("fa", 1582), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1584), Tuple.Create("d-priority-", 1585), true)
|
||||
|
||||
#line 41 "..\..\Areas\Config\Views\JobQueue\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1635), Tuple.Create<System.Object, System.Int32>(item.JobQueue.Priority.ToString().ToLower()
|
||||
, Tuple.Create(Tuple.Create("", 1596), Tuple.Create<System.Object, System.Int32>(item.JobQueue.Priority.ToString().ToLower()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1635), false)
|
||||
, 1596), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1682), Tuple.Create("\"", 1735)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1643), Tuple.Create("\"", 1696)
|
||||
|
||||
#line 41 "..\..\Areas\Config\Views\JobQueue\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1690), Tuple.Create<System.Object, System.Int32>(item.JobQueue.Priority.ToString()
|
||||
, Tuple.Create(Tuple.Create("", 1651), Tuple.Create<System.Object, System.Int32>(item.JobQueue.Priority.ToString()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1690), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1726), Tuple.Create("Priority", 1727), true)
|
||||
, 1651), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1687), Tuple.Create("Priority", 1688), true)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n </td>\r\n <td>\r\n");
|
||||
@@ -288,22 +288,41 @@ WriteLiteral(" </table>\r\n");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 57 "..\..\Areas\Config\Views\JobQueue\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.JobQueue.Create))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 58 "..\..\Areas\Config\Views\JobQueue\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Create Job Queue", MVC.Config.JobQueue.Create()));
|
||||
#line 60 "..\..\Areas\Config\Views\JobQueue\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Create Job Queue", MVC.Config.JobQueue.Create()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n</div>\r\n");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 62 "..\..\Areas\Config\Views\JobQueue\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,15 +64,14 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<pre>
|
||||
@if (string.IsNullOrEmpty(Model.Token.JobQueue.Description))
|
||||
{
|
||||
<pre>@if (string.IsNullOrEmpty(Model.Token.JobQueue.Description))
|
||||
{
|
||||
<text><None></text>
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Token.JobQueue.Description.ToHtmlComment()
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
}
|
||||
</td>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,64 @@
|
||||
@model Disco.Web.Areas.Config.Models.Shared.LinkedGroupModel
|
||||
@using Disco.Services.Interop.ActiveDirectory;
|
||||
<h5>@(Model.CategoryDescription)</h5>
|
||||
<div class="Config_LinkedGroup_Instance">
|
||||
<div class="infoBox">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-fw fa-info-circle"></i>@Model.Description
|
||||
</p>
|
||||
</div>
|
||||
@{
|
||||
ADGroup group = null;
|
||||
if (Model.ManagedGroup != null)
|
||||
{
|
||||
group = Model.ManagedGroup.GetGroup();
|
||||
}
|
||||
if (Model.CanConfigure)
|
||||
{
|
||||
if (Model.ManagedGroup != null)
|
||||
{
|
||||
if (group != null)
|
||||
{
|
||||
<div class="code" title="@group.Id">
|
||||
<i class="fa fa-fw fa-lg fa-link success"></i>@group.Domain.FriendlyDistinguishedNamePath(group.DistinguishedName)
|
||||
</div>
|
||||
<button class="button small Config_LinkedGroup_LinkButton" data-linkedgroupid="@(Model.ManagedGroup.Configuration.GroupId)" data-linkedroupdescription="@(Model.CategoryDescription)" data-linkedroupupdateurl="@(Model.UpdateUrl)">Change Link</button>
|
||||
<a href="@(Url.Action(MVC.API.System.SyncActiveDirectoryManagedGroup(Model.ManagedGroup.Key, Context.Request.Path)))" class="button small">Synchronize Now</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="code error">
|
||||
<i class="fa fa-fw fa-lg fa-unlink error"></i>Group Not Found: <strong class="code">@Model.ManagedGroup.Configuration.GroupId</strong>
|
||||
</div>
|
||||
<button class="button small Config_LinkedGroup_LinkButton" data-linkedgroupid="@(Model.ManagedGroup.Configuration.GroupId)" data-linkedroupdescription="@(Model.CategoryDescription)" data-linkedroupupdateurl="@(Model.UpdateUrl)">Change Link</button>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="button small Config_LinkedGroup_LinkButton" data-linkedgroupid="" data-linkedroupdescription="@(Model.CategoryDescription)" data-linkedroupupdateurl="@(Model.UpdateUrl)">Link Group</button>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Model.ManagedGroup != null)
|
||||
{
|
||||
if (group != null)
|
||||
{
|
||||
<div class="code" title="@group.Id">
|
||||
<i class="fa fa-fw fa-lg fa-link success"></i>@group.Domain.FriendlyDistinguishedNamePath(group.DistinguishedName)
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="code error">
|
||||
<i class="fa fa-fw fa-lg fa-unlink error"></i>Group Not Found: <strong class="code">@Model.ManagedGroup.Configuration.GroupId</strong>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="smallMessage"><i class="fa fa-fw fa-lg fa-unlink information"></i>No Group Linked</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
@@ -0,0 +1,416 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.Shared
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Shared/LinkedGroupInstance.cshtml")]
|
||||
public partial class LinkedGroupInstance : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.Shared.LinkedGroupModel>
|
||||
{
|
||||
public LinkedGroupInstance()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<h5>");
|
||||
|
||||
|
||||
#line 3 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.CategoryDescription);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</h5>\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"Config_LinkedGroup_Instance\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"infoBox\"");
|
||||
|
||||
WriteLiteral(">\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"fa-p\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-fw fa-info-circle\"");
|
||||
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 7 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 10 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
|
||||
ADGroup group = null;
|
||||
if (Model.ManagedGroup != null)
|
||||
{
|
||||
group = Model.ManagedGroup.GetGroup();
|
||||
}
|
||||
if (Model.CanConfigure)
|
||||
{
|
||||
if (Model.ManagedGroup != null)
|
||||
{
|
||||
if (group != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 680), Tuple.Create("\"", 697)
|
||||
|
||||
#line 22 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 688), Tuple.Create<System.Object, System.Int32>(group.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 688), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-fw fa-lg fa-link success\"");
|
||||
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 23 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(group.Domain.FriendlyDistinguishedNamePath(group.DistinguishedName));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <button");
|
||||
|
||||
WriteLiteral(" class=\"button small Config_LinkedGroup_LinkButton\"");
|
||||
|
||||
WriteLiteral(" data-linkedgroupid=\"");
|
||||
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.ManagedGroup.Configuration.GroupId);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-linkedroupdescription=\"");
|
||||
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.CategoryDescription);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-linkedroupupdateurl=\"");
|
||||
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.UpdateUrl);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">Change Link</button>\r\n");
|
||||
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1113), Tuple.Create("\"", 1227)
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1120), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.System.SyncActiveDirectoryManagedGroup(Model.ManagedGroup.Key, Context.Request.Path))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1120), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button small\"");
|
||||
|
||||
WriteLiteral(">Synchronize Now</a>\r\n");
|
||||
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"code error\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-fw fa-lg fa-unlink error\"");
|
||||
|
||||
WriteLiteral("></i>Group Not Found: <strong");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 31 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.ManagedGroup.Configuration.GroupId);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</strong>\r\n </div> \r\n");
|
||||
|
||||
WriteLiteral(" <button");
|
||||
|
||||
WriteLiteral(" class=\"button small Config_LinkedGroup_LinkButton\"");
|
||||
|
||||
WriteLiteral(" data-linkedgroupid=\"");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.ManagedGroup.Configuration.GroupId);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-linkedroupdescription=\"");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.CategoryDescription);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-linkedroupupdateurl=\"");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.UpdateUrl);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">Change Link</button>\r\n");
|
||||
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <button");
|
||||
|
||||
WriteLiteral(" class=\"button small Config_LinkedGroup_LinkButton\"");
|
||||
|
||||
WriteLiteral(" data-linkedgroupid=\"\"");
|
||||
|
||||
WriteLiteral(" data-linkedroupdescription=\"");
|
||||
|
||||
|
||||
#line 38 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.CategoryDescription);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-linkedroupupdateurl=\"");
|
||||
|
||||
|
||||
#line 38 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.UpdateUrl);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">Link Group</button>\r\n");
|
||||
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Model.ManagedGroup != null)
|
||||
{
|
||||
if (group != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2271), Tuple.Create("\"", 2288)
|
||||
|
||||
#line 47 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2279), Tuple.Create<System.Object, System.Int32>(group.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2279), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-fw fa-lg fa-link success\"");
|
||||
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 48 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(group.Domain.FriendlyDistinguishedNamePath(group.DistinguishedName));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 50 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"code error\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-fw fa-lg fa-unlink error\"");
|
||||
|
||||
WriteLiteral("></i>Group Not Found: <strong");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 54 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.ManagedGroup.Configuration.GroupId);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</strong>\r\n </div> \r\n");
|
||||
|
||||
|
||||
#line 56 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral("><i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-fw fa-lg fa-unlink information\"");
|
||||
|
||||
WriteLiteral("></i>No Group Linked</div>\r\n");
|
||||
|
||||
|
||||
#line 61 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,89 @@
|
||||
<div id="Config_LinkedGroup_Dialog" title="Linked Group" class="dialog">
|
||||
<h3 id="Config_LinkedGroup_Title"></h3>
|
||||
<div class="infoBox error">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-exclamation-circle"></i><strong>Warning:</strong> This group will be managed by Disco ICT.<br />
|
||||
Any <strong>existing members will be removed from the group</strong>, and it will be automatically synchronized with related members.
|
||||
</p>
|
||||
</div>
|
||||
<form action="#" method="post">
|
||||
<div class="input">
|
||||
<label for="Config_LinkedGroup_Id">Linked Group: </label>
|
||||
<input id="Config_LinkedGroup_Id" type="text" name="GroupId" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
var dialog;
|
||||
var dialogGroupId;
|
||||
var dialogTitle;
|
||||
|
||||
function showDialog(groupId, updateUrl, title) {
|
||||
if (dialog == null) {
|
||||
dialog = $('#Config_LinkedGroup_Dialog').dialog({
|
||||
width: 450,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
dialogGroupId = $('#Config_LinkedGroup_Id');
|
||||
dialogGroupId.focus(function () { $(this).select(); });
|
||||
dialogGroupId.autocomplete({
|
||||
source: '@(Url.Action(MVC.API.System.SearchGroupSubjects()))',
|
||||
minLength: 2,
|
||||
select: function (e, ui) {
|
||||
dialogGroupId.val(ui.item.Id);
|
||||
return false;
|
||||
}
|
||||
}).data('ui-autocomplete')._renderItem = function (ul, item) {
|
||||
return $("<li>")
|
||||
.data("item.autocomplete", item)
|
||||
.append("<a><strong>" + item.Name + "</strong><br>" + item.Id + " (" + item.Type + ")</a>")
|
||||
.appendTo(ul);
|
||||
};
|
||||
|
||||
dialogTitle = $('#Config_LinkedGroup_Title');
|
||||
}
|
||||
|
||||
var dialogButtons = {};
|
||||
if (!!groupId) {
|
||||
dialogButtons['Remove Link'] = function () {
|
||||
$(this).dialog('disable');
|
||||
dialogGroupId.val('');
|
||||
dialogGroupId.closest('form').attr('action', updateUrl).submit();
|
||||
}
|
||||
}
|
||||
dialogButtons[(!!groupId ? 'Save Changes' : 'Link Group')] = function () {
|
||||
if (!dialogGroupId.val()) {
|
||||
alert('A Linked Group must be specified');
|
||||
return;
|
||||
}
|
||||
$(this).dialog('disable');
|
||||
dialogGroupId.closest('form').attr('action', updateUrl).submit();
|
||||
}
|
||||
dialogButtons['Cancel'] = function () {
|
||||
$(this).dialog('close');
|
||||
};
|
||||
|
||||
dialogGroupId.val(groupId);
|
||||
dialogTitle.text(title);
|
||||
dialog.dialog('option', 'buttons', dialogButtons);
|
||||
dialog.dialog('option', 'title', 'Linked Group: ' + title);
|
||||
dialog.dialog('open');
|
||||
}
|
||||
|
||||
$(document).on('click', '.Config_LinkedGroup_LinkButton', function () {
|
||||
$this = $(this);
|
||||
|
||||
var configuredGroupId = $this.attr('data-linkedgroupid');
|
||||
var description = $this.attr('data-linkedroupdescription');
|
||||
var updateUrl = $this.attr('data-linkedroupupdateurl');
|
||||
|
||||
showDialog(configuredGroupId, updateUrl, description);
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,160 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.Shared
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Shared/LinkedGroupShared.cshtml")]
|
||||
public partial class LinkedGroupShared : Disco.Services.Web.WebViewPage<dynamic>
|
||||
{
|
||||
public LinkedGroupShared()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" id=\"Config_LinkedGroup_Dialog\"");
|
||||
|
||||
WriteLiteral(" title=\"Linked Group\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
WriteLiteral(">\r\n <h3");
|
||||
|
||||
WriteLiteral(" id=\"Config_LinkedGroup_Title\"");
|
||||
|
||||
WriteLiteral("></h3>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"infoBox error\"");
|
||||
|
||||
WriteLiteral(">\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"fa-p\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-exclamation-circle\"");
|
||||
|
||||
WriteLiteral(@"></i><strong>Warning:</strong> This group will be managed by Disco ICT.<br />
|
||||
Any <strong>existing members will be removed from the group</strong>, and it will be automatically synchronized with related members.
|
||||
</p>
|
||||
</div>
|
||||
<form");
|
||||
|
||||
WriteLiteral(" action=\"#\"");
|
||||
|
||||
WriteLiteral(" method=\"post\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"input\"");
|
||||
|
||||
WriteLiteral(">\r\n <label");
|
||||
|
||||
WriteLiteral(" for=\"Config_LinkedGroup_Id\"");
|
||||
|
||||
WriteLiteral(">Linked Group: </label>\r\n <input");
|
||||
|
||||
WriteLiteral(" id=\"Config_LinkedGroup_Id\"");
|
||||
|
||||
WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" name=\"GroupId\"");
|
||||
|
||||
WriteLiteral(@" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
var dialog;
|
||||
var dialogGroupId;
|
||||
var dialogTitle;
|
||||
|
||||
function showDialog(groupId, updateUrl, title) {
|
||||
if (dialog == null) {
|
||||
dialog = $('#Config_LinkedGroup_Dialog').dialog({
|
||||
width: 450,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
dialogGroupId = $('#Config_LinkedGroup_Id');
|
||||
dialogGroupId.focus(function () { $(this).select(); });
|
||||
dialogGroupId.autocomplete({
|
||||
source: '");
|
||||
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\Shared\LinkedGroupShared.cshtml"
|
||||
Write(Url.Action(MVC.API.System.SearchGroupSubjects()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n minLength: 2,\r\n select: function (e, u" +
|
||||
"i) {\r\n dialogGroupId.val(ui.item.Id);\r\n " +
|
||||
" return false;\r\n }\r\n }).data(\'ui-autocomp" +
|
||||
"lete\')._renderItem = function (ul, item) {\r\n return $(\"<li>\")" +
|
||||
"\r\n .data(\"item.autocomplete\", item)\r\n " +
|
||||
" .append(\"<a><strong>\" + item.Name + \"</strong><br>\" + item.Id + \" (\" + item." +
|
||||
"Type + \")</a>\")\r\n .appendTo(ul);\r\n };\r\n\r\n " +
|
||||
" dialogTitle = $(\'#Config_LinkedGroup_Title\');\r\n }\r\n\r\n " +
|
||||
" var dialogButtons = {};\r\n if (!!groupId) {\r\n " +
|
||||
" dialogButtons[\'Remove Link\'] = function () {\r\n $(this).dial" +
|
||||
"og(\'disable\');\r\n dialogGroupId.val(\'\');\r\n " +
|
||||
"dialogGroupId.closest(\'form\').attr(\'action\', updateUrl).submit();\r\n " +
|
||||
" }\r\n }\r\n dialogButtons[(!!groupId ? \'Save Changes\' : \'Li" +
|
||||
"nk Group\')] = function () {\r\n if (!dialogGroupId.val()) {\r\n " +
|
||||
" alert(\'A Linked Group must be specified\');\r\n re" +
|
||||
"turn;\r\n }\r\n $(this).dialog(\'disable\');\r\n " +
|
||||
" dialogGroupId.closest(\'form\').attr(\'action\', updateUrl).submit();\r\n " +
|
||||
" }\r\n dialogButtons[\'Cancel\'] = function () {\r\n $(t" +
|
||||
"his).dialog(\'close\');\r\n };\r\n\r\n dialogGroupId.val(groupId);" +
|
||||
"\r\n dialogTitle.text(title);\r\n dialog.dialog(\'option\', \'but" +
|
||||
"tons\', dialogButtons);\r\n dialog.dialog(\'option\', \'title\', \'Linked Gro" +
|
||||
"up: \' + title);\r\n dialog.dialog(\'open\');\r\n }\r\n\r\n $(docu" +
|
||||
"ment).on(\'click\', \'.Config_LinkedGroup_LinkButton\', function () {\r\n $" +
|
||||
"this = $(this);\r\n\r\n var configuredGroupId = $this.attr(\'data-linkedgr" +
|
||||
"oupid\');\r\n var description = $this.attr(\'data-linkedroupdescription\')" +
|
||||
";\r\n var updateUrl = $this.attr(\'data-linkedroupupdateurl\');\r\n\r\n " +
|
||||
" showDialog(configuredGroupId, updateUrl, description);\r\n\r\n retu" +
|
||||
"rn false;\r\n });\r\n });\r\n</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -1,6 +1,6 @@
|
||||
@model Disco.Web.Areas.Config.Models.UserFlag.IndexModel
|
||||
@{
|
||||
Authorization.RequireAll(Claims.Config.UserFlag.Create, Claims.Config.UserFlag.Configure);
|
||||
Authorization.Require(Claims.Config.UserFlag.Show);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags", MVC.Config.UserFlag.Index(null));
|
||||
}
|
||||
<div id="Config_UserFlags_Index">
|
||||
@@ -16,6 +16,7 @@
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Linked</th>
|
||||
</tr>
|
||||
@foreach (var item in Model.UserFlags)
|
||||
{
|
||||
@@ -35,11 +36,23 @@
|
||||
@item.Description.ToHtmlComment()
|
||||
}
|
||||
</td>
|
||||
<td>@if (item.UserDevicesLinkedGroup != null || item.UsersLinkedGroup != null)
|
||||
{
|
||||
<i class="fa fa-link fa-lg success"></i>
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa fa-unlink fa-lg information"></i>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
}
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Create User Flag", MVC.Config.UserFlag.Create())
|
||||
</div>
|
||||
</div>
|
||||
@if (Authorization.Has(Claims.Config.UserFlag.Create))
|
||||
{
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Create User Flag", MVC.Config.UserFlag.Create())
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -47,7 +47,7 @@ namespace Disco.Web.Areas.Config.Views.UserFlag
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
|
||||
Authorization.RequireAll(Claims.Config.UserFlag.Create, Claims.Config.UserFlag.Configure);
|
||||
Authorization.Require(Claims.Config.UserFlag.Show);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags", MVC.Config.UserFlag.Index(null));
|
||||
|
||||
|
||||
@@ -95,16 +95,16 @@ WriteLiteral(" <table");
|
||||
WriteLiteral(" class=\"tableData\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th>Name</th>\r\n <th>Descripti" +
|
||||
"on</th>\r\n </tr>\r\n");
|
||||
"on</th>\r\n <th>Linked</th>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 20 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 21 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 20 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 21 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
foreach (var item in Model.UserFlags)
|
||||
{
|
||||
|
||||
@@ -113,37 +113,37 @@ WriteLiteral(">\r\n <tr>\r\n <th>Name</th>\r\n
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 815), Tuple.Create("\"", 869)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 809), Tuple.Create("\"", 863)
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 822), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.UserFlag.Index(item.Id))
|
||||
#line 25 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 816), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.UserFlag.Index(item.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 822), false)
|
||||
, 816), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 903), Tuple.Create("\"", 956)
|
||||
, Tuple.Create(Tuple.Create("", 911), Tuple.Create("fa", 911), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 913), Tuple.Create("fa-", 914), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 897), Tuple.Create("\"", 950)
|
||||
, Tuple.Create(Tuple.Create("", 905), Tuple.Create("fa", 905), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 907), Tuple.Create("fa-", 908), true)
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 917), Tuple.Create<System.Object, System.Int32>(item.Icon
|
||||
#line 26 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 911), Tuple.Create<System.Object, System.Int32>(item.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 917), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 929), Tuple.Create("fa-lg", 930), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 935), Tuple.Create("d-", 936), true)
|
||||
, 911), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 923), Tuple.Create("fa-lg", 924), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 929), Tuple.Create("d-", 930), true)
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 938), Tuple.Create<System.Object, System.Int32>(item.IconColour
|
||||
#line 26 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 932), Tuple.Create<System.Object, System.Int32>(item.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 938), false)
|
||||
, 932), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
@@ -151,7 +151,7 @@ WriteLiteral("></i>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 27 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
Write(item.Name);
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ WriteLiteral("\r\n </a>\r\n </td>\r\n
|
||||
"d>");
|
||||
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 30 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
if (string.IsNullOrWhiteSpace(item.Description))
|
||||
{
|
||||
|
||||
@@ -175,7 +175,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral("><none></span>\r\n");
|
||||
|
||||
|
||||
#line 32 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 33 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -184,24 +184,62 @@ WriteLiteral("><none></span>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 36 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
Write(item.Description.ToHtmlComment());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 36 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>");
|
||||
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
if (item.UserDevicesLinkedGroup != null || item.UsersLinkedGroup != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-link fa-lg success\"");
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 42 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-unlink fa-lg information\"");
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 49 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -210,28 +248,47 @@ WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 41 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 51 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 52 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.UserFlag.Create))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 43 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Create User Flag", MVC.Config.UserFlag.Create()));
|
||||
#line 55 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Create User Flag", MVC.Config.UserFlag.Create()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n</div>\r\n");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 57 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@model Disco.Web.Areas.Config.Models.UserFlag.ShowModel
|
||||
@using Disco.Services.Users.UserFlags;
|
||||
@using Disco.Services.Interop.ActiveDirectory;
|
||||
@using Disco.Services.Users.UserFlags;
|
||||
@using Disco.Web.Areas.Config.Models.Shared;
|
||||
@{
|
||||
Authorization.Require(Claims.Config.UserFlag.Show);
|
||||
|
||||
@@ -11,9 +12,13 @@
|
||||
var canBulkAssignment = Authorization.HasAll(Claims.User.Actions.AddFlags, Claims.User.Actions.RemoveFlags, Claims.User.ShowFlagAssignments);
|
||||
var canShowUsers = Model.CurrentAssignmentCount > 0 && Authorization.HasAll(Claims.User.Search, Claims.User.ShowFlagAssignments);
|
||||
|
||||
var hideAdvanced =
|
||||
Model.UserFlag.UserDevicesLinkedGroup == null &&
|
||||
Model.UserFlag.UsersLinkedGroup == null;
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
}
|
||||
<div id="Config_UserFlags_Show" class="form" style="width: 550px">
|
||||
<div id="Config_UserFlags_Show" class="form@(hideAdvanced ? " Config_HideAdvanced" : null)" style="width: 550px">
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 150px">Id:
|
||||
@@ -193,6 +198,51 @@
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
@if (hideAdvanced)
|
||||
{
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: right;">
|
||||
<button id="Config_HideAdvanced_Show" class="button small">Show Advanced Options</button>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#Config_HideAdvanced_Show').click(function () {
|
||||
var $this = $(this);
|
||||
$this.closest('.Config_HideAdvanced').removeClass('Config_HideAdvanced');
|
||||
$this.closest('tr').remove();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
<tr class="Config_HideAdvanced_Item">
|
||||
<th>Linked Groups:
|
||||
</th>
|
||||
<td>
|
||||
<div>
|
||||
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
||||
{
|
||||
CanConfigure = canConfig,
|
||||
CategoryDescription = UserFlagUsersManagedGroup.GetCategoryDescription(Model.UserFlag),
|
||||
Description = UserFlagUsersManagedGroup.GetDescription(Model.UserFlag),
|
||||
ManagedGroup = Model.UsersLinkedGroup,
|
||||
UpdateUrl = Url.Action(MVC.API.UserFlag.UpdateAssignedUsersLinkedGroup(Model.UserFlag.Id, redirect: true))
|
||||
})
|
||||
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
||||
{
|
||||
CanConfigure = canConfig,
|
||||
CategoryDescription = UserFlagUserDevicesManagedGroup.GetCategoryDescription(Model.UserFlag),
|
||||
Description = UserFlagUserDevicesManagedGroup.GetDescription(Model.UserFlag),
|
||||
ManagedGroup = Model.UserDevicesLinkedGroup,
|
||||
UpdateUrl = Url.Action(MVC.API.UserFlag.UpdateAssignedUserDevicesLinkedGroup(Model.UserFlag.Id, redirect: true))
|
||||
})
|
||||
@if (canConfig)
|
||||
{
|
||||
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared)
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@if (canBulkAssignment || canDelete || canShowUsers)
|
||||
@@ -241,7 +291,7 @@
|
||||
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Loading current assignments...</h4>
|
||||
</div>
|
||||
<form action="#" method="post">
|
||||
<textarea id="Config_UserFlags_BulkAssign_AssignDialog_UserIds" name="UserIds" data-val="true"></textarea>
|
||||
<textarea id="Config_UserFlags_BulkAssign_AssignDialog_UserIds" name="UserIds"></textarea>
|
||||
<h4>Comments:</h4>
|
||||
<textarea id="Config_UserFlags_BulkAssign_AssignDialog_Comments" name="Comments"></textarea>
|
||||
</form>
|
||||
@@ -303,35 +353,35 @@
|
||||
if (mode == "Override") {
|
||||
assignUserIds.closest('form').attr('action', '@(Url.Action(MVC.API.UserFlag.BulkAssignUsers(Model.UserFlag.Id, true)))');
|
||||
|
||||
assignDialog.addClass('loading');
|
||||
$.getJSON('@Url.Action(MVC.API.UserFlag.AssignedUsers(Model.UserFlag.Id))', function (response, result) {
|
||||
assignDialog.removeClass('loading');
|
||||
assignDialog.addClass('loading');
|
||||
$.getJSON('@Url.Action(MVC.API.UserFlag.AssignedUsers(Model.UserFlag.Id))', function (response, result) {
|
||||
assignDialog.removeClass('loading');
|
||||
|
||||
if (result != 'success') {
|
||||
alert('Unable to load current assignments:\n' + response);
|
||||
assignDialog.dialog('close');
|
||||
} else {
|
||||
if (!!response) {
|
||||
assignUserIds.val(response.join('\n'));
|
||||
} else {
|
||||
assignUserIds.val('');
|
||||
}
|
||||
}
|
||||
});
|
||||
if (result != 'success') {
|
||||
alert('Unable to load current assignments:\n' + response);
|
||||
assignDialog.dialog('close');
|
||||
} else {
|
||||
if (!!response) {
|
||||
assignUserIds.val(response.join('\n'));
|
||||
} else {
|
||||
assignUserIds.val('');
|
||||
}
|
||||
}
|
||||
else // Assume Add
|
||||
{
|
||||
assignUserIds.closest('form').attr('action', '@(Url.Action(MVC.API.UserFlag.BulkAssignUsers(Model.UserFlag.Id, false)))');
|
||||
}
|
||||
|
||||
assignDialog.dialog('open');
|
||||
}
|
||||
|
||||
$('#Config_UserFlags_BulkAssign_Button').click(function () {
|
||||
showModeDialog();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
else // Assume Add
|
||||
{
|
||||
assignUserIds.closest('form').attr('action', '@(Url.Action(MVC.API.UserFlag.BulkAssignUsers(Model.UserFlag.Id, false)))');
|
||||
}
|
||||
|
||||
assignDialog.dialog('open');
|
||||
}
|
||||
|
||||
$('#Config_UserFlags_BulkAssign_Button').click(function () {
|
||||
showModeDialog();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
|
||||
@@ -32,19 +32,25 @@ namespace Disco.Web.Areas.Config.Views.UserFlag
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
|
||||
#line 3 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 2 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 3 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
using Disco.Services.Users.UserFlags;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
|
||||
#line 4 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
using Disco.Web.Areas.Config.Models.Shared;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
@@ -57,7 +63,7 @@ namespace Disco.Web.Areas.Config.Views.UserFlag
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 4 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 5 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Config.UserFlag.Show);
|
||||
|
||||
@@ -68,6 +74,10 @@ namespace Disco.Web.Areas.Config.Views.UserFlag
|
||||
var canBulkAssignment = Authorization.HasAll(Claims.User.Actions.AddFlags, Claims.User.Actions.RemoveFlags, Claims.User.ShowFlagAssignments);
|
||||
var canShowUsers = Model.CurrentAssignmentCount > 0 && Authorization.HasAll(Claims.User.Search, Claims.User.ShowFlagAssignments);
|
||||
|
||||
var hideAdvanced =
|
||||
Model.UserFlag.UserDevicesLinkedGroup == null &&
|
||||
Model.UserFlag.UsersLinkedGroup == null;
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
|
||||
|
||||
@@ -77,7 +87,16 @@ WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"Config_UserFlags_Show\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1092), Tuple.Create("\"", 1151)
|
||||
, Tuple.Create(Tuple.Create("", 1100), Tuple.Create("form", 1100), true)
|
||||
|
||||
#line 21 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1104), Tuple.Create<System.Object, System.Int32>(hideAdvanced ? " Config_HideAdvanced" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1104), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" style=\"width: 550px\"");
|
||||
|
||||
@@ -90,7 +109,7 @@ WriteLiteral(">Id:\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 22 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 27 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.DisplayFor(model => model.UserFlag.Id));
|
||||
|
||||
|
||||
@@ -100,49 +119,49 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n
|
||||
" </th>\r\n <td>");
|
||||
|
||||
|
||||
#line 28 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 33 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canConfig)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 34 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.EditorFor(model => model.UserFlag.Name));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 34 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 35 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 35 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 36 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 36 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -157,7 +176,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
" \'Invalid Name\',\r\n \'");
|
||||
|
||||
|
||||
#line 37 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 42 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.UpdateName(Model.UserFlag.Id)));
|
||||
|
||||
|
||||
@@ -167,7 +186,7 @@ WriteLiteral("\',\r\n \'FlagName\'\r\n
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 42 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 47 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -176,14 +195,14 @@ WriteLiteral("\',\r\n \'FlagName\'\r\n
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 45 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 50 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.UserFlag.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 45 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 50 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -194,49 +213,49 @@ WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n
|
||||
" </th>\r\n <td>");
|
||||
|
||||
|
||||
#line 52 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 57 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canConfig)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 58 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.EditorFor(model => model.UserFlag.Description));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 58 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 54 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 59 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 54 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 59 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 55 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 60 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 55 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 60 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -252,7 +271,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
" \'");
|
||||
|
||||
|
||||
#line 61 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 66 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.UpdateDescription(Model.UserFlag.Id)));
|
||||
|
||||
|
||||
@@ -262,7 +281,7 @@ WriteLiteral("\',\r\n \'Description\'\r\n
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 66 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 71 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -273,13 +292,13 @@ WriteLiteral("\',\r\n \'Description\'\r\n
|
||||
WriteLiteral(" <pre>\r\n");
|
||||
|
||||
|
||||
#line 70 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 75 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 70 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 75 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (string.IsNullOrEmpty(Model.UserFlag.Description))
|
||||
{
|
||||
|
||||
@@ -293,7 +312,7 @@ WriteLiteral("<None>");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 73 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 78 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -302,14 +321,14 @@ WriteLiteral("\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 76 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 81 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.UserFlag.Description.ToHtmlComment());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 76 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 81 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -319,7 +338,7 @@ WriteLiteral("\r\n");
|
||||
WriteLiteral(" </pre>\r\n");
|
||||
|
||||
|
||||
#line 79 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 84 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -329,7 +348,7 @@ WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n
|
||||
" </th>\r\n <td>\r\n <div><strong>");
|
||||
|
||||
|
||||
#line 86 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 91 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.CurrentAssignmentCount);
|
||||
|
||||
|
||||
@@ -338,7 +357,7 @@ WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n
|
||||
WriteLiteral(" user");
|
||||
|
||||
|
||||
#line 86 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 91 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.CurrentAssignmentCount != 1 ? "s" : null);
|
||||
|
||||
|
||||
@@ -347,7 +366,7 @@ WriteLiteral(" user");
|
||||
WriteLiteral(" currently assigned</strong></div>\r\n <div>");
|
||||
|
||||
|
||||
#line 87 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 92 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.TotalAssignmentCount);
|
||||
|
||||
|
||||
@@ -356,7 +375,7 @@ WriteLiteral(" currently assigned</strong></div>\r\n <div>");
|
||||
WriteLiteral(" total user historical assignment");
|
||||
|
||||
|
||||
#line 87 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 92 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.TotalAssignmentCount != 1 ? "s" : null);
|
||||
|
||||
|
||||
@@ -370,7 +389,7 @@ WriteLiteral(" id=\"Config_UserFlags_Icon\"");
|
||||
WriteLiteral(" data-icon=\"");
|
||||
|
||||
|
||||
#line 94 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 99 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.UserFlag.Icon);
|
||||
|
||||
|
||||
@@ -381,7 +400,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-colour=\"");
|
||||
|
||||
|
||||
#line 94 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 99 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.UserFlag.IconColour);
|
||||
|
||||
|
||||
@@ -389,37 +408,37 @@ WriteLiteral(" data-colour=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3815), Tuple.Create("\"", 3888)
|
||||
, Tuple.Create(Tuple.Create("", 3823), Tuple.Create("fa", 3823), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 3825), Tuple.Create("fa-", 3826), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4042), Tuple.Create("\"", 4115)
|
||||
, Tuple.Create(Tuple.Create("", 4050), Tuple.Create("fa", 4050), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4052), Tuple.Create("fa-", 4053), true)
|
||||
|
||||
#line 94 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3829), Tuple.Create<System.Object, System.Int32>(Model.UserFlag.Icon
|
||||
#line 99 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4056), Tuple.Create<System.Object, System.Int32>(Model.UserFlag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3829), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 3851), Tuple.Create("fa-4x", 3852), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 3857), Tuple.Create("d-", 3858), true)
|
||||
, 4056), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 4078), Tuple.Create("fa-4x", 4079), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4084), Tuple.Create("d-", 4085), true)
|
||||
|
||||
#line 94 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3860), Tuple.Create<System.Object, System.Int32>(Model.UserFlag.IconColour
|
||||
#line 99 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4087), Tuple.Create<System.Object, System.Int32>(Model.UserFlag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3860), false)
|
||||
, 4087), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 95 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 100 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 95 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 100 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canConfig)
|
||||
{
|
||||
|
||||
@@ -449,13 +468,13 @@ WriteLiteral(" class=\"icons\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 102 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 107 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 102 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 107 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
foreach (var icon in Model.Icons)
|
||||
{
|
||||
|
||||
@@ -467,7 +486,7 @@ WriteLiteral(" <i");
|
||||
WriteLiteral(" data-icon=\"");
|
||||
|
||||
|
||||
#line 104 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 109 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(icon.Key);
|
||||
|
||||
|
||||
@@ -475,32 +494,32 @@ WriteLiteral(" data-icon=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4453), Tuple.Create("\"", 4478)
|
||||
, Tuple.Create(Tuple.Create("", 4461), Tuple.Create("fa", 4461), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4463), Tuple.Create("fa-", 4464), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4680), Tuple.Create("\"", 4705)
|
||||
, Tuple.Create(Tuple.Create("", 4688), Tuple.Create("fa", 4688), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4690), Tuple.Create("fa-", 4691), true)
|
||||
|
||||
#line 104 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4467), Tuple.Create<System.Object, System.Int32>(icon.Key
|
||||
#line 109 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4694), Tuple.Create<System.Object, System.Int32>(icon.Key
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4467), false)
|
||||
, 4694), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4479), Tuple.Create("\"", 4498)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4706), Tuple.Create("\"", 4725)
|
||||
|
||||
#line 104 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4487), Tuple.Create<System.Object, System.Int32>(icon.Value
|
||||
#line 109 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4714), Tuple.Create<System.Object, System.Int32>(icon.Value
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4487), false)
|
||||
, 4714), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 105 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 110 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -513,13 +532,13 @@ WriteLiteral(" class=\"colours\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 108 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 113 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 108 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 113 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
foreach (var colour in Model.ThemeColours)
|
||||
{
|
||||
|
||||
@@ -531,7 +550,7 @@ WriteLiteral(" <i");
|
||||
WriteLiteral(" data-colour=\"");
|
||||
|
||||
|
||||
#line 110 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 115 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(colour.Key);
|
||||
|
||||
|
||||
@@ -539,33 +558,33 @@ WriteLiteral(" data-colour=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4830), Tuple.Create("\"", 4866)
|
||||
, Tuple.Create(Tuple.Create("", 4838), Tuple.Create("fa", 4838), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4840), Tuple.Create("fa-square", 4841), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4850), Tuple.Create("d-", 4851), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 5057), Tuple.Create("\"", 5093)
|
||||
, Tuple.Create(Tuple.Create("", 5065), Tuple.Create("fa", 5065), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 5067), Tuple.Create("fa-square", 5068), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 5077), Tuple.Create("d-", 5078), true)
|
||||
|
||||
#line 110 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4853), Tuple.Create<System.Object, System.Int32>(colour.Key
|
||||
#line 115 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5080), Tuple.Create<System.Object, System.Int32>(colour.Key
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4853), false)
|
||||
, 5080), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4867), Tuple.Create("\"", 4888)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5094), Tuple.Create("\"", 5115)
|
||||
|
||||
#line 110 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4875), Tuple.Create<System.Object, System.Int32>(colour.Value
|
||||
#line 115 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5102), Tuple.Create<System.Object, System.Int32>(colour.Value
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4875), false)
|
||||
, 5102), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 111 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 116 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -612,7 +631,7 @@ WriteLiteral(" </div>\r\n
|
||||
"save() {\r\n var url = \'");
|
||||
|
||||
|
||||
#line 171 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 176 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.UpdateIconAndColour(id: Model.UserFlag.Id, redirect: true)));
|
||||
|
||||
|
||||
@@ -643,16 +662,137 @@ WriteLiteral(@"',
|
||||
");
|
||||
|
||||
|
||||
#line 193 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 198 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n </table>\r\n</div>\r\n");
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 198 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 201 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 201 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (hideAdvanced)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td");
|
||||
|
||||
WriteLiteral(" colspan=\"2\"");
|
||||
|
||||
WriteLiteral(" style=\"text-align: right;\"");
|
||||
|
||||
WriteLiteral(">\r\n <button");
|
||||
|
||||
WriteLiteral(" id=\"Config_HideAdvanced_Show\"");
|
||||
|
||||
WriteLiteral(" class=\"button small\"");
|
||||
|
||||
WriteLiteral(@">Show Advanced Options</button>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#Config_HideAdvanced_Show').click(function () {
|
||||
var $this = $(this);
|
||||
$this.closest('.Config_HideAdvanced').removeClass('Config_HideAdvanced');
|
||||
$this.closest('tr').remove();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
");
|
||||
|
||||
|
||||
#line 217 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteLiteral(" class=\"Config_HideAdvanced_Item\"");
|
||||
|
||||
WriteLiteral(">\r\n <th>Linked Groups:\r\n </th>\r\n <td>\r\n " +
|
||||
" <div>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 223 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
||||
{
|
||||
CanConfigure = canConfig,
|
||||
CategoryDescription = UserFlagUsersManagedGroup.GetCategoryDescription(Model.UserFlag),
|
||||
Description = UserFlagUsersManagedGroup.GetDescription(Model.UserFlag),
|
||||
ManagedGroup = Model.UsersLinkedGroup,
|
||||
UpdateUrl = Url.Action(MVC.API.UserFlag.UpdateAssignedUsersLinkedGroup(Model.UserFlag.Id, redirect: true))
|
||||
}));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 231 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
||||
{
|
||||
CanConfigure = canConfig,
|
||||
CategoryDescription = UserFlagUserDevicesManagedGroup.GetCategoryDescription(Model.UserFlag),
|
||||
Description = UserFlagUserDevicesManagedGroup.GetDescription(Model.UserFlag),
|
||||
ManagedGroup = Model.UserDevicesLinkedGroup,
|
||||
UpdateUrl = Url.Action(MVC.API.UserFlag.UpdateAssignedUserDevicesLinkedGroup(Model.UserFlag.Id, redirect: true))
|
||||
}));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 239 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 239 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canConfig)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 241 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 241 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n");
|
||||
|
||||
|
||||
#line 248 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canBulkAssignment || canDelete || canShowUsers)
|
||||
{
|
||||
|
||||
@@ -666,13 +806,13 @@ WriteLiteral(" class=\"actionBar\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 201 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 251 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 201 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 251 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canBulkAssignment)
|
||||
{
|
||||
|
||||
@@ -758,7 +898,7 @@ WriteLiteral(">\r\n user6<br />\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 234 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 284 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(ActiveDirectory.Context.PrimaryDomain.NetBiosName);
|
||||
|
||||
|
||||
@@ -771,7 +911,7 @@ WriteLiteral(" class=\"code\"");
|
||||
WriteLiteral(">user6,smi0099,");
|
||||
|
||||
|
||||
#line 236 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 286 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(ActiveDirectory.Context.PrimaryDomain.NetBiosName);
|
||||
|
||||
|
||||
@@ -784,7 +924,7 @@ WriteLiteral(" class=\"code\"");
|
||||
WriteLiteral(">user6;smi0099;");
|
||||
|
||||
|
||||
#line 237 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 287 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(ActiveDirectory.Context.PrimaryDomain.NetBiosName);
|
||||
|
||||
|
||||
@@ -814,8 +954,6 @@ WriteLiteral(" id=\"Config_UserFlags_BulkAssign_AssignDialog_UserIds\"");
|
||||
|
||||
WriteLiteral(" name=\"UserIds\"");
|
||||
|
||||
WriteLiteral(" data-val=\"true\"");
|
||||
|
||||
WriteLiteral("></textarea>\r\n <h4>Comments:</h4>\r\n <textar" +
|
||||
"ea");
|
||||
|
||||
@@ -861,64 +999,64 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
||||
"\').attr(\'action\', \'");
|
||||
|
||||
|
||||
#line 304 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 354 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.BulkAssignUsers(Model.UserFlag.Id, true)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\');\r\n\r\n assignDialog.addClass(\'loading\');\r\n " +
|
||||
" $.getJSON(\'");
|
||||
WriteLiteral("\');\r\n\r\n assignDialog.addClass(\'loading\');\r\n " +
|
||||
" $.getJSON(\'");
|
||||
|
||||
|
||||
#line 307 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.AssignedUsers(Model.UserFlag.Id)));
|
||||
#line 357 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.AssignedUsers(Model.UserFlag.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"', function (response, result) {
|
||||
assignDialog.removeClass('loading');
|
||||
assignDialog.removeClass('loading');
|
||||
|
||||
if (result != 'success') {
|
||||
alert('Unable to load current assignments:\n' + response);
|
||||
assignDialog.dialog('close');
|
||||
} else {
|
||||
if (!!response) {
|
||||
assignUserIds.val(response.join('\n'));
|
||||
} else {
|
||||
assignUserIds.val('');
|
||||
}
|
||||
}
|
||||
});
|
||||
if (result != 'success') {
|
||||
alert('Unable to load current assignments:\n' + response);
|
||||
assignDialog.dialog('close');
|
||||
} else {
|
||||
if (!!response) {
|
||||
assignUserIds.val(response.join('\n'));
|
||||
} else {
|
||||
assignUserIds.val('');
|
||||
}
|
||||
}
|
||||
else // Assume Add
|
||||
{
|
||||
assignUserIds.closest('form').attr('action', '");
|
||||
});
|
||||
}
|
||||
else // Assume Add
|
||||
{
|
||||
assignUserIds.closest('form').attr('action', '");
|
||||
|
||||
|
||||
#line 324 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.BulkAssignUsers(Model.UserFlag.Id, false)));
|
||||
#line 374 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.BulkAssignUsers(Model.UserFlag.Id, false)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"');
|
||||
}
|
||||
}
|
||||
|
||||
assignDialog.dialog('open');
|
||||
}
|
||||
assignDialog.dialog('open');
|
||||
}
|
||||
|
||||
$('#Config_UserFlags_BulkAssign_Button').click(function () {
|
||||
showModeDialog();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
$('#Config_UserFlags_BulkAssign_Button').click(function () {
|
||||
showModeDialog();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 336 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 386 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -927,13 +1065,13 @@ WriteLiteral(@"');
|
||||
WriteLiteral("\r\n\r\n\r\n");
|
||||
|
||||
|
||||
#line 340 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 390 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 340 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 390 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canDelete)
|
||||
{
|
||||
|
||||
@@ -941,14 +1079,14 @@ WriteLiteral("\r\n\r\n\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 342 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 392 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.ActionLinkButton("Delete", MVC.API.UserFlag.Delete(Model.UserFlag.Id, true), "Config_UserFlags_Actions_Delete_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 342 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 392 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -968,13 +1106,13 @@ WriteLiteral("></i>\r\n This item will be permanently deleted
|
||||
"covered.<br />\r\n <br />\r\n");
|
||||
|
||||
|
||||
#line 348 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 398 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 348 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 398 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (Model.CurrentAssignmentCount > 0)
|
||||
{
|
||||
|
||||
@@ -984,7 +1122,7 @@ WriteLiteral("></i>\r\n This item will be permanently deleted
|
||||
WriteLiteral(" <strong>");
|
||||
|
||||
|
||||
#line 350 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 400 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.CurrentAssignmentCount);
|
||||
|
||||
|
||||
@@ -993,7 +1131,7 @@ WriteLiteral(" <strong>");
|
||||
WriteLiteral(" user");
|
||||
|
||||
|
||||
#line 350 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 400 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.CurrentAssignmentCount != 1 ? "s are" : " is");
|
||||
|
||||
|
||||
@@ -1006,7 +1144,7 @@ WriteLiteral(" <br />\r\n");
|
||||
WriteLiteral(" <br />\r\n");
|
||||
|
||||
|
||||
#line 353 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 403 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1049,7 +1187,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 385 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 435 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1058,7 +1196,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 386 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 436 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canShowUsers)
|
||||
{
|
||||
|
||||
@@ -1066,14 +1204,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 388 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 438 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.ActionLinkButton(string.Format("Show {0} user{1}", Model.CurrentAssignmentCount, (Model.CurrentAssignmentCount == 1 ? null : "s")), MVC.Search.Query(Model.UserFlag.Id.ToString(), "UserFlag"), "Config_UserFlags_Actions_ShowUsers_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 388 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 438 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -1083,7 +1221,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 391 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 441 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
|
||||
@@ -651,9 +651,9 @@ Webcam.init();
|
||||
|
||||
xhr.open("POST", self.uploadUrl, true);
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||
if (xhr.readyState === 4) {
|
||||
if (xhr.status !== 200) {
|
||||
alert('Error Uploading [' + fileName + ']: ' + xhr.responseText);
|
||||
alert('Error Uploading [' + fileName + ']: ' + xhr.statusText);
|
||||
}
|
||||
progress.slideUp(400, function () {
|
||||
progress.remove();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
-2
@@ -250,9 +250,9 @@
|
||||
|
||||
xhr.open("POST", self.uploadUrl, true);
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||
if (xhr.readyState === 4) {
|
||||
if (xhr.status !== 200) {
|
||||
alert('Error Uploading [' + fileName + ']: ' + xhr.responseText);
|
||||
alert('Error Uploading [' + fileName + ']: ' + xhr.statusText);
|
||||
}
|
||||
progress.slideUp(400, function () {
|
||||
progress.remove();
|
||||
|
||||
@@ -2095,6 +2095,13 @@ input:-moz-placeholder {
|
||||
font-weight: bold;
|
||||
}*/
|
||||
.ui-dialog {
|
||||
position: fixed;
|
||||
overflow: visible;
|
||||
padding: 0;
|
||||
border-color: #333333;
|
||||
background: #fcfcfc;
|
||||
box-shadow: rgba(20, 20, 20, 0.7) 0px 0px 50px;
|
||||
top: 50px !important;
|
||||
animation-name: ui-dialog-show;
|
||||
-webkit-animation-name: ui-dialog-show;
|
||||
animation-duration: .2s;
|
||||
@@ -2102,6 +2109,18 @@ input:-moz-placeholder {
|
||||
animation-timing-function: ease-in-out;
|
||||
-webkit-animation-timing-function: ease-in-out;
|
||||
}
|
||||
.ui-dialog .ui-widget-header {
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-bottom-color: #d1d1d1;
|
||||
background: #333333;
|
||||
color: #fff;
|
||||
font-size: 1.1em;
|
||||
font-weight: normal;
|
||||
text-transform: uppercase;
|
||||
padding: .6em 1em;
|
||||
}
|
||||
@keyframes ui-dialog-show {
|
||||
0% {
|
||||
transform: translateY(-30px);
|
||||
@@ -2149,25 +2168,6 @@ input:-moz-placeholder {
|
||||
.page .dialog {
|
||||
display: none;
|
||||
}
|
||||
.ui-dialog {
|
||||
padding: 0;
|
||||
border-color: #333333;
|
||||
background: #fcfcfc;
|
||||
box-shadow: rgba(20, 20, 20, 0.7) 0px 0px 50px;
|
||||
top: 50px !important;
|
||||
}
|
||||
.ui-dialog .ui-widget-header {
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-bottom-color: #d1d1d1;
|
||||
background: #333333;
|
||||
color: #fff;
|
||||
font-size: 1.1em;
|
||||
font-weight: normal;
|
||||
text-transform: uppercase;
|
||||
padding: .6em 1em;
|
||||
}
|
||||
body .ui-tooltip {
|
||||
border-width: 1px;
|
||||
-webkit-box-shadow: none;
|
||||
@@ -4111,7 +4111,7 @@ a.button {
|
||||
border: 1px solid #1a5f95;
|
||||
background: #1e6dab;
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
@@ -4753,6 +4753,43 @@ div.form > table table.sub > tbody > tr > th.name {
|
||||
border-right: none;
|
||||
padding-right: 0;
|
||||
}
|
||||
div.infoBox {
|
||||
margin: 0.4em 0;
|
||||
padding: 0.4em;
|
||||
border: 1px solid #fff397;
|
||||
background-color: #fffef7;
|
||||
}
|
||||
div.infoBox i {
|
||||
color: #1e6dab;
|
||||
}
|
||||
div.infoBox.alert {
|
||||
border: 1px solid #fa6800;
|
||||
background-color: #fff9f5;
|
||||
color: #333333;
|
||||
}
|
||||
div.infoBox.alert i {
|
||||
color: #fa6800;
|
||||
}
|
||||
div.infoBox.error {
|
||||
border: 1px solid #e51400;
|
||||
background-color: #fffaf9;
|
||||
color: #e51400;
|
||||
}
|
||||
div.infoBox.error i {
|
||||
color: #e51400;
|
||||
}
|
||||
div.infoBox p {
|
||||
line-height: 1.2em;
|
||||
}
|
||||
p.fa-p {
|
||||
text-indent: -1.48em;
|
||||
margin-left: 1.48em;
|
||||
}
|
||||
p.fa-p > i:first-child {
|
||||
text-indent: 0;
|
||||
width: 1.28em;
|
||||
margin-right: 0.2em;
|
||||
}
|
||||
div.disco-attachmentUpload-dropTarget {
|
||||
display: none;
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -102,6 +102,23 @@
|
||||
font-size: 12px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.Config_HideAdvanced .Config_HideAdvanced_Item {
|
||||
display: none;
|
||||
}
|
||||
.Config_LinkedGroup_Instance {
|
||||
margin: 4px 0 8px 4px;
|
||||
padding: 4px 0 4px 6px;
|
||||
border-left: 4px solid #cccccc;
|
||||
}
|
||||
.Config_LinkedGroup_Instance div.code {
|
||||
margin-left: 2px;
|
||||
}
|
||||
#Config_LinkedGroup_Dialog h3 {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
#Config_LinkedGroup_Dialog div.input {
|
||||
margin-top: 12px;
|
||||
}
|
||||
#expressionEditor #expressionEditorExceptionContainer {
|
||||
display: none;
|
||||
border: 1px dashed #FF9696;
|
||||
@@ -601,6 +618,21 @@ div.logEventsViewport table.logEventsViewport > tbody > tr > td.eventType {
|
||||
padding: 2px;
|
||||
height: 430px;
|
||||
}
|
||||
#Config_DocumentTemplates_Show > div.form > table > tbody > tr > th {
|
||||
width: 140px;
|
||||
}
|
||||
#Config_DocumentTemplates_Show #Config_DocumentTemplates_Scope_Button {
|
||||
margin-top: 4px;
|
||||
}
|
||||
#Config_DocumentTemplates_Scope_Dialog div.input {
|
||||
margin: 14px 10px 20px;
|
||||
}
|
||||
#Config_DocumentTemplates_TemplatePdf_Dialog div {
|
||||
text-align: center;
|
||||
}
|
||||
#Config_DocumentTemplates_TemplatePdf_Dialog div input {
|
||||
margin: 16px 0;
|
||||
}
|
||||
#Config_DocumentTemplates_JobSubTypes {
|
||||
border: 1px dashed #d8d8d8;
|
||||
background-color: #ffffff;
|
||||
|
||||
@@ -27,6 +27,32 @@
|
||||
}
|
||||
}
|
||||
|
||||
.Config_HideAdvanced {
|
||||
.Config_HideAdvanced_Item {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.Config_LinkedGroup_Instance {
|
||||
margin: 4px 0 8px 4px;
|
||||
padding: 4px 0 4px 6px;
|
||||
border-left: 4px solid @SubtleBorderColour;
|
||||
|
||||
div.code {
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
#Config_LinkedGroup_Dialog {
|
||||
h3 {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
div.input {
|
||||
margin-top: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
#expressionEditor {
|
||||
#expressionEditorExceptionContainer {
|
||||
display: none;
|
||||
@@ -624,6 +650,31 @@ div.logEventsViewport {
|
||||
}
|
||||
|
||||
// Document Templates
|
||||
#Config_DocumentTemplates_Show {
|
||||
& > div.form > table > tbody > tr > th {
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
#Config_DocumentTemplates_Scope_Button {
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
#Config_DocumentTemplates_Scope_Dialog {
|
||||
div.input {
|
||||
margin: 14px 10px 20px;
|
||||
}
|
||||
}
|
||||
#Config_DocumentTemplates_TemplatePdf_Dialog {
|
||||
div {
|
||||
text-align: center;
|
||||
|
||||
input {
|
||||
margin: 16px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#Config_DocumentTemplates_JobSubTypes {
|
||||
border: 1px dashed @TableDataDarkBorderColour;
|
||||
background-color: @white;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -46,6 +46,7 @@
|
||||
@StatusUnknown: @HeaderBackgroundColour;
|
||||
@StatusSuccess: @ThemeGreen;
|
||||
@StatusInformation: @ButtonColour;
|
||||
@StatusHighlight: @ThemeYellow;
|
||||
@StatusWarning: @ThemeAmber;
|
||||
@StatusAlert: @ThemeOrange;
|
||||
@StatusError: @ButtonAlertColour;
|
||||
|
||||
@@ -450,7 +450,7 @@ a.button {
|
||||
border: 1px solid #1a5f95;
|
||||
background: #1e6dab;
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
@@ -1092,6 +1092,43 @@ div.form > table table.sub > tbody > tr > th.name {
|
||||
border-right: none;
|
||||
padding-right: 0;
|
||||
}
|
||||
div.infoBox {
|
||||
margin: 0.4em 0;
|
||||
padding: 0.4em;
|
||||
border: 1px solid #fff397;
|
||||
background-color: #fffef7;
|
||||
}
|
||||
div.infoBox i {
|
||||
color: #1e6dab;
|
||||
}
|
||||
div.infoBox.alert {
|
||||
border: 1px solid #fa6800;
|
||||
background-color: #fff9f5;
|
||||
color: #333333;
|
||||
}
|
||||
div.infoBox.alert i {
|
||||
color: #fa6800;
|
||||
}
|
||||
div.infoBox.error {
|
||||
border: 1px solid #e51400;
|
||||
background-color: #fffaf9;
|
||||
color: #e51400;
|
||||
}
|
||||
div.infoBox.error i {
|
||||
color: #e51400;
|
||||
}
|
||||
div.infoBox p {
|
||||
line-height: 1.2em;
|
||||
}
|
||||
p.fa-p {
|
||||
text-indent: -1.48em;
|
||||
margin-left: 1.48em;
|
||||
}
|
||||
p.fa-p > i:first-child {
|
||||
text-indent: 0;
|
||||
width: 1.28em;
|
||||
margin-right: 0.2em;
|
||||
}
|
||||
div.disco-attachmentUpload-dropTarget {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ a {
|
||||
border: 1px solid @ButtonBorderColour;
|
||||
background: @ButtonColour;
|
||||
color: @white;
|
||||
font-weight: bold;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
@@ -1090,6 +1090,52 @@ div.form {
|
||||
}
|
||||
}
|
||||
|
||||
div.infoBox {
|
||||
margin: 0.4em 0;
|
||||
padding: 0.4em;
|
||||
border: 1px solid lighten(@StatusHighlight, 35%);
|
||||
background-color: lighten(@StatusHighlight, 54%);
|
||||
|
||||
i {
|
||||
color: @StatusInformation;
|
||||
}
|
||||
|
||||
&.alert {
|
||||
border: 1px solid @StatusAlert;
|
||||
background-color: lighten(@StatusAlert, 49%);
|
||||
color: @FontBodyColour;
|
||||
|
||||
i {
|
||||
color: @StatusAlert;
|
||||
}
|
||||
}
|
||||
|
||||
&.error {
|
||||
border: 1px solid @StatusError;
|
||||
background-color: lighten(@StatusError, 54%);
|
||||
color: @StatusError;
|
||||
|
||||
i {
|
||||
color: @StatusError;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 1.2em;
|
||||
}
|
||||
}
|
||||
|
||||
p.fa-p {
|
||||
text-indent: -1.48em;
|
||||
margin-left: 1.48em;
|
||||
|
||||
& > i:first-child {
|
||||
text-indent: 0;
|
||||
width: 1.28em;
|
||||
margin-right: 0.2em;
|
||||
}
|
||||
}
|
||||
|
||||
// Attachment Uploader
|
||||
div.disco-attachmentUpload-dropTarget {
|
||||
display: none;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -240,6 +240,13 @@ input:-moz-placeholder {
|
||||
font-weight: bold;
|
||||
}*/
|
||||
.ui-dialog {
|
||||
position: fixed;
|
||||
overflow: visible;
|
||||
padding: 0;
|
||||
border-color: #333333;
|
||||
background: #fcfcfc;
|
||||
box-shadow: rgba(20, 20, 20, 0.7) 0px 0px 50px;
|
||||
top: 50px !important;
|
||||
animation-name: ui-dialog-show;
|
||||
-webkit-animation-name: ui-dialog-show;
|
||||
animation-duration: .2s;
|
||||
@@ -247,6 +254,18 @@ input:-moz-placeholder {
|
||||
animation-timing-function: ease-in-out;
|
||||
-webkit-animation-timing-function: ease-in-out;
|
||||
}
|
||||
.ui-dialog .ui-widget-header {
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-bottom-color: #d1d1d1;
|
||||
background: #333333;
|
||||
color: #fff;
|
||||
font-size: 1.1em;
|
||||
font-weight: normal;
|
||||
text-transform: uppercase;
|
||||
padding: .6em 1em;
|
||||
}
|
||||
@keyframes ui-dialog-show {
|
||||
0% {
|
||||
transform: translateY(-30px);
|
||||
@@ -294,25 +313,6 @@ input:-moz-placeholder {
|
||||
.page .dialog {
|
||||
display: none;
|
||||
}
|
||||
.ui-dialog {
|
||||
padding: 0;
|
||||
border-color: #333333;
|
||||
background: #fcfcfc;
|
||||
box-shadow: rgba(20, 20, 20, 0.7) 0px 0px 50px;
|
||||
top: 50px !important;
|
||||
}
|
||||
.ui-dialog .ui-widget-header {
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-bottom-color: #d1d1d1;
|
||||
background: #333333;
|
||||
color: #fff;
|
||||
font-size: 1.1em;
|
||||
font-weight: normal;
|
||||
text-transform: uppercase;
|
||||
padding: .6em 1em;
|
||||
}
|
||||
body .ui-tooltip {
|
||||
border-width: 1px;
|
||||
-webkit-box-shadow: none;
|
||||
|
||||
@@ -2,43 +2,49 @@
|
||||
|
||||
// Theme Changes
|
||||
.ui-widget {
|
||||
font-family: @FontFamilyBody;
|
||||
font-size: 1em;
|
||||
}
|
||||
.ui-widget input,
|
||||
.ui-widget select,
|
||||
.ui-widget textarea,
|
||||
.ui-widget button {
|
||||
font-family: @FontFamilyBody;
|
||||
font-family: @FontFamilyBody;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.ui-widget input,
|
||||
.ui-widget select,
|
||||
.ui-widget textarea,
|
||||
.ui-widget button {
|
||||
font-family: @FontFamilyBody;
|
||||
}
|
||||
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-left,
|
||||
.ui-corner-tl {
|
||||
border-top-left-radius: 0;
|
||||
border-top-left-radius: 0;
|
||||
}
|
||||
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-right,
|
||||
.ui-corner-tr {
|
||||
border-top-right-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-left,
|
||||
.ui-corner-bl {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-right,
|
||||
.ui-corner-br {
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
.ui-widget-overlay {
|
||||
background: #666666;
|
||||
opacity: .5;
|
||||
filter: Alpha(Opacity=50);
|
||||
background: #666666;
|
||||
opacity: .5;
|
||||
filter: Alpha(Opacity=50);
|
||||
}
|
||||
|
||||
// Watermark
|
||||
@@ -197,12 +203,32 @@ input:-moz-placeholder {
|
||||
// Dialogs
|
||||
|
||||
.ui-dialog {
|
||||
position: fixed;
|
||||
overflow: visible;
|
||||
padding: 0;
|
||||
border-color: @HeaderBackgroundColour;
|
||||
background: #fcfcfc;
|
||||
box-shadow: rgba(20,20,20,.7) 0px 0px 50px;
|
||||
top: 50px !important;
|
||||
animation-name: ui-dialog-show;
|
||||
-webkit-animation-name: ui-dialog-show;
|
||||
animation-duration: .2s;
|
||||
-webkit-animation-duration: .2s;
|
||||
animation-timing-function: ease-in-out;
|
||||
-webkit-animation-timing-function: ease-in-out;
|
||||
|
||||
.ui-widget-header {
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-bottom-color: @BackgroundColour;
|
||||
background: @HeaderBackgroundColour;
|
||||
color: #fff;
|
||||
font-size: 1.1em;
|
||||
font-weight: normal;
|
||||
text-transform: uppercase;
|
||||
padding: .6em 1em;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes ui-dialog-show {
|
||||
@@ -264,27 +290,6 @@ input:-moz-placeholder {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ui-dialog {
|
||||
padding: 0;
|
||||
border-color: @HeaderBackgroundColour;
|
||||
background: #fcfcfc;
|
||||
box-shadow: rgba(20,20,20,.7) 0px 0px 50px;
|
||||
top: 50px !important;
|
||||
}
|
||||
|
||||
.ui-dialog .ui-widget-header {
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-bottom-color: @BackgroundColour;
|
||||
background: @HeaderBackgroundColour;
|
||||
color: #fff;
|
||||
font-size: 1.1em;
|
||||
font-weight: normal;
|
||||
text-transform: uppercase;
|
||||
padding: .6em 1em;
|
||||
}
|
||||
|
||||
// Tooltip
|
||||
body .ui-tooltip {
|
||||
border-width: 1px;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -281,8 +281,8 @@ namespace Disco.Web.Controllers
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Id))
|
||||
return Json(null, JsonRequestBehavior.AllowGet);
|
||||
else if (!Id.Contains(@"\"))
|
||||
Id = string.Format(@"{0}\{1}", ActiveDirectory.Context.PrimaryDomain.NetBiosName, Id);
|
||||
|
||||
Id = ActiveDirectory.ParseDomainAccountId(Id);
|
||||
|
||||
var subject = ActiveDirectory.RetrieveADObject(Id, Quick: true);
|
||||
|
||||
|
||||
@@ -205,8 +205,7 @@ namespace Disco.Web.Controllers
|
||||
case "userid":
|
||||
Authorization.Require(Claims.User.Search);
|
||||
|
||||
if (!term.Contains('\\'))
|
||||
term = string.Format(@"{0}\{1}", ActiveDirectory.Context.PrimaryDomain.NetBiosName, term);
|
||||
term = ActiveDirectory.ParseDomainAccountId(term);
|
||||
|
||||
var user = Database.Users.FirstOrDefault(u => u.UserId == term);
|
||||
if (user != null)
|
||||
|
||||
@@ -36,10 +36,7 @@ namespace Disco.Web.Controllers
|
||||
if (string.IsNullOrWhiteSpace(id))
|
||||
throw new ArgumentNullException("id", "The User Id must be provided");
|
||||
|
||||
if (string.IsNullOrEmpty(Domain))
|
||||
id = ActiveDirectory.Context.PrimaryDomain.NetBiosName + @"\" + id;
|
||||
else
|
||||
id = Domain + @"\" + id;
|
||||
id = ActiveDirectory.ParseDomainAccountId(id, Domain);
|
||||
|
||||
var m = new Models.User.ShowModel();
|
||||
|
||||
|
||||
@@ -217,6 +217,7 @@
|
||||
<Compile Include="Areas\Config\Models\AuthorizationRole\IndexModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\AuthorizationRole\ShowModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\Config\IndexModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\Shared\LinkedGroupModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\UserFlag\CreateModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\UserFlag\IndexModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\UserFlag\ShowModel.cs" />
|
||||
@@ -281,6 +282,16 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Install.cshtml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Areas\Config\Views\Shared\LinkedGroupInstance.generated.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>LinkedGroupInstance.cshtml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Areas\Config\Views\Shared\LinkedGroupShared.generated.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>LinkedGroupShared.cshtml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Areas\Config\Views\Shared\TaskStatus.generated.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
@@ -1017,6 +1028,14 @@
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>Install.generated.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Areas\Config\Views\Shared\LinkedGroupInstance.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>LinkedGroupInstance.generated.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Areas\Config\Views\Shared\LinkedGroupShared.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>LinkedGroupShared.generated.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Areas\Config\Views\Shared\TaskStatus.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>TaskStatus.generated.cs</LastGenOutput>
|
||||
@@ -2157,7 +2176,7 @@
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildAction="Both" BuildVersion_StartDate="2011/7/1" />
|
||||
<UserProperties BuildVersion_StartDate="2011/7/1" BuildVersion_BuildAction="Both" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||
|
||||
@@ -147,11 +147,14 @@ namespace Disco.Web
|
||||
if (string.IsNullOrWhiteSpace(userId))
|
||||
return match.Value;
|
||||
if (string.IsNullOrWhiteSpace(domainId))
|
||||
userId = string.Concat(ActiveDirectory.Context.PrimaryDomain.NetBiosName, @"\", userId);
|
||||
userId = ActiveDirectory.ParseDomainAccountId(userId);
|
||||
else
|
||||
userId = string.Concat(domainId, userId);
|
||||
|
||||
return string.Format("<a href=\"{2}\" title=\"User {1}\">{0}</a>", match.Value, userId, urlHelper.Action(MVC.User.Show(userId)));
|
||||
if (!ActiveDirectory.IsValidDomainAccountId(userId))
|
||||
return match.Value;
|
||||
|
||||
return string.Format("<a href=\"{2}\" title=\"User {1}\">{0}</a>", match.Value, ActiveDirectory.FriendlyAccountId(userId), urlHelper.Action(MVC.User.Show(userId)));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
@@ -12,18 +12,16 @@ namespace Disco.Web.Controllers
|
||||
{
|
||||
internal static void T4MVCAddUserIdRouteValues(T4MVC_System_Web_Mvc_ActionResult callInfo, string UserId)
|
||||
{
|
||||
var splitId = UserExtensions.SplitUserId(UserId);
|
||||
var slashIndex = UserId.IndexOf('\\');
|
||||
|
||||
if (splitId.Item1 == null)
|
||||
if (slashIndex < 0)
|
||||
throw new ArgumentException("The User Id is not in the correct format ({Domain}\\{Id})", "id");
|
||||
|
||||
string userDomain;
|
||||
if (splitId.Item1.Equals(ActiveDirectory.Context.PrimaryDomain.NetBiosName, StringComparison.OrdinalIgnoreCase))
|
||||
string userDomain = UserId.Substring(0, slashIndex);
|
||||
if (userDomain.Equals(ActiveDirectory.Context.PrimaryDomain.NetBiosName, StringComparison.OrdinalIgnoreCase))
|
||||
userDomain = null; // Url doesn't contain Domain if it is the default.
|
||||
else
|
||||
userDomain = splitId.Item1;
|
||||
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", splitId.Item2);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", UserId.Substring(slashIndex + 1));
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Domain", userDomain);
|
||||
}
|
||||
|
||||
@@ -54,6 +52,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
|
||||
[NonAction]
|
||||
public virtual ActionResult Attachments(string id)
|
||||
{
|
||||
|
||||
+325
-5
@@ -3150,6 +3150,18 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult UpdateDevicesLinkedGroup()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDevicesLinkedGroup);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult UpdateAssignedUsersLinkedGroup()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUsersLinkedGroup);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult Delete()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Delete);
|
||||
@@ -3191,6 +3203,8 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string UpdateInsuredUntil = "UpdateInsuredUntil";
|
||||
public readonly string UpdateInsuranceDetails = "UpdateInsuranceDetails";
|
||||
public readonly string UpdateComments = "UpdateComments";
|
||||
public readonly string UpdateDevicesLinkedGroup = "UpdateDevicesLinkedGroup";
|
||||
public readonly string UpdateAssignedUsersLinkedGroup = "UpdateAssignedUsersLinkedGroup";
|
||||
public readonly string Delete = "Delete";
|
||||
public readonly string Index = "Index";
|
||||
public readonly string Timeline = "Timeline";
|
||||
@@ -3214,6 +3228,8 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public const string UpdateInsuredUntil = "UpdateInsuredUntil";
|
||||
public const string UpdateInsuranceDetails = "UpdateInsuranceDetails";
|
||||
public const string UpdateComments = "UpdateComments";
|
||||
public const string UpdateDevicesLinkedGroup = "UpdateDevicesLinkedGroup";
|
||||
public const string UpdateAssignedUsersLinkedGroup = "UpdateAssignedUsersLinkedGroup";
|
||||
public const string Delete = "Delete";
|
||||
public const string Index = "Index";
|
||||
public const string Timeline = "Timeline";
|
||||
@@ -3371,6 +3387,26 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string Comments = "Comments";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateDevicesLinkedGroup s_params_UpdateDevicesLinkedGroup = new ActionParamsClass_UpdateDevicesLinkedGroup();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_UpdateDevicesLinkedGroup UpdateDevicesLinkedGroupParams { get { return s_params_UpdateDevicesLinkedGroup; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_UpdateDevicesLinkedGroup
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string GroupId = "GroupId";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateAssignedUsersLinkedGroup s_params_UpdateAssignedUsersLinkedGroup = new ActionParamsClass_UpdateAssignedUsersLinkedGroup();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_UpdateAssignedUsersLinkedGroup UpdateAssignedUsersLinkedGroupParams { get { return s_params_UpdateAssignedUsersLinkedGroup; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_UpdateAssignedUsersLinkedGroup
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string GroupId = "GroupId";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_Delete s_params_Delete = new ActionParamsClass_Delete();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_Delete DeleteParams { get { return s_params_Delete; } }
|
||||
@@ -3618,6 +3654,34 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, bool redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateDevicesLinkedGroup(int id, string GroupId, bool redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDevicesLinkedGroup);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||
UpdateDevicesLinkedGroupOverride(callInfo, id, GroupId, redirect);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateAssignedUsersLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, bool redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId, bool redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUsersLinkedGroup);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||
UpdateAssignedUsersLinkedGroupOverride(callInfo, id, GroupId, redirect);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void DeleteOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, bool? redirect);
|
||||
|
||||
@@ -4096,7 +4160,6 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string AssignedUserId = "AssignedUserId";
|
||||
public readonly string AssignedUserDomain = "AssignedUserDomain";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateAllowUnauthenticatedEnrol s_params_UpdateAllowUnauthenticatedEnrol = new ActionParamsClass_UpdateAllowUnauthenticatedEnrol();
|
||||
@@ -4366,17 +4429,16 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateAssignedUserIdOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, string AssignedUserId, string AssignedUserDomain, bool redirect);
|
||||
partial void UpdateAssignedUserIdOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, string AssignedUserId, bool redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateAssignedUserId(string id, string AssignedUserId, string AssignedUserDomain, bool redirect)
|
||||
public override System.Web.Mvc.ActionResult UpdateAssignedUserId(string id, string AssignedUserId, bool redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUserId);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "AssignedUserId", AssignedUserId);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "AssignedUserDomain", AssignedUserDomain);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||
UpdateAssignedUserIdOverride(callInfo, id, AssignedUserId, AssignedUserDomain, redirect);
|
||||
UpdateAssignedUserIdOverride(callInfo, id, AssignedUserId, redirect);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
@@ -5223,6 +5285,18 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult UpdateDevicesLinkedGroup()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDevicesLinkedGroup);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult UpdateAssignedUsersLinkedGroup()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUsersLinkedGroup);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult Delete()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Delete);
|
||||
@@ -5269,6 +5343,8 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string UpdateProvisionADAccount = "UpdateProvisionADAccount";
|
||||
public readonly string UpdateAssignedUserLocalAdmin = "UpdateAssignedUserLocalAdmin";
|
||||
public readonly string UpdateAllowUntrustedReimageJobEnrolment = "UpdateAllowUntrustedReimageJobEnrolment";
|
||||
public readonly string UpdateDevicesLinkedGroup = "UpdateDevicesLinkedGroup";
|
||||
public readonly string UpdateAssignedUsersLinkedGroup = "UpdateAssignedUsersLinkedGroup";
|
||||
public readonly string Delete = "Delete";
|
||||
public readonly string Default = "Default";
|
||||
public readonly string DefaultAddDeviceOffline = "DefaultAddDeviceOffline";
|
||||
@@ -5291,6 +5367,8 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public const string UpdateProvisionADAccount = "UpdateProvisionADAccount";
|
||||
public const string UpdateAssignedUserLocalAdmin = "UpdateAssignedUserLocalAdmin";
|
||||
public const string UpdateAllowUntrustedReimageJobEnrolment = "UpdateAllowUntrustedReimageJobEnrolment";
|
||||
public const string UpdateDevicesLinkedGroup = "UpdateDevicesLinkedGroup";
|
||||
public const string UpdateAssignedUsersLinkedGroup = "UpdateAssignedUsersLinkedGroup";
|
||||
public const string Delete = "Delete";
|
||||
public const string Default = "Default";
|
||||
public const string DefaultAddDeviceOffline = "DefaultAddDeviceOffline";
|
||||
@@ -5438,6 +5516,26 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string AllowUntrustedReimageJobEnrolment = "AllowUntrustedReimageJobEnrolment";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateDevicesLinkedGroup s_params_UpdateDevicesLinkedGroup = new ActionParamsClass_UpdateDevicesLinkedGroup();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_UpdateDevicesLinkedGroup UpdateDevicesLinkedGroupParams { get { return s_params_UpdateDevicesLinkedGroup; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_UpdateDevicesLinkedGroup
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string GroupId = "GroupId";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateAssignedUsersLinkedGroup s_params_UpdateAssignedUsersLinkedGroup = new ActionParamsClass_UpdateAssignedUsersLinkedGroup();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_UpdateAssignedUsersLinkedGroup UpdateAssignedUsersLinkedGroupParams { get { return s_params_UpdateAssignedUsersLinkedGroup; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_UpdateAssignedUsersLinkedGroup
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string GroupId = "GroupId";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_Delete s_params_Delete = new ActionParamsClass_Delete();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_Delete DeleteParams { get { return s_params_Delete; } }
|
||||
@@ -5681,6 +5779,34 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, bool redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateDevicesLinkedGroup(int id, string GroupId, bool redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDevicesLinkedGroup);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||
UpdateDevicesLinkedGroupOverride(callInfo, id, GroupId, redirect);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateAssignedUsersLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, bool redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId, bool redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUsersLinkedGroup);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||
UpdateAssignedUsersLinkedGroupOverride(callInfo, id, GroupId, redirect);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void DeleteOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, bool? redirect);
|
||||
|
||||
@@ -5803,6 +5929,18 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult UpdateDevicesLinkedGroup()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDevicesLinkedGroup);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult UpdateUsersLinkedGroup()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateUsersLinkedGroup);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult ImporterThumbnail()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.ImporterThumbnail);
|
||||
@@ -5866,6 +6004,8 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string UpdateFlattenForm = "UpdateFlattenForm";
|
||||
public readonly string UpdateScope = "UpdateScope";
|
||||
public readonly string UpdateJobSubTypes = "UpdateJobSubTypes";
|
||||
public readonly string UpdateDevicesLinkedGroup = "UpdateDevicesLinkedGroup";
|
||||
public readonly string UpdateUsersLinkedGroup = "UpdateUsersLinkedGroup";
|
||||
public readonly string ImporterThumbnail = "ImporterThumbnail";
|
||||
public readonly string ImporterUndetectedFiles = "ImporterUndetectedFiles";
|
||||
public readonly string ImporterUndetectedDataIdLookup = "ImporterUndetectedDataIdLookup";
|
||||
@@ -5886,6 +6026,8 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public const string UpdateFlattenForm = "UpdateFlattenForm";
|
||||
public const string UpdateScope = "UpdateScope";
|
||||
public const string UpdateJobSubTypes = "UpdateJobSubTypes";
|
||||
public const string UpdateDevicesLinkedGroup = "UpdateDevicesLinkedGroup";
|
||||
public const string UpdateUsersLinkedGroup = "UpdateUsersLinkedGroup";
|
||||
public const string ImporterThumbnail = "ImporterThumbnail";
|
||||
public const string ImporterUndetectedFiles = "ImporterUndetectedFiles";
|
||||
public const string ImporterUndetectedDataIdLookup = "ImporterUndetectedDataIdLookup";
|
||||
@@ -5968,6 +6110,28 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string JobSubTypes = "JobSubTypes";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateDevicesLinkedGroup s_params_UpdateDevicesLinkedGroup = new ActionParamsClass_UpdateDevicesLinkedGroup();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_UpdateDevicesLinkedGroup UpdateDevicesLinkedGroupParams { get { return s_params_UpdateDevicesLinkedGroup; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_UpdateDevicesLinkedGroup
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string GroupId = "GroupId";
|
||||
public readonly string FilterBeginDate = "FilterBeginDate";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateUsersLinkedGroup s_params_UpdateUsersLinkedGroup = new ActionParamsClass_UpdateUsersLinkedGroup();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_UpdateUsersLinkedGroup UpdateUsersLinkedGroupParams { get { return s_params_UpdateUsersLinkedGroup; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_UpdateUsersLinkedGroup
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string GroupId = "GroupId";
|
||||
public readonly string FilterBeginDate = "FilterBeginDate";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_ImporterThumbnail s_params_ImporterThumbnail = new ActionParamsClass_ImporterThumbnail();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_ImporterThumbnail ImporterThumbnailParams { get { return s_params_ImporterThumbnail; } }
|
||||
@@ -6163,6 +6327,36 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, string GroupId, System.DateTime? FilterBeginDate, bool redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateDevicesLinkedGroup(string id, string GroupId, System.DateTime? FilterBeginDate, bool redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDevicesLinkedGroup);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "FilterBeginDate", FilterBeginDate);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||
UpdateDevicesLinkedGroupOverride(callInfo, id, GroupId, FilterBeginDate, redirect);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateUsersLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, string GroupId, System.DateTime? FilterBeginDate, bool redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateUsersLinkedGroup(string id, string GroupId, System.DateTime? FilterBeginDate, bool redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateUsersLinkedGroup);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "FilterBeginDate", FilterBeginDate);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||
UpdateUsersLinkedGroupOverride(callInfo, id, GroupId, FilterBeginDate, redirect);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void ImporterThumbnailOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string SessionId, int PageNumber);
|
||||
|
||||
@@ -10182,12 +10376,24 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult SearchGroupSubjects()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SearchGroupSubjects);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult Subject()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Subject);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult SyncActiveDirectoryManagedGroup()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SyncActiveDirectoryManagedGroup);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult UpdateProxySettings()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateProxySettings);
|
||||
@@ -10220,7 +10426,9 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string UpdateActiveDirectorySearchAllForestServers = "UpdateActiveDirectorySearchAllForestServers";
|
||||
public readonly string DomainOrganisationalUnits = "DomainOrganisationalUnits";
|
||||
public readonly string SearchSubjects = "SearchSubjects";
|
||||
public readonly string SearchGroupSubjects = "SearchGroupSubjects";
|
||||
public readonly string Subject = "Subject";
|
||||
public readonly string SyncActiveDirectoryManagedGroup = "SyncActiveDirectoryManagedGroup";
|
||||
public readonly string UpdateProxySettings = "UpdateProxySettings";
|
||||
}
|
||||
|
||||
@@ -10239,7 +10447,9 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public const string UpdateActiveDirectorySearchAllForestServers = "UpdateActiveDirectorySearchAllForestServers";
|
||||
public const string DomainOrganisationalUnits = "DomainOrganisationalUnits";
|
||||
public const string SearchSubjects = "SearchSubjects";
|
||||
public const string SearchGroupSubjects = "SearchGroupSubjects";
|
||||
public const string Subject = "Subject";
|
||||
public const string SyncActiveDirectoryManagedGroup = "SyncActiveDirectoryManagedGroup";
|
||||
public const string UpdateProxySettings = "UpdateProxySettings";
|
||||
}
|
||||
|
||||
@@ -10319,6 +10529,14 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public readonly string term = "term";
|
||||
}
|
||||
static readonly ActionParamsClass_SearchGroupSubjects s_params_SearchGroupSubjects = new ActionParamsClass_SearchGroupSubjects();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_SearchGroupSubjects SearchGroupSubjectsParams { get { return s_params_SearchGroupSubjects; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_SearchGroupSubjects
|
||||
{
|
||||
public readonly string term = "term";
|
||||
}
|
||||
static readonly ActionParamsClass_Subject s_params_Subject = new ActionParamsClass_Subject();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_Subject SubjectParams { get { return s_params_Subject; } }
|
||||
@@ -10327,6 +10545,15 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public readonly string Id = "Id";
|
||||
}
|
||||
static readonly ActionParamsClass_SyncActiveDirectoryManagedGroup s_params_SyncActiveDirectoryManagedGroup = new ActionParamsClass_SyncActiveDirectoryManagedGroup();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_SyncActiveDirectoryManagedGroup SyncActiveDirectoryManagedGroupParams { get { return s_params_SyncActiveDirectoryManagedGroup; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_SyncActiveDirectoryManagedGroup
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string redirectUrl = "redirectUrl";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateProxySettings s_params_UpdateProxySettings = new ActionParamsClass_UpdateProxySettings();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_UpdateProxySettings UpdateProxySettingsParams { get { return s_params_UpdateProxySettings; } }
|
||||
@@ -10520,6 +10747,18 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void SearchGroupSubjectsOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string term);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult SearchGroupSubjects(string term)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SearchGroupSubjects);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "term", term);
|
||||
SearchGroupSubjectsOverride(callInfo, term);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void SubjectOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string Id);
|
||||
|
||||
@@ -10532,6 +10771,19 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void SyncActiveDirectoryManagedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, string redirectUrl);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult SyncActiveDirectoryManagedGroup(string id, string redirectUrl)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SyncActiveDirectoryManagedGroup);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirectUrl", redirectUrl);
|
||||
SyncActiveDirectoryManagedGroupOverride(callInfo, id, redirectUrl);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateProxySettingsOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string ProxyAddress, int? ProxyPort, string ProxyUsername, string ProxyPassword, bool redirect);
|
||||
|
||||
@@ -11121,6 +11373,18 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult UpdateAssignedUsersLinkedGroup()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUsersLinkedGroup);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult UpdateAssignedUserDevicesLinkedGroup()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUserDevicesLinkedGroup);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult Delete()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Delete);
|
||||
@@ -11159,6 +11423,8 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string UpdateIcon = "UpdateIcon";
|
||||
public readonly string UpdateIconColour = "UpdateIconColour";
|
||||
public readonly string UpdateIconAndColour = "UpdateIconAndColour";
|
||||
public readonly string UpdateAssignedUsersLinkedGroup = "UpdateAssignedUsersLinkedGroup";
|
||||
public readonly string UpdateAssignedUserDevicesLinkedGroup = "UpdateAssignedUserDevicesLinkedGroup";
|
||||
public readonly string Delete = "Delete";
|
||||
public readonly string BulkAssignUsers = "BulkAssignUsers";
|
||||
public readonly string AssignedUsers = "AssignedUsers";
|
||||
@@ -11173,6 +11439,8 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public const string UpdateIcon = "UpdateIcon";
|
||||
public const string UpdateIconColour = "UpdateIconColour";
|
||||
public const string UpdateIconAndColour = "UpdateIconAndColour";
|
||||
public const string UpdateAssignedUsersLinkedGroup = "UpdateAssignedUsersLinkedGroup";
|
||||
public const string UpdateAssignedUserDevicesLinkedGroup = "UpdateAssignedUserDevicesLinkedGroup";
|
||||
public const string Delete = "Delete";
|
||||
public const string BulkAssignUsers = "BulkAssignUsers";
|
||||
public const string AssignedUsers = "AssignedUsers";
|
||||
@@ -11241,6 +11509,26 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string IconColour = "IconColour";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateAssignedUsersLinkedGroup s_params_UpdateAssignedUsersLinkedGroup = new ActionParamsClass_UpdateAssignedUsersLinkedGroup();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_UpdateAssignedUsersLinkedGroup UpdateAssignedUsersLinkedGroupParams { get { return s_params_UpdateAssignedUsersLinkedGroup; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_UpdateAssignedUsersLinkedGroup
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string GroupId = "GroupId";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateAssignedUserDevicesLinkedGroup s_params_UpdateAssignedUserDevicesLinkedGroup = new ActionParamsClass_UpdateAssignedUserDevicesLinkedGroup();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_UpdateAssignedUserDevicesLinkedGroup UpdateAssignedUserDevicesLinkedGroupParams { get { return s_params_UpdateAssignedUserDevicesLinkedGroup; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_UpdateAssignedUserDevicesLinkedGroup
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string GroupId = "GroupId";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_Delete s_params_Delete = new ActionParamsClass_Delete();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_Delete DeleteParams { get { return s_params_Delete; } }
|
||||
@@ -11374,6 +11662,34 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateAssignedUsersLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, bool redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId, bool redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUsersLinkedGroup);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||
UpdateAssignedUsersLinkedGroupOverride(callInfo, id, GroupId, redirect);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateAssignedUserDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, bool redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateAssignedUserDevicesLinkedGroup(int id, string GroupId, bool redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUserDevicesLinkedGroup);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||
UpdateAssignedUserDevicesLinkedGroupOverride(callInfo, id, GroupId, redirect);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void DeleteOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, bool? redirect);
|
||||
|
||||
@@ -13450,9 +13766,13 @@ namespace T4MVC.Config
|
||||
public _ViewNamesClass ViewNames { get { return s_ViewNames; } }
|
||||
public class _ViewNamesClass
|
||||
{
|
||||
public readonly string LinkedGroupInstance = "LinkedGroupInstance";
|
||||
public readonly string LinkedGroupShared = "LinkedGroupShared";
|
||||
public readonly string LogEvents = "LogEvents";
|
||||
public readonly string TaskStatus = "TaskStatus";
|
||||
}
|
||||
public readonly string LinkedGroupInstance = "~/Areas/Config/Views/Shared/LinkedGroupInstance.cshtml";
|
||||
public readonly string LinkedGroupShared = "~/Areas/Config/Views/Shared/LinkedGroupShared.cshtml";
|
||||
public readonly string LogEvents = "~/Areas/Config/Views/Shared/LogEvents.cshtml";
|
||||
public readonly string TaskStatus = "~/Areas/Config/Views/Shared/TaskStatus.cshtml";
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@
|
||||
</table>
|
||||
@if (Model.Device.CanUpdateDeviceProfile())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Update Profile", MVC.API.Device.UpdateDeviceProfileId(Model.Device.SerialNumber, null, true), "Device_Show_Policies_Profile_Actions_Update_Button")
|
||||
@Html.ActionLinkSmallButton("Update Profile", MVC.API.Device.UpdateDeviceProfileId(Model.Device.SerialNumber, redirect: true), "Device_Show_Policies_Profile_Actions_Update_Button")
|
||||
|
||||
<div id="Device_Show_Policies_Profile_Actions_Update_Dialog" class="dialog" title="Assign to Device Profile">
|
||||
<div>
|
||||
@@ -561,11 +561,14 @@
|
||||
}
|
||||
@if (Model.Device.CanUpdateAssignment())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Update Assignment", MVC.API.Device.UpdateAssignedUserId(Model.Device.SerialNumber, null, null, true), "Device_Show_User_Actions_Assign_Button")
|
||||
<a id="Device_Show_User_Actions_Assign_Button" href="#" class="button small">Update Assignment</a>
|
||||
<div id="Device_Show_User_Actions_Assign_Dialog" class="dialog" title="Assign this Device?">
|
||||
<h4><i class="fa fa-info-circle information"></i> Assign to User:</h4>
|
||||
<br />
|
||||
<input id="Device_Show_User_Actions_Assign_UserId" type="text" />
|
||||
@using (Html.BeginForm(MVC.API.Device.UpdateAssignedUserId(Model.Device.SerialNumber, redirect: true)))
|
||||
{
|
||||
<input id="Device_Show_User_Actions_Assign_UserId" name="AssignedUserId" type="text" />
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
@@ -575,17 +578,19 @@
|
||||
|
||||
var dialogButtons = {
|
||||
@{
|
||||
if (assignedUser != null)
|
||||
{
|
||||
if (assignedUser != null)
|
||||
{
|
||||
<text>
|
||||
"Unassign": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = button.attr('href');
|
||||
|
||||
inputUserId.val('');
|
||||
inputUserId.closest('form').submit()
|
||||
},
|
||||
</text>
|
||||
}
|
||||
}
|
||||
}
|
||||
"Assign": function () {
|
||||
var $this = $(this);
|
||||
@@ -593,7 +598,7 @@
|
||||
if (userId) {
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = button.attr('href') + '&AssignedUserId=' + userId;
|
||||
inputUserId.closest('form').submit()
|
||||
} else {
|
||||
alert('Enter a user to assign this device');
|
||||
}
|
||||
|
||||
@@ -1400,14 +1400,14 @@ WriteLiteral("\r\n </td>\r\n <
|
||||
#line hidden
|
||||
|
||||
#line 353 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Update Profile", MVC.API.Device.UpdateDeviceProfileId(Model.Device.SerialNumber, null, true), "Device_Show_Policies_Profile_Actions_Update_Button"));
|
||||
Write(Html.ActionLinkSmallButton("Update Profile", MVC.API.Device.UpdateDeviceProfileId(Model.Device.SerialNumber, redirect: true), "Device_Show_Policies_Profile_Actions_Update_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 353 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1459,39 +1459,39 @@ WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" name=\"DeviceProfile\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 23090), Tuple.Create("\"", 23117)
|
||||
, Tuple.Create(Tuple.Create("", 23095), Tuple.Create("DeviceProfile_", 23095), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 23094), Tuple.Create("\"", 23121)
|
||||
, Tuple.Create(Tuple.Create("", 23099), Tuple.Create("DeviceProfile_", 23099), true)
|
||||
|
||||
#line 361 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 23109), Tuple.Create<System.Object, System.Int32>(dp.Id
|
||||
, Tuple.Create(Tuple.Create("", 23113), Tuple.Create<System.Object, System.Int32>(dp.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 23109), false)
|
||||
, 23113), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 23127), Tuple.Create("\"", 23155)
|
||||
, Tuple.Create(Tuple.Create("", 23133), Tuple.Create("DeviceProfile_", 23133), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 23131), Tuple.Create("\"", 23159)
|
||||
, Tuple.Create(Tuple.Create("", 23137), Tuple.Create("DeviceProfile_", 23137), true)
|
||||
|
||||
#line 361 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 23147), Tuple.Create<System.Object, System.Int32>(dp.Id
|
||||
, Tuple.Create(Tuple.Create("", 23151), Tuple.Create<System.Object, System.Int32>(dp.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 23147), false)
|
||||
, 23151), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 23156), Tuple.Create("\"", 23200)
|
||||
, Tuple.Create(Tuple.Create("", 23164), Tuple.Create("Distribution:", 23164), true)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 23160), Tuple.Create("\"", 23204)
|
||||
, Tuple.Create(Tuple.Create("", 23168), Tuple.Create("Distribution:", 23168), true)
|
||||
|
||||
#line 361 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 23177), Tuple.Create<System.Object, System.Int32>(dp.DistributionType
|
||||
, Tuple.Create(Tuple.Create(" ", 23181), Tuple.Create<System.Object, System.Int32>(dp.DistributionType
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 23178), false)
|
||||
, 23182), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -1687,14 +1687,14 @@ WriteLiteral(" title=\"Warranty Valid Until\"");
|
||||
WriteLiteral(">Warranty Until:</span>\r\n </td>\r\n " +
|
||||
" <td");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 28672), Tuple.Create("\"", 28820)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 28676), Tuple.Create("\"", 28824)
|
||||
|
||||
#line 447 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 28680), Tuple.Create<System.Object, System.Int32>(Model.Device.DeviceBatch.WarrantyValidUntil.HasValue && Model.Device.DeviceBatch.WarrantyValidUntil.Value < DateTime.Now ? "alert" : null
|
||||
, Tuple.Create(Tuple.Create("", 28684), Tuple.Create<System.Object, System.Int32>(Model.Device.DeviceBatch.WarrantyValidUntil.HasValue && Model.Device.DeviceBatch.WarrantyValidUntil.Value < DateTime.Now ? "alert" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 28680), false)
|
||||
, 28684), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -1729,14 +1729,14 @@ WriteLiteral(" title=\"Insured Until\"");
|
||||
WriteLiteral(">Insured Until:</span>\r\n </td>\r\n " +
|
||||
" <td");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 29522), Tuple.Create("\"", 29658)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 29526), Tuple.Create("\"", 29662)
|
||||
|
||||
#line 459 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 29530), Tuple.Create<System.Object, System.Int32>(Model.Device.DeviceBatch.InsuredUntil.HasValue && Model.Device.DeviceBatch.InsuredUntil.Value < DateTime.Now ? "alert" : null
|
||||
, Tuple.Create(Tuple.Create("", 29534), Tuple.Create<System.Object, System.Int32>(Model.Device.DeviceBatch.InsuredUntil.HasValue && Model.Device.DeviceBatch.InsuredUntil.Value < DateTime.Now ? "alert" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 29530), false)
|
||||
, 29534), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -1840,39 +1840,39 @@ WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" name=\"DeviceBatch\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 30808), Tuple.Create("\"", 30833)
|
||||
, Tuple.Create(Tuple.Create("", 30813), Tuple.Create("DeviceBatch_", 30813), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 30812), Tuple.Create("\"", 30837)
|
||||
, Tuple.Create(Tuple.Create("", 30817), Tuple.Create("DeviceBatch_", 30817), true)
|
||||
|
||||
#line 478 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 30825), Tuple.Create<System.Object, System.Int32>(db.Id
|
||||
, Tuple.Create(Tuple.Create("", 30829), Tuple.Create<System.Object, System.Int32>(db.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 30825), false)
|
||||
, 30829), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 30843), Tuple.Create("\"", 30869)
|
||||
, Tuple.Create(Tuple.Create("", 30849), Tuple.Create("DeviceBatch_", 30849), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 30847), Tuple.Create("\"", 30873)
|
||||
, Tuple.Create(Tuple.Create("", 30853), Tuple.Create("DeviceBatch_", 30853), true)
|
||||
|
||||
#line 478 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 30861), Tuple.Create<System.Object, System.Int32>(db.Id
|
||||
, Tuple.Create(Tuple.Create("", 30865), Tuple.Create<System.Object, System.Int32>(db.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 30861), false)
|
||||
, 30865), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 30870), Tuple.Create("\"", 30926)
|
||||
, Tuple.Create(Tuple.Create("", 30878), Tuple.Create("Purchased:", 30878), true)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 30874), Tuple.Create("\"", 30930)
|
||||
, Tuple.Create(Tuple.Create("", 30882), Tuple.Create("Purchased:", 30882), true)
|
||||
|
||||
#line 478 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 30888), Tuple.Create<System.Object, System.Int32>(db.PurchaseDate.ToLongDateString()
|
||||
, Tuple.Create(Tuple.Create(" ", 30892), Tuple.Create<System.Object, System.Int32>(db.PurchaseDate.ToLongDateString()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 30889), false)
|
||||
, 30893), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -2022,14 +2022,14 @@ WriteLiteral(" id=\"Device_Show_Aspects_Model_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 35821), Tuple.Create("\"", 35931)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 35825), Tuple.Create("\"", 35935)
|
||||
|
||||
#line 550 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 35827), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))
|
||||
, Tuple.Create(Tuple.Create("", 35831), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 35827), false)
|
||||
, 35831), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n <t" +
|
||||
@@ -2079,24 +2079,20 @@ WriteLiteral(" ");
|
||||
#line 562 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanUpdateAssignment())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 564 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Update Assignment", MVC.API.Device.UpdateAssignedUserId(Model.Device.SerialNumber, null, null, true), "Device_Show_User_Actions_Assign_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 564 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteLiteral(" id=\"Device_Show_User_Actions_Assign_Button\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" class=\"button small\"");
|
||||
|
||||
WriteLiteral(">Update Assignment</a>\r\n");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"Device_Show_User_Actions_Assign_Dialog\"");
|
||||
@@ -2109,14 +2105,40 @@ WriteLiteral(">\r\n <h4><i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-info-circle information\"");
|
||||
|
||||
WriteLiteral("></i> Assign to User:</h4>\r\n <br />\r\n " +
|
||||
"<input");
|
||||
WriteLiteral("></i> Assign to User:</h4>\r\n <br />\r\n");
|
||||
|
||||
|
||||
#line 568 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 568 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Device.UpdateAssignedUserId(Model.Device.SerialNumber, redirect: true)))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <input");
|
||||
|
||||
WriteLiteral(" id=\"Device_Show_User_Actions_Assign_UserId\"");
|
||||
|
||||
WriteLiteral(" name=\"AssignedUserId\"");
|
||||
|
||||
WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" />\r\n </div>\r\n");
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
|
||||
#line 571 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
@@ -2132,16 +2154,16 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 577 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 580 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 577 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 580 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
if (assignedUser != null)
|
||||
{
|
||||
if (assignedUser != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -2153,15 +2175,17 @@ WriteLiteral(@"
|
||||
var $this = $(this);
|
||||
$this.dialog(""disable"");
|
||||
$this.dialog(""option"", ""buttons"", null);
|
||||
window.location.href = button.attr('href');
|
||||
|
||||
inputUserId.val('');
|
||||
inputUserId.closest('form').submit()
|
||||
},
|
||||
");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 588 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
#line 593 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -2170,28 +2194,28 @@ WriteLiteral("\r\n \"Assign\": function () {\r\n
|
||||
" var $this = $(this);\r\n var userId = inputUs" +
|
||||
"erId.val();\r\n if (userId) {\r\n " +
|
||||
" $this.dialog(\"disable\");\r\n $t" +
|
||||
"his.dialog(\"option\", \"buttons\", null);\r\n wind" +
|
||||
"ow.location.href = button.attr(\'href\') + \'&AssignedUserId=\' + userId;\r\n " +
|
||||
" } else {\r\n alert(\'Ente" +
|
||||
"r a user to assign this device\');\r\n }\r\n " +
|
||||
" },\r\n Cancel: function () {\r\n " +
|
||||
" $(this).dialog(\"close\");\r\n }" +
|
||||
"\r\n }\r\n\r\n button.click(function () " +
|
||||
"{\r\n if (!buttonDialog) {\r\n " +
|
||||
" buttonDialog = $(\'#Device_Show_User_Actions_Assign_Dialog\')\r\n " +
|
||||
" .dialog({\r\n " +
|
||||
" resizable: false,\r\n " +
|
||||
" height: 180,\r\n " +
|
||||
" modal: true,\r\n " +
|
||||
"autoOpen: false,\r\n button" +
|
||||
"s: dialogButtons\r\n });\r\n " +
|
||||
" inputUserId = $(\'#Device_Show_User_Actions_Assign_Use" +
|
||||
"rId\');\r\n inputUserId.focus(function () { inputUse" +
|
||||
"rId.select() })\r\n .autocomplete({\r\n " +
|
||||
" source: \'");
|
||||
"his.dialog(\"option\", \"buttons\", null);\r\n inpu" +
|
||||
"tUserId.closest(\'form\').submit()\r\n } else {\r\n " +
|
||||
" alert(\'Enter a user to assign this device\');\r\n " +
|
||||
" }\r\n },\r\n " +
|
||||
" Cancel: function () {\r\n $(this).dial" +
|
||||
"og(\"close\");\r\n }\r\n }\r\n\r\n " +
|
||||
" button.click(function () {\r\n if (!b" +
|
||||
"uttonDialog) {\r\n buttonDialog = $(\'#Device_Show_U" +
|
||||
"ser_Actions_Assign_Dialog\')\r\n " +
|
||||
" .dialog({\r\n resizable: f" +
|
||||
"alse,\r\n height: 180,\r\n " +
|
||||
" modal: true,\r\n " +
|
||||
" autoOpen: false,\r\n " +
|
||||
" buttons: dialogButtons\r\n " +
|
||||
" });\r\n inputUserI" +
|
||||
"d = $(\'#Device_Show_User_Actions_Assign_UserId\');\r\n " +
|
||||
" inputUserId.focus(function () { inputUserId.select() })\r\n " +
|
||||
" .autocomplete({\r\n source:" +
|
||||
" \'");
|
||||
|
||||
|
||||
#line 619 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 624 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Url.Action(MVC.API.Search.UsersUpstream()));
|
||||
|
||||
|
||||
@@ -2221,7 +2245,7 @@ WriteLiteral(@"',
|
||||
");
|
||||
|
||||
|
||||
#line 640 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 645 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2230,7 +2254,7 @@ WriteLiteral(@"',
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 641 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 646 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanUpdateTrustEnrol())
|
||||
{
|
||||
|
||||
@@ -2238,14 +2262,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 643 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 648 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Trust Enrol", MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, true.ToString(), true), "Device_Show_Device_Actions_TrustEnrol_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 643 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 648 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -2281,7 +2305,7 @@ WriteLiteral("></i> \r\n This action will al
|
||||
"claiming</em> to have the Serial Number \'");
|
||||
|
||||
|
||||
#line 649 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 654 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Model.Device.SerialNumber);
|
||||
|
||||
|
||||
@@ -2332,7 +2356,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 692 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 697 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2341,7 +2365,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 693 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 698 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanUpdateUntrustEnrol())
|
||||
{
|
||||
|
||||
@@ -2349,14 +2373,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 695 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 700 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Untrust Enrol", MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, false.ToString(), true), "Device_Show_Device_Actions_UntrustEnrol_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 695 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 700 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -2418,7 +2442,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 731 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 736 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2427,7 +2451,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 732 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 737 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanDecommission())
|
||||
{
|
||||
|
||||
@@ -2435,14 +2459,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 734 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 739 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Decommission", MVC.API.Device.Decommission(), "Device_Show_Device_Actions_Decommission_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 734 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 739 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -2474,13 +2498,13 @@ WriteLiteral(" class=\"none\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 741 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 746 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 741 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 746 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
foreach (DecommissionReasons decommissionReason in Enum.GetValues(typeof(DecommissionReasons)))
|
||||
{
|
||||
|
||||
@@ -2491,34 +2515,34 @@ WriteLiteral(" <li>\r\n
|
||||
|
||||
WriteLiteral(" type=\"radio\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 47298), Tuple.Create("\"", 47376)
|
||||
, Tuple.Create(Tuple.Create("", 47303), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 47303), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 47449), Tuple.Create("\"", 47527)
|
||||
, Tuple.Create(Tuple.Create("", 47454), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 47454), true)
|
||||
|
||||
#line 744 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 47350), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
#line 749 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 47501), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 47350), false)
|
||||
, 47501), false)
|
||||
);
|
||||
|
||||
WriteLiteral("\r\n name=\"Device_Show_Device_Actions_Decomm" +
|
||||
"ission_Reason\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 47472), Tuple.Create("\"", 47506)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 47623), Tuple.Create("\"", 47657)
|
||||
|
||||
#line 745 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 47480), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
#line 750 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 47631), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 47480), false)
|
||||
, 47631), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 745 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 750 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write((decommissionReason == DecommissionReasons.EndOfLife) ? "checked=\"checked\"" : string.Empty);
|
||||
|
||||
|
||||
@@ -2526,21 +2550,21 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
WriteLiteral("/>\r\n <label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 47649), Tuple.Create("\"", 47728)
|
||||
, Tuple.Create(Tuple.Create("", 47655), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 47655), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 47800), Tuple.Create("\"", 47879)
|
||||
, Tuple.Create(Tuple.Create("", 47806), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 47806), true)
|
||||
|
||||
#line 746 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 47702), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
#line 751 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 47853), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 47702), false)
|
||||
, 47853), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 746 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 751 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(decommissionReason.ReasonMessage());
|
||||
|
||||
|
||||
@@ -2549,7 +2573,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 748 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 753 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2567,7 +2591,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
"uttonDialog = null;\r\n var deviceSerialNumber = \'");
|
||||
|
||||
|
||||
#line 756 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 761 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Model.Device.SerialNumber);
|
||||
|
||||
|
||||
@@ -2600,7 +2624,7 @@ WriteLiteral("\';\r\n\r\n button.click(function () {\r\n\
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 792 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 797 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2609,7 +2633,7 @@ WriteLiteral("\';\r\n\r\n button.click(function () {\r\n\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 793 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 798 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanRecommission())
|
||||
{
|
||||
|
||||
@@ -2617,14 +2641,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 795 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 800 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Recommission", MVC.API.Device.Recommission(Model.Device.SerialNumber, true), "Device_Show_Device_Actions_Recommission_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 795 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 800 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -2678,7 +2702,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 830 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 835 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2687,7 +2711,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 831 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 836 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanDelete())
|
||||
{
|
||||
|
||||
@@ -2695,14 +2719,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 833 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 838 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Delete Device", MVC.API.Device.Delete(Model.Device.SerialNumber, true), "Device_Show_Device_Actions_Delete_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 833 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 838 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -2762,7 +2786,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 871 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 876 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user