feature: user details are individually exported; shared export field renderer
This commit is contained in:
@@ -8,7 +8,7 @@ namespace Disco.Models.Exporting
|
|||||||
where O : IExportOptions
|
where O : IExportOptions
|
||||||
where R : IExportRecord
|
where R : IExportRecord
|
||||||
{
|
{
|
||||||
public List<string> IgnoreShortNames { get; } = new List<string>();
|
public List<string> IgnoreGroupNames { get; } = new List<string>();
|
||||||
public O Options { get; set; }
|
public O Options { get; set; }
|
||||||
|
|
||||||
public ExportMetadata(O options)
|
public ExportMetadata(O options)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using Disco.Models.Exporting;
|
using Disco.Models.Exporting;
|
||||||
using Disco.Models.Services.Exporting;
|
using Disco.Models.Services.Exporting;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Disco.Models.Services.Devices
|
namespace Disco.Models.Services.Devices
|
||||||
@@ -13,127 +14,126 @@ namespace Disco.Models.Services.Devices
|
|||||||
public int? ExportTypeTargetId { get; set; }
|
public int? ExportTypeTargetId { get; set; }
|
||||||
|
|
||||||
// Device
|
// Device
|
||||||
[Display(ShortName = "Device", Name = "Serial Number", Description = "The device serial number")]
|
[Display(GroupName = "Device", Name = "Serial Number", Description = "The device serial number")]
|
||||||
public bool DeviceSerialNumber { get; set; }
|
public bool DeviceSerialNumber { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Asset Number", Description = "The device asset number")]
|
[Display(GroupName = "Device", Name = "Asset Number", Description = "The device asset number")]
|
||||||
public bool DeviceAssetNumber { get; set; }
|
public bool DeviceAssetNumber { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Location", Description = "The device location")]
|
[Display(GroupName = "Device", Name = "Location", Description = "The device location")]
|
||||||
public bool DeviceLocation { get; set; }
|
public bool DeviceLocation { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Computer Name", Description = "The device computer name")]
|
[Display(GroupName = "Device", Name = "Computer Name", Description = "The device computer name")]
|
||||||
public bool DeviceComputerName { get; set; }
|
public bool DeviceComputerName { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Last Network Logon", Description = "The last recorded time the device access the network")]
|
[Display(GroupName = "Device", Name = "Last Network Logon", Description = "The last recorded time the device access the network")]
|
||||||
public bool DeviceLastNetworkLogon { get; set; }
|
public bool DeviceLastNetworkLogon { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Created Date", Description = "The date the device was created in Disco ICT")]
|
[Display(GroupName = "Device", Name = "Created Date", Description = "The date the device was created in Disco ICT")]
|
||||||
public bool DeviceCreatedDate { get; set; }
|
public bool DeviceCreatedDate { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "First Enrolled Date", Description = "The date the device was first enrolled in Disco ICT")]
|
[Display(GroupName = "Device", Name = "First Enrolled Date", Description = "The date the device was first enrolled in Disco ICT")]
|
||||||
public bool DeviceFirstEnrolledDate { get; set; }
|
public bool DeviceFirstEnrolledDate { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Last Enrolled Date", Description = "The date the device was last enrolled in Disco ICT")]
|
[Display(GroupName = "Device", Name = "Last Enrolled Date", Description = "The date the device was last enrolled in Disco ICT")]
|
||||||
public bool DeviceLastEnrolledDate { get; set; }
|
public bool DeviceLastEnrolledDate { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Enrolment Trusted", Description = "The device is trusted to complete an unauthenticated enrolment")]
|
[Display(GroupName = "Device", Name = "Enrollment Trusted", Description = "The device is trusted to complete an unauthenticated enrollment")]
|
||||||
public bool DeviceAllowUnauthenticatedEnrol { get; set; }
|
public bool DeviceAllowUnauthenticatedEnrol { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Decommissioned Date", Description = "The date the device was decommissioned in Disco ICT")]
|
[Display(GroupName = "Device", Name = "Decommissioned Date", Description = "The date the device was decommissioned in Disco ICT")]
|
||||||
public bool DeviceDecommissionedDate { get; set; }
|
public bool DeviceDecommissionedDate { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Decommissioned Reason", Description = "The reason the device was decommissioned")]
|
[Display(GroupName = "Device", Name = "Decommissioned Reason", Description = "The reason the device was decommissioned")]
|
||||||
public bool DeviceDecommissionedReason { get; set; }
|
public bool DeviceDecommissionedReason { get; set; }
|
||||||
|
|
||||||
// Model
|
// Model
|
||||||
[Display(ShortName = "Model", Name = "Identifier", Description = "The identifier of the device model associated with the device")]
|
[Display(GroupName = "Model", Name = "Identifier", Description = "The identifier of the device model associated with the device")]
|
||||||
public bool ModelId { get; set; }
|
public bool ModelId { get; set; }
|
||||||
[Display(ShortName = "Model", Name = "Description", Description = "The description of the device model associated with the device")]
|
[Display(GroupName = "Model", Name = "Description", Description = "The description of the device model associated with the device")]
|
||||||
public bool ModelDescription { get; set; }
|
public bool ModelDescription { get; set; }
|
||||||
[Display(ShortName = "Model", Name = "Manufacturer", Description = "The manufacturer of the device model associated with the device")]
|
[Display(GroupName = "Model", Name = "Manufacturer", Description = "The manufacturer of the device model associated with the device")]
|
||||||
public bool ModelManufacturer { get; set; }
|
public bool ModelManufacturer { get; set; }
|
||||||
[Display(ShortName = "Model", Name = "Model", Description = "The model of the device model associated with the device")]
|
[Display(GroupName = "Model", Name = "Model", Description = "The model of the device model associated with the device")]
|
||||||
public bool ModelModel { get; set; }
|
public bool ModelModel { get; set; }
|
||||||
[Display(ShortName = "Model", Name = "Type", Description = "The type of device model associated with the device")]
|
[Display(GroupName = "Model", Name = "Type", Description = "The type of device model associated with the device")]
|
||||||
public bool ModelType { get; set; }
|
public bool ModelType { get; set; }
|
||||||
|
|
||||||
// Batch
|
// Batch
|
||||||
[Display(ShortName = "Batch", Name = "Identifier", Description = "The identifier of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Identifier", Description = "The identifier of the device batch associated with the device")]
|
||||||
public bool BatchId { get; set; }
|
public bool BatchId { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Name", Description = "The name of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Name", Description = "The name of the device batch associated with the device")]
|
||||||
public bool BatchName { get; set; }
|
public bool BatchName { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Purchase Date", Description = "The purchase date of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Purchase Date", Description = "The purchase date of the device batch associated with the device")]
|
||||||
public bool BatchPurchaseDate { get; set; }
|
public bool BatchPurchaseDate { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Supplier", Description = "The supplier of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Supplier", Description = "The supplier of the device batch associated with the device")]
|
||||||
public bool BatchSupplier { get; set; }
|
public bool BatchSupplier { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Unit Cost", Description = "The unit cost of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Unit Cost", Description = "The unit cost of the device batch associated with the device")]
|
||||||
public bool BatchUnitCost { get; set; }
|
public bool BatchUnitCost { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Warranty Valid Until Date", Description = "The warranty valid until date of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Warranty Valid Until Date", Description = "The warranty valid until date of the device batch associated with the device")]
|
||||||
public bool BatchWarrantyValidUntilDate { get; set; }
|
public bool BatchWarrantyValidUntilDate { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Insured Date", Description = "The insured date of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Insured Date", Description = "The insured date of the device batch associated with the device")]
|
||||||
public bool BatchInsuredDate { get; set; }
|
public bool BatchInsuredDate { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Insurance Supplier", Description = "The insurance supplier of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Insurance Supplier", Description = "The insurance supplier of the device batch associated with the device")]
|
||||||
public bool BatchInsuranceSupplier { get; set; }
|
public bool BatchInsuranceSupplier { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Insured Until Date", Description = "The insured until date of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Insured Until Date", Description = "The insured until date of the device batch associated with the device")]
|
||||||
public bool BatchInsuredUntilDate { get; set; }
|
public bool BatchInsuredUntilDate { get; set; }
|
||||||
|
|
||||||
// Profile
|
// Profile
|
||||||
[Display(ShortName = "Profile", Name = "Identifier", Description = "The identifier of the device profile associated with the device")]
|
[Display(GroupName = "Profile", Name = "Identifier", Description = "The identifier of the device profile associated with the device")]
|
||||||
public bool ProfileId { get; set; }
|
public bool ProfileId { get; set; }
|
||||||
[Display(ShortName = "Profile", Name = "Name", Description = "The name of the device profile associated with the device")]
|
[Display(GroupName = "Profile", Name = "Name", Description = "The name of the device profile associated with the device")]
|
||||||
public bool ProfileName { get; set; }
|
public bool ProfileName { get; set; }
|
||||||
[Display(ShortName = "Profile", Name = "Short Name", Description = "The short name of the device profile associated with the device")]
|
[Display(GroupName = "Profile", Name = "Short Name", Description = "The short name of the device profile associated with the device")]
|
||||||
public bool ProfileShortName { get; set; }
|
public bool ProfileShortName { get; set; }
|
||||||
|
|
||||||
// User
|
// User
|
||||||
[Display(ShortName = "Assigned User", Name = "Identifier", Description = "The identifier of the user assigned to the device")]
|
[Display(GroupName = "Assigned User", Name = "Identifier", Description = "The identifier of the user assigned to the device")]
|
||||||
public bool AssignedUserId { get; set; }
|
public bool AssignedUserId { get; set; }
|
||||||
[Display(ShortName = "Assigned User", Name = "Assigned Date", Description = "The date the device was assigned to the user")]
|
[Display(GroupName = "Assigned User", Name = "Assigned Date", Description = "The date the device was assigned to the user")]
|
||||||
public bool AssignedUserDate { get; set; }
|
public bool AssignedUserDate { get; set; }
|
||||||
[Display(ShortName = "Assigned User", Name = "Display Name", Description = "The display name of the user assigned to the device")]
|
[Display(GroupName = "Assigned User", Name = "Display Name", Description = "The display name of the user assigned to the device")]
|
||||||
public bool AssignedUserDisplayName { get; set; }
|
public bool AssignedUserDisplayName { get; set; }
|
||||||
[Display(ShortName = "Assigned User", Name = "Surname", Description = "The surname of the user assigned to the device")]
|
[Display(GroupName = "Assigned User", Name = "Surname", Description = "The surname of the user assigned to the device")]
|
||||||
public bool AssignedUserSurname { get; set; }
|
public bool AssignedUserSurname { get; set; }
|
||||||
[Display(ShortName = "Assigned User", Name = "Given Name", Description = "The given name of the user assigned to the device")]
|
[Display(GroupName = "Assigned User", Name = "Given Name", Description = "The given name of the user assigned to the device")]
|
||||||
public bool AssignedUserGivenName { get; set; }
|
public bool AssignedUserGivenName { get; set; }
|
||||||
[Display(ShortName = "Assigned User", Name = "Phone Number", Description = "The phone number of the user assigned to the device")]
|
[Display(GroupName = "Assigned User", Name = "Phone Number", Description = "The phone number of the user assigned to the device")]
|
||||||
public bool AssignedUserPhoneNumber { get; set; }
|
public bool AssignedUserPhoneNumber { get; set; }
|
||||||
[Display(ShortName = "Assigned User", Name = "Email Address", Description = "The email address of the user assigned to the device")]
|
[Display(GroupName = "Assigned User", Name = "Email Address", Description = "The email address of the user assigned to the device")]
|
||||||
public bool AssignedUserEmailAddress { get; set; }
|
public bool AssignedUserEmailAddress { get; set; }
|
||||||
[Display(ShortName = "Assigned User", Name = "Custom Details", Description = "The custom details provided by plugins for the user assigned to the device")]
|
public List<string> UserDetailCustom { get; set; } = new List<string>();
|
||||||
public bool AssignedUserDetailCustom { get; set; }
|
|
||||||
|
|
||||||
// Jobs
|
// Jobs
|
||||||
[Display(ShortName = "Jobs", Name = "Count", Description = "The total number of jobs associated with the device")]
|
[Display(GroupName = "Jobs", Name = "Count", Description = "The total number of jobs associated with the device")]
|
||||||
public bool JobsTotalCount { get; set; }
|
public bool JobsTotalCount { get; set; }
|
||||||
[Display(ShortName = "Jobs", Name = "Count Open", Description = "The total number of open jobs associated with the device")]
|
[Display(GroupName = "Jobs", Name = "Count Open", Description = "The total number of open jobs associated with the device")]
|
||||||
public bool JobsOpenCount { get; set; }
|
public bool JobsOpenCount { get; set; }
|
||||||
|
|
||||||
// Attachments
|
// Attachments
|
||||||
[Display(ShortName = "Attachments", Name = "Count", Description = "The number of attachments associated with the device")]
|
[Display(GroupName = "Attachments", Name = "Count", Description = "The number of attachments associated with the device")]
|
||||||
public bool AttachmentsCount { get; set; }
|
public bool AttachmentsCount { get; set; }
|
||||||
|
|
||||||
// Certificates
|
// Certificates
|
||||||
[Display(ShortName = "Certificates", Name = "Certificates", Description = "The assigned active certificates associated with the device")]
|
[Display(GroupName = "Certificates", Name = "Certificates", Description = "The assigned active certificates associated with the device")]
|
||||||
public bool Certificates { get; set; }
|
public bool Certificates { get; set; }
|
||||||
|
|
||||||
// Details
|
// Details
|
||||||
[Display(ShortName = "Details", Name = "BIOS", Description = "The BIOS associated with the device")]
|
[Display(GroupName = "Details", Name = "BIOS", Description = "The BIOS associated with the device")]
|
||||||
public bool DetailBios { get; set; }
|
public bool DetailBios { get; set; }
|
||||||
[Display(ShortName = "Details", Name = "Base Board", Description = "The Base Board associated with the device")]
|
[Display(GroupName = "Details", Name = "Base Board", Description = "The Base Board associated with the device")]
|
||||||
public bool DetailBaseBoard { get; set; }
|
public bool DetailBaseBoard { get; set; }
|
||||||
[Display(ShortName = "Details", Name = "System", Description = "The System information associated with the device")]
|
[Display(GroupName = "Details", Name = "System", Description = "The System information associated with the device")]
|
||||||
public bool DetailComputerSystem { get; set; }
|
public bool DetailComputerSystem { get; set; }
|
||||||
[Display(ShortName = "Details", Name = "Processors", Description = "The CPU Processors associated with the device")]
|
[Display(GroupName = "Details", Name = "Processors", Description = "The CPU Processors associated with the device")]
|
||||||
public bool DetailProcessors { get; set; }
|
public bool DetailProcessors { get; set; }
|
||||||
[Display(ShortName = "Details", Name = "Memory", Description = "The Memory/RAM associated with the device")]
|
[Display(GroupName = "Details", Name = "Memory", Description = "The Memory/RAM associated with the device")]
|
||||||
public bool DetailMemory { get; set; }
|
public bool DetailMemory { get; set; }
|
||||||
[Display(ShortName = "Details", Name = "Disk Drives", Description = "The Disk Drives associated with the device")]
|
[Display(GroupName = "Details", Name = "Disk Drives", Description = "The Disk Drives associated with the device")]
|
||||||
public bool DetailDiskDrives { get; set; }
|
public bool DetailDiskDrives { get; set; }
|
||||||
[Display(ShortName = "Details", Name = "LAN Adapters", Description = "The LAN Adapters associated with the device")]
|
[Display(GroupName = "Details", Name = "LAN Adapters", Description = "The LAN Adapters associated with the device")]
|
||||||
public bool DetailLanAdapters { get; set; }
|
public bool DetailLanAdapters { get; set; }
|
||||||
[Display(ShortName = "Details", Name = "Wireless LAN Adapters", Description = "The Wireless LAN Adapters associated with the device")]
|
[Display(GroupName = "Details", Name = "Wireless LAN Adapters", Description = "The Wireless LAN Adapters associated with the device")]
|
||||||
public bool DetailWLanAdapters { get; set; }
|
public bool DetailWLanAdapters { get; set; }
|
||||||
[Display(ShortName = "Details", Name = "MDM Hardware Data", Description = "The Mobile Device Management Hardware Data associated with the device")]
|
[Display(GroupName = "Details", Name = "MDM Hardware Data", Description = "The Mobile Device Management Hardware Data associated with the device")]
|
||||||
public bool DetailMdmHardwareData { get; set; }
|
public bool DetailMdmHardwareData { get; set; }
|
||||||
[Display(ShortName = "Details", Name = "AC Adapter", Description = "The AC Adapter associated with the device")]
|
[Display(GroupName = "Details", Name = "AC Adapter", Description = "The AC Adapter associated with the device")]
|
||||||
public bool DetailACAdapter { get; set; }
|
public bool DetailACAdapter { get; set; }
|
||||||
[Display(ShortName = "Details", Name = "Battery", Description = "The manually entered battery associated with the device")]
|
[Display(GroupName = "Details", Name = "Battery", Description = "The manually entered battery associated with the device")]
|
||||||
public bool DetailBatteries { get; set; }
|
public bool DetailBatteries { get; set; }
|
||||||
[Display(ShortName = "Details", Name = "Batteries", Description = "The reported batteries associated with the device")]
|
[Display(GroupName = "Details", Name = "Batteries", Description = "The reported batteries associated with the device")]
|
||||||
public bool DetailBattery { get; set; }
|
public bool DetailBattery { get; set; }
|
||||||
[Display(ShortName = "Details", Name = "Keyboard", Description = "The Keyboard associated with the device")]
|
[Display(GroupName = "Details", Name = "Keyboard", Description = "The Keyboard associated with the device")]
|
||||||
public bool DetailKeyboard { get; set; }
|
public bool DetailKeyboard { get; set; }
|
||||||
|
|
||||||
public static DeviceExportOptions DefaultOptions()
|
public static DeviceExportOptions DefaultOptions()
|
||||||
|
|||||||
@@ -17,51 +17,51 @@ namespace Disco.Models.Services.Devices.DeviceFlag
|
|||||||
public bool CurrentOnly { get; set; }
|
public bool CurrentOnly { get; set; }
|
||||||
|
|
||||||
// Device Flag
|
// Device Flag
|
||||||
[Display(ShortName = "Device Flag", Name = "Identifier", Description = "The identifier of the device flag")]
|
[Display(GroupName = "Device Flag", Name = "Identifier", Description = "The identifier of the device flag")]
|
||||||
public bool Id { get; set; }
|
public bool Id { get; set; }
|
||||||
[Display(ShortName = "Device Flag", Name = "Name", Description = "The name of the device flag")]
|
[Display(GroupName = "Device Flag", Name = "Name", Description = "The name of the device flag")]
|
||||||
public bool Name { get; set; }
|
public bool Name { get; set; }
|
||||||
[Display(ShortName = "Device Flag", Name = "Description", Description = "The description of the device flag")]
|
[Display(GroupName = "Device Flag", Name = "Description", Description = "The description of the device flag")]
|
||||||
public bool Description { get; set; }
|
public bool Description { get; set; }
|
||||||
[Display(ShortName = "Device Flag", Name = "Icon", Description = "The icon assigned to the device flag")]
|
[Display(GroupName = "Device Flag", Name = "Icon", Description = "The icon assigned to the device flag")]
|
||||||
public bool Icon { get; set; }
|
public bool Icon { get; set; }
|
||||||
[Display(ShortName = "Device Flag", Name = "Icon Colour", Description = "The icon colour assigned to the device flag")]
|
[Display(GroupName = "Device Flag", Name = "Icon Colour", Description = "The icon colour assigned to the device flag")]
|
||||||
public bool IconColour { get; set; }
|
public bool IconColour { get; set; }
|
||||||
[Display(ShortName = "Device Flag", Name = "Assignment Identifier", Description = "The identifier of the device flag assignment")]
|
[Display(GroupName = "Device Flag", Name = "Assignment Identifier", Description = "The identifier of the device flag assignment")]
|
||||||
public bool AssignmentId { get; set; }
|
public bool AssignmentId { get; set; }
|
||||||
[Display(ShortName = "Device Flag", Name = "Added Date", Description = "The date the device flag was assigned to the user")]
|
[Display(GroupName = "Device Flag", Name = "Added Date", Description = "The date the device flag was assigned to the user")]
|
||||||
public bool AddedDate { get; set; }
|
public bool AddedDate { get; set; }
|
||||||
[Display(ShortName = "Device Flag", Name = "Added User Identifier", Description = "The identifier of the user who assigned the device flag")]
|
[Display(GroupName = "Device Flag", Name = "Added User Identifier", Description = "The identifier of the user who assigned the device flag")]
|
||||||
public bool AddedUserId { get; set; }
|
public bool AddedUserId { get; set; }
|
||||||
[Display(ShortName = "Device Flag", Name = "Removed Date", Description = "The date the device flag was unassigned from the user")]
|
[Display(GroupName = "Device Flag", Name = "Removed Date", Description = "The date the device flag was unassigned from the user")]
|
||||||
public bool RemovedDate { get; set; }
|
public bool RemovedDate { get; set; }
|
||||||
[Display(ShortName = "Device Flag", Name = "Removed User Identifier", Description = "The identifier of the user who unassigned the device flag")]
|
[Display(GroupName = "Device Flag", Name = "Removed User Identifier", Description = "The identifier of the user who unassigned the device flag")]
|
||||||
public bool RemovedUserId { get; set; }
|
public bool RemovedUserId { get; set; }
|
||||||
[Display(ShortName = "Device Flag", Name = "Comments", Description = "The comments associated with the device flag assignment")]
|
[Display(GroupName = "Device Flag", Name = "Comments", Description = "The comments associated with the device flag assignment")]
|
||||||
public bool Comments { get; set; }
|
public bool Comments { get; set; }
|
||||||
|
|
||||||
// Device
|
// Device
|
||||||
[Display(ShortName = "Device", Name = "Serial Number", Description = "The device serial number")]
|
[Display(GroupName = "Device", Name = "Serial Number", Description = "The device serial number")]
|
||||||
public bool DeviceSerialNumber { get; set; }
|
public bool DeviceSerialNumber { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Asset Number", Description = "The device asset number")]
|
[Display(GroupName = "Device", Name = "Asset Number", Description = "The device asset number")]
|
||||||
public bool DeviceAssetNumber { get; set; }
|
public bool DeviceAssetNumber { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Location", Description = "The device location")]
|
[Display(GroupName = "Device", Name = "Location", Description = "The device location")]
|
||||||
public bool DeviceLocation { get; set; }
|
public bool DeviceLocation { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Computer Name", Description = "The device computer name")]
|
[Display(GroupName = "Device", Name = "Computer Name", Description = "The device computer name")]
|
||||||
public bool DeviceComputerName { get; set; }
|
public bool DeviceComputerName { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Last Network Logon", Description = "The last recorded time the device access the network")]
|
[Display(GroupName = "Device", Name = "Last Network Logon", Description = "The last recorded time the device access the network")]
|
||||||
public bool DeviceLastNetworkLogon { get; set; }
|
public bool DeviceLastNetworkLogon { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Created Date", Description = "The date the device was created in Disco ICT")]
|
[Display(GroupName = "Device", Name = "Created Date", Description = "The date the device was created in Disco ICT")]
|
||||||
public bool DeviceCreatedDate { get; set; }
|
public bool DeviceCreatedDate { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "First Enrolled Date", Description = "The date the device was first enrolled in Disco ICT")]
|
[Display(GroupName = "Device", Name = "First Enrolled Date", Description = "The date the device was first enrolled in Disco ICT")]
|
||||||
public bool DeviceFirstEnrolledDate { get; set; }
|
public bool DeviceFirstEnrolledDate { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Last Enrolled Date", Description = "The date the device was last enrolled in Disco ICT")]
|
[Display(GroupName = "Device", Name = "Last Enrolled Date", Description = "The date the device was last enrolled in Disco ICT")]
|
||||||
public bool DeviceLastEnrolledDate { get; set; }
|
public bool DeviceLastEnrolledDate { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Enrolment Trusted", Description = "The device is trusted to complete an unauthenticated enrolment")]
|
[Display(GroupName = "Device", Name = "Enrolment Trusted", Description = "The device is trusted to complete an unauthenticated enrolment")]
|
||||||
public bool DeviceAllowUnauthenticatedEnrol { get; set; }
|
public bool DeviceAllowUnauthenticatedEnrol { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Decommissioned Date", Description = "The date the device was decommissioned in Disco ICT")]
|
[Display(GroupName = "Device", Name = "Decommissioned Date", Description = "The date the device was decommissioned in Disco ICT")]
|
||||||
public bool DeviceDecommissionedDate { get; set; }
|
public bool DeviceDecommissionedDate { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Decommissioned Reason", Description = "The reason the device was decommissioned")]
|
[Display(GroupName = "Device", Name = "Decommissioned Reason", Description = "The reason the device was decommissioned")]
|
||||||
public bool DeviceDecommissionedReason { get; set; }
|
public bool DeviceDecommissionedReason { get; set; }
|
||||||
|
|
||||||
public bool HasDeviceOptions()
|
public bool HasDeviceOptions()
|
||||||
@@ -80,15 +80,15 @@ namespace Disco.Models.Services.Devices.DeviceFlag
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Model
|
// Model
|
||||||
[Display(ShortName = "Model", Name = "Identifier", Description = "The identifier of the device model associated with the device")]
|
[Display(GroupName = "Model", Name = "Identifier", Description = "The identifier of the device model associated with the device")]
|
||||||
public bool ModelId { get; set; }
|
public bool ModelId { get; set; }
|
||||||
[Display(ShortName = "Model", Name = "Description", Description = "The description of the device model associated with the device")]
|
[Display(GroupName = "Model", Name = "Description", Description = "The description of the device model associated with the device")]
|
||||||
public bool ModelDescription { get; set; }
|
public bool ModelDescription { get; set; }
|
||||||
[Display(ShortName = "Model", Name = "Manufacturer", Description = "The manufacturer of the device model associated with the device")]
|
[Display(GroupName = "Model", Name = "Manufacturer", Description = "The manufacturer of the device model associated with the device")]
|
||||||
public bool ModelManufacturer { get; set; }
|
public bool ModelManufacturer { get; set; }
|
||||||
[Display(ShortName = "Model", Name = "Model", Description = "The model of the device model associated with the device")]
|
[Display(GroupName = "Model", Name = "Model", Description = "The model of the device model associated with the device")]
|
||||||
public bool ModelModel { get; set; }
|
public bool ModelModel { get; set; }
|
||||||
[Display(ShortName = "Model", Name = "Type", Description = "The type of device model associated with the device")]
|
[Display(GroupName = "Model", Name = "Type", Description = "The type of device model associated with the device")]
|
||||||
public bool ModelType { get; set; }
|
public bool ModelType { get; set; }
|
||||||
public bool HasDeviceModelOptions()
|
public bool HasDeviceModelOptions()
|
||||||
{
|
{
|
||||||
@@ -100,23 +100,23 @@ namespace Disco.Models.Services.Devices.DeviceFlag
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Batch
|
// Batch
|
||||||
[Display(ShortName = "Batch", Name = "Identifier", Description = "The identifier of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Identifier", Description = "The identifier of the device batch associated with the device")]
|
||||||
public bool BatchId { get; set; }
|
public bool BatchId { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Name", Description = "The name of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Name", Description = "The name of the device batch associated with the device")]
|
||||||
public bool BatchName { get; set; }
|
public bool BatchName { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Purchase Date", Description = "The purchase date of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Purchase Date", Description = "The purchase date of the device batch associated with the device")]
|
||||||
public bool BatchPurchaseDate { get; set; }
|
public bool BatchPurchaseDate { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Supplier", Description = "The supplier of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Supplier", Description = "The supplier of the device batch associated with the device")]
|
||||||
public bool BatchSupplier { get; set; }
|
public bool BatchSupplier { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Unit Cost", Description = "The unit cost of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Unit Cost", Description = "The unit cost of the device batch associated with the device")]
|
||||||
public bool BatchUnitCost { get; set; }
|
public bool BatchUnitCost { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Warranty Valid Until Date", Description = "The warranty valid until date of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Warranty Valid Until Date", Description = "The warranty valid until date of the device batch associated with the device")]
|
||||||
public bool BatchWarrantyValidUntilDate { get; set; }
|
public bool BatchWarrantyValidUntilDate { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Insured Date", Description = "The insured date of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Insured Date", Description = "The insured date of the device batch associated with the device")]
|
||||||
public bool BatchInsuredDate { get; set; }
|
public bool BatchInsuredDate { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Insurance Supplier", Description = "The insurance supplier of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Insurance Supplier", Description = "The insurance supplier of the device batch associated with the device")]
|
||||||
public bool BatchInsuranceSupplier { get; set; }
|
public bool BatchInsuranceSupplier { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Insured Until Date", Description = "The insured until date of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Insured Until Date", Description = "The insured until date of the device batch associated with the device")]
|
||||||
public bool BatchInsuredUntilDate { get; set; }
|
public bool BatchInsuredUntilDate { get; set; }
|
||||||
public bool HasDeviceBatchOptions()
|
public bool HasDeviceBatchOptions()
|
||||||
{
|
{
|
||||||
@@ -132,11 +132,11 @@ namespace Disco.Models.Services.Devices.DeviceFlag
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Profile
|
// Profile
|
||||||
[Display(ShortName = "Profile", Name = "Identifier", Description = "The identifier of the device profile associated with the device")]
|
[Display(GroupName = "Profile", Name = "Identifier", Description = "The identifier of the device profile associated with the device")]
|
||||||
public bool ProfileId { get; set; }
|
public bool ProfileId { get; set; }
|
||||||
[Display(ShortName = "Profile", Name = "Name", Description = "The name of the device profile associated with the device")]
|
[Display(GroupName = "Profile", Name = "Name", Description = "The name of the device profile associated with the device")]
|
||||||
public bool ProfileName { get; set; }
|
public bool ProfileName { get; set; }
|
||||||
[Display(ShortName = "Profile", Name = "Short Name", Description = "The short name of the device profile associated with the device")]
|
[Display(GroupName = "Profile", Name = "Short Name", Description = "The short name of the device profile associated with the device")]
|
||||||
public bool ProfileShortName { get; set; }
|
public bool ProfileShortName { get; set; }
|
||||||
public bool HasDeviceProfileOptions()
|
public bool HasDeviceProfileOptions()
|
||||||
{
|
{
|
||||||
@@ -146,20 +146,19 @@ namespace Disco.Models.Services.Devices.DeviceFlag
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Assigned User
|
// Assigned User
|
||||||
[Display(ShortName = "Assigned User", Name = "Identifier", Description = "The identifier of the user assigned to the device flag")]
|
[Display(GroupName = "Assigned User", Name = "Identifier", Description = "The identifier of the user assigned to the device flag")]
|
||||||
public bool AssignedUserId { get; set; }
|
public bool AssignedUserId { get; set; }
|
||||||
[Display(ShortName = "Assigned User", Name = "Display Name", Description = "The display name of the user assigned to the device flag")]
|
[Display(GroupName = "Assigned User", Name = "Display Name", Description = "The display name of the user assigned to the device flag")]
|
||||||
public bool AssignedUserDisplayName { get; set; }
|
public bool AssignedUserDisplayName { get; set; }
|
||||||
[Display(ShortName = "Assigned User", Name = "Surname", Description = "The surname of the user assigned to the device flag")]
|
[Display(GroupName = "Assigned User", Name = "Surname", Description = "The surname of the user assigned to the device flag")]
|
||||||
public bool AssignedUserSurname { get; set; }
|
public bool AssignedUserSurname { get; set; }
|
||||||
[Display(ShortName = "Assigned User", Name = "Given Name", Description = "The given name of the user assigned to the device flag")]
|
[Display(GroupName = "Assigned User", Name = "Given Name", Description = "The given name of the user assigned to the device flag")]
|
||||||
public bool AssignedUserGivenName { get; set; }
|
public bool AssignedUserGivenName { get; set; }
|
||||||
[Display(ShortName = "Assigned User", Name = "Phone Number", Description = "The phone number of the user assigned to the device flag")]
|
[Display(GroupName = "Assigned User", Name = "Phone Number", Description = "The phone number of the user assigned to the device flag")]
|
||||||
public bool AssignedUserPhoneNumber { get; set; }
|
public bool AssignedUserPhoneNumber { get; set; }
|
||||||
[Display(ShortName = "Assigned User", Name = "Email Address", Description = "The email address of the user assigned to the device flag")]
|
[Display(GroupName = "Assigned User", Name = "Email Address", Description = "The email address of the user assigned to the device flag")]
|
||||||
public bool AssignedUserEmailAddress { get; set; }
|
public bool AssignedUserEmailAddress { get; set; }
|
||||||
[Display(ShortName = "Assigned User", Name = "Custom Details", Description = "The custom details provided by plugins for the user assigned to the device flag")]
|
public List<string> UserDetailCustom { get; set; } = new List<string>();
|
||||||
public bool AssignedUserDetailCustom { get; set; }
|
|
||||||
public bool HasAssignedUserOptions()
|
public bool HasAssignedUserOptions()
|
||||||
{
|
{
|
||||||
return AssignedUserId ||
|
return AssignedUserId ||
|
||||||
|
|||||||
@@ -14,53 +14,52 @@ namespace Disco.Models.Services.Documents
|
|||||||
[Required]
|
[Required]
|
||||||
public List<string> DocumentTemplateIds { get; set; } = new List<string>();
|
public List<string> DocumentTemplateIds { get; set; } = new List<string>();
|
||||||
|
|
||||||
[Display(Name = "Latest Instance Only")]
|
|
||||||
public bool LatestOnly { get; set; }
|
public bool LatestOnly { get; set; }
|
||||||
|
|
||||||
// Document Template
|
// Document Template
|
||||||
[Display(ShortName = "Document Template", Name = "Identifier", Description = "The identifier of the document template")]
|
[Display(GroupName = "Document Template", Name = "Identifier", Description = "The identifier of the document template")]
|
||||||
public bool Id { get; set; }
|
public bool Id { get; set; }
|
||||||
[Display(ShortName = "Document Template", Name = "Description", Description = "The description of the document template")]
|
[Display(GroupName = "Document Template", Name = "Description", Description = "The description of the document template")]
|
||||||
public bool Description { get; set; }
|
public bool Description { get; set; }
|
||||||
[Display(ShortName = "Document Template", Name = "Scope", Description = "The scope of the document template")]
|
[Display(GroupName = "Document Template", Name = "Scope", Description = "The scope of the document template")]
|
||||||
public bool Scope { get; set; }
|
public bool Scope { get; set; }
|
||||||
|
|
||||||
// Attachment
|
// Attachment
|
||||||
[Display(ShortName = "Attachment", Name = "Identifier", Description = "The identifier of the document instance")]
|
[Display(GroupName = "Attachment", Name = "Identifier", Description = "The identifier of the document instance")]
|
||||||
public bool AttachmentId { get; set; }
|
public bool AttachmentId { get; set; }
|
||||||
[Display(ShortName = "Attachment", Name = "Created Date", Description = "The date the document instance was created")]
|
[Display(GroupName = "Attachment", Name = "Created Date", Description = "The date the document instance was created")]
|
||||||
public bool AttachmentCreatedDate { get; set; }
|
public bool AttachmentCreatedDate { get; set; }
|
||||||
[Display(ShortName = "Attachment", Name = "Created User", Description = "The user who created the document instance")]
|
[Display(GroupName = "Attachment", Name = "Created User", Description = "The user who created the document instance")]
|
||||||
public bool AttachmentCreatedUser { get; set; }
|
public bool AttachmentCreatedUser { get; set; }
|
||||||
[Display(ShortName = "Attachment", Name = "Filename", Description = "The filename of the document instance")]
|
[Display(GroupName = "Attachment", Name = "Filename", Description = "The filename of the document instance")]
|
||||||
public bool AttachmentFilename { get; set; }
|
public bool AttachmentFilename { get; set; }
|
||||||
[Display(ShortName = "Attachment", Name = "Mime Type", Description = "The mime type of the document instance")]
|
[Display(GroupName = "Attachment", Name = "Mime Type", Description = "The mime type of the document instance")]
|
||||||
public bool AttachmentMimeType { get; set; }
|
public bool AttachmentMimeType { get; set; }
|
||||||
[Display(ShortName = "Attachment", Name = "Comments", Description = "The comments of the document instance")]
|
[Display(GroupName = "Attachment", Name = "Comments", Description = "The comments of the document instance")]
|
||||||
public bool AttachmentComments { get; set; }
|
public bool AttachmentComments { get; set; }
|
||||||
|
|
||||||
// Device
|
// Device
|
||||||
[Display(ShortName = "Device", Name = "Serial Number", Description = "The serial number of the device associated with the document instance")]
|
[Display(GroupName = "Device", Name = "Serial Number", Description = "The serial number of the device associated with the document instance")]
|
||||||
public bool DeviceSerialNumber { get; set; }
|
public bool DeviceSerialNumber { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Asset Number", Description = "The asset number of the device associated with the document instance")]
|
[Display(GroupName = "Device", Name = "Asset Number", Description = "The asset number of the device associated with the document instance")]
|
||||||
public bool DeviceAssetNumber { get; set; }
|
public bool DeviceAssetNumber { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Location", Description = "The location of the device associated with the document instance")]
|
[Display(GroupName = "Device", Name = "Location", Description = "The location of the device associated with the document instance")]
|
||||||
public bool DeviceLocation { get; set; }
|
public bool DeviceLocation { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Computer Name", Description = "The computer name of the device associated with the document instance")]
|
[Display(GroupName = "Device", Name = "Computer Name", Description = "The computer name of the device associated with the document instance")]
|
||||||
public bool DeviceComputerName { get; set; }
|
public bool DeviceComputerName { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Last Network Logon", Description = "The last recorded time that the device associated with the document instance accessed the network")]
|
[Display(GroupName = "Device", Name = "Last Network Logon", Description = "The last recorded time that the device associated with the document instance accessed the network")]
|
||||||
public bool DeviceLastNetworkLogon { get; set; }
|
public bool DeviceLastNetworkLogon { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Created Date", Description = "The date that the device associated with the document instance was created in Disco ICT")]
|
[Display(GroupName = "Device", Name = "Created Date", Description = "The date that the device associated with the document instance was created in Disco ICT")]
|
||||||
public bool DeviceCreatedDate { get; set; }
|
public bool DeviceCreatedDate { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "First Enrolled Date", Description = "The date that the device associated with the document instance was first enrolled in Disco ICT")]
|
[Display(GroupName = "Device", Name = "First Enrolled Date", Description = "The date that the device associated with the document instance was first enrolled in Disco ICT")]
|
||||||
public bool DeviceFirstEnrolledDate { get; set; }
|
public bool DeviceFirstEnrolledDate { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Last Enrolled Date", Description = "The date that the device associated with the document instance was last enrolled in Disco ICT")]
|
[Display(GroupName = "Device", Name = "Last Enrolled Date", Description = "The date that the device associated with the document instance was last enrolled in Disco ICT")]
|
||||||
public bool DeviceLastEnrolledDate { get; set; }
|
public bool DeviceLastEnrolledDate { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Enrolment Trusted", Description = "Whether the device associated with the document instance is trusted to complete an unauthenticated enrolment")]
|
[Display(GroupName = "Device", Name = "Enrolment Trusted", Description = "Whether the device associated with the document instance is trusted to complete an unauthenticated enrolment")]
|
||||||
public bool DeviceAllowUnauthenticatedEnrol { get; set; }
|
public bool DeviceAllowUnauthenticatedEnrol { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Decommissioned Date", Description = "The date that the device associated with the document instance was decommissioned in Disco ICT")]
|
[Display(GroupName = "Device", Name = "Decommissioned Date", Description = "The date that the device associated with the document instance was decommissioned in Disco ICT")]
|
||||||
public bool DeviceDecommissionedDate { get; set; }
|
public bool DeviceDecommissionedDate { get; set; }
|
||||||
[Display(ShortName = "Device", Name = "Decommissioned Reason", Description = "The reason that the device associated with the document instance was decommissioned")]
|
[Display(GroupName = "Device", Name = "Decommissioned Reason", Description = "The reason that the device associated with the document instance was decommissioned")]
|
||||||
public bool DeviceDecommissionedReason { get; set; }
|
public bool DeviceDecommissionedReason { get; set; }
|
||||||
|
|
||||||
public bool HasDeviceOptions()
|
public bool HasDeviceOptions()
|
||||||
@@ -69,91 +68,91 @@ namespace Disco.Models.Services.Documents
|
|||||||
DeviceAllowUnauthenticatedEnrol || DeviceDecommissionedDate || DeviceDecommissionedReason;
|
DeviceAllowUnauthenticatedEnrol || DeviceDecommissionedDate || DeviceDecommissionedReason;
|
||||||
|
|
||||||
// Model
|
// Model
|
||||||
[Display(ShortName = "Model", Name = "Identifier", Description = "The identifier of the device model associated with the device")]
|
[Display(GroupName = "Model", Name = "Identifier", Description = "The identifier of the device model associated with the device")]
|
||||||
public bool ModelId { get; set; }
|
public bool ModelId { get; set; }
|
||||||
[Display(ShortName = "Model", Name = "Description", Description = "The description of the device model associated with the device")]
|
[Display(GroupName = "Model", Name = "Description", Description = "The description of the device model associated with the device")]
|
||||||
public bool ModelDescription { get; set; }
|
public bool ModelDescription { get; set; }
|
||||||
[Display(ShortName = "Model", Name = "Manufacturer", Description = "The manufacturer of the device model associated with the device")]
|
[Display(GroupName = "Model", Name = "Manufacturer", Description = "The manufacturer of the device model associated with the device")]
|
||||||
public bool ModelManufacturer { get; set; }
|
public bool ModelManufacturer { get; set; }
|
||||||
[Display(ShortName = "Model", Name = "Model", Description = "The model of the device model associated with the device")]
|
[Display(GroupName = "Model", Name = "Model", Description = "The model of the device model associated with the device")]
|
||||||
public bool ModelModel { get; set; }
|
public bool ModelModel { get; set; }
|
||||||
[Display(ShortName = "Model", Name = "Type", Description = "The type of device model associated with the device")]
|
[Display(GroupName = "Model", Name = "Type", Description = "The type of device model associated with the device")]
|
||||||
public bool ModelType { get; set; }
|
public bool ModelType { get; set; }
|
||||||
public bool HasDeviceModelOptions()
|
public bool HasDeviceModelOptions()
|
||||||
=> ModelId || ModelDescription || ModelManufacturer || ModelModel || ModelType;
|
=> ModelId || ModelDescription || ModelManufacturer || ModelModel || ModelType;
|
||||||
|
|
||||||
// Batch
|
// Batch
|
||||||
[Display(ShortName = "Batch", Name = "Identifier", Description = "The identifier of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Identifier", Description = "The identifier of the device batch associated with the device")]
|
||||||
public bool BatchId { get; set; }
|
public bool BatchId { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Name", Description = "The name of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Name", Description = "The name of the device batch associated with the device")]
|
||||||
public bool BatchName { get; set; }
|
public bool BatchName { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Purchase Date", Description = "The purchase date of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Purchase Date", Description = "The purchase date of the device batch associated with the device")]
|
||||||
public bool BatchPurchaseDate { get; set; }
|
public bool BatchPurchaseDate { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Supplier", Description = "The supplier of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Supplier", Description = "The supplier of the device batch associated with the device")]
|
||||||
public bool BatchSupplier { get; set; }
|
public bool BatchSupplier { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Unit Cost", Description = "The unit cost of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Unit Cost", Description = "The unit cost of the device batch associated with the device")]
|
||||||
public bool BatchUnitCost { get; set; }
|
public bool BatchUnitCost { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Warranty Valid Until Date", Description = "The warranty valid until date of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Warranty Valid Until Date", Description = "The warranty valid until date of the device batch associated with the device")]
|
||||||
public bool BatchWarrantyValidUntilDate { get; set; }
|
public bool BatchWarrantyValidUntilDate { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Insured Date", Description = "The insured date of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Insured Date", Description = "The insured date of the device batch associated with the device")]
|
||||||
public bool BatchInsuredDate { get; set; }
|
public bool BatchInsuredDate { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Insurance Supplier", Description = "The insurance supplier of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Insurance Supplier", Description = "The insurance supplier of the device batch associated with the device")]
|
||||||
public bool BatchInsuranceSupplier { get; set; }
|
public bool BatchInsuranceSupplier { get; set; }
|
||||||
[Display(ShortName = "Batch", Name = "Insured Until Date", Description = "The insured until date of the device batch associated with the device")]
|
[Display(GroupName = "Batch", Name = "Insured Until Date", Description = "The insured until date of the device batch associated with the device")]
|
||||||
public bool BatchInsuredUntilDate { get; set; }
|
public bool BatchInsuredUntilDate { get; set; }
|
||||||
public bool HasDeviceBatchOptions()
|
public bool HasDeviceBatchOptions()
|
||||||
=> BatchId || BatchName || BatchPurchaseDate || BatchSupplier || BatchUnitCost ||
|
=> BatchId || BatchName || BatchPurchaseDate || BatchSupplier || BatchUnitCost ||
|
||||||
BatchWarrantyValidUntilDate || BatchInsuredDate || BatchInsuranceSupplier || BatchInsuredUntilDate;
|
BatchWarrantyValidUntilDate || BatchInsuredDate || BatchInsuranceSupplier || BatchInsuredUntilDate;
|
||||||
|
|
||||||
// Profile
|
// Profile
|
||||||
[Display(ShortName = "Profile", Name = "Identifier", Description = "The identifier of the device profile associated with the device")]
|
[Display(GroupName = "Profile", Name = "Identifier", Description = "The identifier of the device profile associated with the device")]
|
||||||
public bool ProfileId { get; set; }
|
public bool ProfileId { get; set; }
|
||||||
[Display(ShortName = "Profile", Name = "Name", Description = "The name of the device profile associated with the device")]
|
[Display(GroupName = "Profile", Name = "Name", Description = "The name of the device profile associated with the device")]
|
||||||
public bool ProfileName { get; set; }
|
public bool ProfileName { get; set; }
|
||||||
[Display(ShortName = "Profile", Name = "Short Name", Description = "The short name of the device profile associated with the device")]
|
[Display(GroupName = "Profile", Name = "Short Name", Description = "The short name of the device profile associated with the device")]
|
||||||
public bool ProfileShortName { get; set; }
|
public bool ProfileShortName { get; set; }
|
||||||
public bool HasDeviceProfileOptions()
|
public bool HasDeviceProfileOptions()
|
||||||
=> ProfileId || ProfileName || ProfileShortName;
|
=> ProfileId || ProfileName || ProfileShortName;
|
||||||
|
|
||||||
// Job
|
// Job
|
||||||
[Display(ShortName = "Job", Name = "Identifier", Description = "The identifier of the job associated with the document instance")]
|
[Display(GroupName = "Job", Name = "Identifier", Description = "The identifier of the job associated with the document instance")]
|
||||||
public bool JobId { get; set; }
|
public bool JobId { get; set; }
|
||||||
[Display(ShortName = "Job", Name = "Status", Description = "The status of the job associated with the document instance")]
|
[Display(GroupName = "Job", Name = "Status", Description = "The status of the job associated with the document instance")]
|
||||||
public bool JobStatus { get; set; }
|
public bool JobStatus { get; set; }
|
||||||
[Display(ShortName = "Job", Name = "Type", Description = "The type of the job associated with the document instance")]
|
[Display(GroupName = "Job", Name = "Type", Description = "The type of the job associated with the document instance")]
|
||||||
public bool JobType { get; set; }
|
public bool JobType { get; set; }
|
||||||
[Display(ShortName = "Job", Name = "Sub Types", Description = "The sub types of the job associated with the document instance")]
|
[Display(GroupName = "Job", Name = "Sub Types", Description = "The sub types of the job associated with the document instance")]
|
||||||
public bool JobSubTypes { get; set; }
|
public bool JobSubTypes { get; set; }
|
||||||
[Display(ShortName = "Job", Name = "Opened Date", Description = "The date the job was opened associated with the document instance")]
|
[Display(GroupName = "Job", Name = "Opened Date", Description = "The date the job was opened associated with the document instance")]
|
||||||
public bool JobOpenedDate { get; set; }
|
public bool JobOpenedDate { get; set; }
|
||||||
[Display(ShortName = "Job", Name = "Opened User", Description = "The user who opened the job associated with the document instance")]
|
[Display(GroupName = "Job", Name = "Opened User", Description = "The user who opened the job associated with the document instance")]
|
||||||
public bool JobOpenedUser { get; set; }
|
public bool JobOpenedUser { get; set; }
|
||||||
[Display(ShortName = "Job", Name = "Expected Closed Date", Description = "The expected closed date of the job associated with the document instance")]
|
[Display(GroupName = "Job", Name = "Expected Closed Date", Description = "The expected closed date of the job associated with the document instance")]
|
||||||
public bool JobExpectedClosedDate { get; set; }
|
public bool JobExpectedClosedDate { get; set; }
|
||||||
[Display(ShortName = "Job", Name = "Closed Date", Description = "The date the job was closed associated with the document instance")]
|
[Display(GroupName = "Job", Name = "Closed Date", Description = "The date the job was closed associated with the document instance")]
|
||||||
public bool JobClosedDate { get; set; }
|
public bool JobClosedDate { get; set; }
|
||||||
[Display(ShortName = "Job", Name = "Closed User", Description = "The user who closed the job associated with the document instance")]
|
[Display(GroupName = "Job", Name = "Closed User", Description = "The user who closed the job associated with the document instance")]
|
||||||
public bool JobClosedUser { get; set; }
|
public bool JobClosedUser { get; set; }
|
||||||
public bool HasJobOptions()
|
public bool HasJobOptions()
|
||||||
=> JobId || JobStatus || JobType || JobSubTypes || JobOpenedDate || JobOpenedUser ||
|
=> JobId || JobStatus || JobType || JobSubTypes || JobOpenedDate || JobOpenedUser ||
|
||||||
JobExpectedClosedDate || JobClosedDate || JobClosedUser;
|
JobExpectedClosedDate || JobClosedDate || JobClosedUser;
|
||||||
|
|
||||||
// User
|
// User
|
||||||
[Display(ShortName = "User", Name = "Identifier", Description = "The identifier of the user associated with the document instance")]
|
[Display(GroupName = "User", Name = "Identifier", Description = "The identifier of the user associated with the document instance")]
|
||||||
public bool UserId { get; set; }
|
public bool UserId { get; set; }
|
||||||
[Display(ShortName = "User", Name = "Display Name", Description = "The display name of the user associated with the document instance")]
|
[Display(GroupName = "User", Name = "Display Name", Description = "The display name of the user associated with the document instance")]
|
||||||
public bool UserDisplayName { get; set; }
|
public bool UserDisplayName { get; set; }
|
||||||
[Display(ShortName = "User", Name = "Surname", Description = "The surname of the user associated with the document instance")]
|
[Display(GroupName = "User", Name = "Surname", Description = "The surname of the user associated with the document instance")]
|
||||||
public bool UserSurname { get; set; }
|
public bool UserSurname { get; set; }
|
||||||
[Display(ShortName = "User", Name = "Given Name", Description = "The given name of the user associated with the document instance")]
|
[Display(GroupName = "User", Name = "Given Name", Description = "The given name of the user associated with the document instance")]
|
||||||
public bool UserGivenName { get; set; }
|
public bool UserGivenName { get; set; }
|
||||||
[Display(ShortName = "User", Name = "Phone Number", Description = "The phone number of the user associated with the document instance")]
|
[Display(GroupName = "User", Name = "Phone Number", Description = "The phone number of the user associated with the document instance")]
|
||||||
public bool UserPhoneNumber { get; set; }
|
public bool UserPhoneNumber { get; set; }
|
||||||
[Display(ShortName = "User", Name = "Email Address", Description = "The email address of the user associated with the document instance")]
|
[Display(GroupName = "User", Name = "Email Address", Description = "The email address of the user associated with the document instance")]
|
||||||
public bool UserEmailAddress { get; set; }
|
public bool UserEmailAddress { get; set; }
|
||||||
public List<string> UserDetailCustom { get; set; } = new List<string>();
|
public List<string> UserDetailCustom { get; set; } = new List<string>();
|
||||||
public bool HasUserOptions()
|
public bool HasUserOptions()
|
||||||
=> UserDisplayName || UserSurname || UserGivenName || UserPhoneNumber || UserEmailAddress || UserDetailCustom.Any();
|
=> UserDisplayName || UserSurname || UserGivenName || UserPhoneNumber || UserEmailAddress || (UserDetailCustom?.Any() ?? false);
|
||||||
|
|
||||||
public static DocumentExportOptions DefaultOptions()
|
public static DocumentExportOptions DefaultOptions()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string DisplayName { get; set; }
|
public string DisplayName { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public bool Checked { get; set; }
|
public bool IsDefault { get; set; }
|
||||||
public string Key { get; set; }
|
public bool IsChecked { get; set; }
|
||||||
public string Value { get; set; }
|
public string CustomKey { get; set; }
|
||||||
|
public string CustomValue { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Disco.Models.Services.Exporting;
|
using Disco.Models.Services.Exporting;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace Disco.Models.Services.Users.UserFlags
|
namespace Disco.Models.Services.Users.UserFlags
|
||||||
{
|
{
|
||||||
@@ -17,47 +18,46 @@ namespace Disco.Models.Services.Users.UserFlags
|
|||||||
public bool CurrentOnly { get; set; }
|
public bool CurrentOnly { get; set; }
|
||||||
|
|
||||||
// User Flag
|
// User Flag
|
||||||
[Display(ShortName = "User Flag", Name = "Identifier", Description = "The identifier of the user flag")]
|
[Display(GroupName = "User Flag", Name = "Identifier", Description = "The identifier of the user flag")]
|
||||||
public bool Id { get; set; }
|
public bool Id { get; set; }
|
||||||
[Display(ShortName = "User Flag", Name = "Name", Description = "The name of the user flag")]
|
[Display(GroupName = "User Flag", Name = "Name", Description = "The name of the user flag")]
|
||||||
public bool Name { get; set; }
|
public bool Name { get; set; }
|
||||||
[Display(ShortName = "User Flag", Name = "Description", Description = "The description of the user flag")]
|
[Display(GroupName = "User Flag", Name = "Description", Description = "The description of the user flag")]
|
||||||
public bool Description { get; set; }
|
public bool Description { get; set; }
|
||||||
[Display(ShortName = "User Flag", Name = "Icon", Description = "The icon assigned to the user flag")]
|
[Display(GroupName = "User Flag", Name = "Icon", Description = "The icon assigned to the user flag")]
|
||||||
public bool Icon { get; set; }
|
public bool Icon { get; set; }
|
||||||
[Display(ShortName = "User Flag", Name = "Icon Colour", Description = "The icon colour assigned to the user flag")]
|
[Display(GroupName = "User Flag", Name = "Icon Colour", Description = "The icon colour assigned to the user flag")]
|
||||||
public bool IconColour { get; set; }
|
public bool IconColour { get; set; }
|
||||||
[Display(ShortName = "User Flag", Name = "Assignment Identifier", Description = "The identifier of the user flag assignment")]
|
[Display(GroupName = "User Flag", Name = "Assignment Identifier", Description = "The identifier of the user flag assignment")]
|
||||||
public bool AssignmentId { get; set; }
|
public bool AssignmentId { get; set; }
|
||||||
[Display(ShortName = "User Flag", Name = "Added Date", Description = "The date the user flag was assigned to the user")]
|
[Display(GroupName = "User Flag", Name = "Added Date", Description = "The date the user flag was assigned to the user")]
|
||||||
public bool AddedDate { get; set; }
|
public bool AddedDate { get; set; }
|
||||||
[Display(ShortName = "User Flag", Name = "Added User Identifier", Description = "The identifier of the user who assigned the user flag")]
|
[Display(GroupName = "User Flag", Name = "Added User Identifier", Description = "The identifier of the user who assigned the user flag")]
|
||||||
public bool AddedUserId { get; set; }
|
public bool AddedUserId { get; set; }
|
||||||
[Display(ShortName = "User Flag", Name = "Removed Date", Description = "The date the user flag was unassigned from the user")]
|
[Display(GroupName = "User Flag", Name = "Removed Date", Description = "The date the user flag was unassigned from the user")]
|
||||||
public bool RemovedDate { get; set; }
|
public bool RemovedDate { get; set; }
|
||||||
[Display(ShortName = "User Flag", Name = "Removed User Identifier", Description = "The identifier of the user who unassigned the user flag")]
|
[Display(GroupName = "User Flag", Name = "Removed User Identifier", Description = "The identifier of the user who unassigned the user flag")]
|
||||||
public bool RemovedUserId { get; set; }
|
public bool RemovedUserId { get; set; }
|
||||||
[Display(ShortName = "User Flag", Name = "Comments", Description = "The comments associated with the user flag assignment")]
|
[Display(GroupName = "User Flag", Name = "Comments", Description = "The comments associated with the user flag assignment")]
|
||||||
public bool Comments { get; set; }
|
public bool Comments { get; set; }
|
||||||
|
|
||||||
|
|
||||||
// User
|
// User
|
||||||
[Display(ShortName = "User", Name = "Identifier", Description = "The identifier of the user assigned to the user flag")]
|
[Display(GroupName = "User", Name = "Identifier", Description = "The identifier of the user assigned to the user flag")]
|
||||||
public bool UserId { get; set; }
|
public bool UserId { get; set; }
|
||||||
[Display(ShortName = "User", Name = "Display Name", Description = "The display name of the user assigned to the user flag")]
|
[Display(GroupName = "User", Name = "Display Name", Description = "The display name of the user assigned to the user flag")]
|
||||||
public bool UserDisplayName { get; set; }
|
public bool UserDisplayName { get; set; }
|
||||||
[Display(ShortName = "User", Name = "Surname", Description = "The surname of the user assigned to the user flag")]
|
[Display(GroupName = "User", Name = "Surname", Description = "The surname of the user assigned to the user flag")]
|
||||||
public bool UserSurname { get; set; }
|
public bool UserSurname { get; set; }
|
||||||
[Display(ShortName = "User", Name = "Given Name", Description = "The given name of the user assigned to the user flag")]
|
[Display(GroupName = "User", Name = "Given Name", Description = "The given name of the user assigned to the user flag")]
|
||||||
public bool UserGivenName { get; set; }
|
public bool UserGivenName { get; set; }
|
||||||
[Display(ShortName = "User", Name = "Phone Number", Description = "The phone number of the user assigned to the user flag")]
|
[Display(GroupName = "User", Name = "Phone Number", Description = "The phone number of the user assigned to the user flag")]
|
||||||
public bool UserPhoneNumber { get; set; }
|
public bool UserPhoneNumber { get; set; }
|
||||||
[Display(ShortName = "User", Name = "Email Address", Description = "The email address of the user assigned to the user flag")]
|
[Display(GroupName = "User", Name = "Email Address", Description = "The email address of the user assigned to the user flag")]
|
||||||
public bool UserEmailAddress { get; set; }
|
public bool UserEmailAddress { get; set; }
|
||||||
[Display(ShortName = "User", Name = "Custom Details", Description = "The custom details provided by plugins for the user assigned to the user flag")]
|
public List<string> UserDetailCustom { get; set; } = new List<string>();
|
||||||
public bool UserDetailCustom { get; set; }
|
|
||||||
public bool HasAssignedUserDetails()
|
public bool HasAssignedUserDetails()
|
||||||
=> UserDisplayName || UserSurname || UserGivenName || UserPhoneNumber || UserEmailAddress || UserDetailCustom;
|
=> UserDisplayName || UserSurname || UserGivenName || UserPhoneNumber || UserEmailAddress || (UserDetailCustom?.Any() ?? false);
|
||||||
|
|
||||||
public static UserFlagExportOptions DefaultOptions()
|
public static UserFlagExportOptions DefaultOptions()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Disco.Models.Services.Devices.DeviceFlag;
|
using Disco.Models.Services.Devices.DeviceFlag;
|
||||||
using Disco.Models.Services.Exporting;
|
using Disco.Models.Services.Exporting;
|
||||||
using Disco.Models.UI;
|
using Disco.Models.UI;
|
||||||
|
using Disco.Models.UI.Shared;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -14,5 +15,7 @@ namespace Disco.Models.Areas.Config.UI.DeviceFlag
|
|||||||
ExportResult ExportResult { get; set; }
|
ExportResult ExportResult { get; set; }
|
||||||
|
|
||||||
List<Repository.DeviceFlag> DeviceFlags { get; set; }
|
List<Repository.DeviceFlag> DeviceFlags { get; set; }
|
||||||
|
|
||||||
|
SharedExportFieldsModel<DeviceFlagExportOptions> Fields { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
using Disco.Models.Services.Exporting;
|
using Disco.Models.Services.Devices;
|
||||||
|
using Disco.Models.Services.Exporting;
|
||||||
using Disco.Models.Services.Users.UserFlags;
|
using Disco.Models.Services.Users.UserFlags;
|
||||||
using Disco.Models.UI;
|
using Disco.Models.UI;
|
||||||
|
using Disco.Models.UI.Shared;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -14,5 +16,7 @@ namespace Disco.Models.Areas.Config.UI.UserFlag
|
|||||||
ExportResult ExportResult { get; set; }
|
ExportResult ExportResult { get; set; }
|
||||||
|
|
||||||
List<Repository.UserFlag> UserFlags { get; set; }
|
List<Repository.UserFlag> UserFlags { get; set; }
|
||||||
|
|
||||||
|
SharedExportFieldsModel<UserFlagExportOptions> Fields { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using Disco.Models.Services.Devices;
|
using Disco.Models.Services.Devices;
|
||||||
using Disco.Models.Services.Exporting;
|
using Disco.Models.Services.Exporting;
|
||||||
|
using Disco.Models.UI.Shared;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -15,5 +16,7 @@ namespace Disco.Models.UI.Device
|
|||||||
IEnumerable<KeyValuePair<int, string>> DeviceBatches { get; set; }
|
IEnumerable<KeyValuePair<int, string>> DeviceBatches { get; set; }
|
||||||
IEnumerable<KeyValuePair<int, string>> DeviceModels { get; set; }
|
IEnumerable<KeyValuePair<int, string>> DeviceModels { get; set; }
|
||||||
IEnumerable<KeyValuePair<int, string>> DeviceProfiles { get; set; }
|
IEnumerable<KeyValuePair<int, string>> DeviceProfiles { get; set; }
|
||||||
|
|
||||||
|
SharedExportFieldsModel<DeviceExportOptions> Fields { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
using Disco.Models.Services.Exporting;
|
using Disco.Models.Services.Exporting;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq.Expressions;
|
||||||
|
|
||||||
namespace Disco.Models.UI.Shared
|
namespace Disco.Models.UI.Shared
|
||||||
{
|
{
|
||||||
@@ -8,5 +10,6 @@ namespace Disco.Models.UI.Shared
|
|||||||
{
|
{
|
||||||
T Options { get; set; }
|
T Options { get; set; }
|
||||||
List<ExportOptionGroup> FieldGroups { get; set; }
|
List<ExportOptionGroup> FieldGroups { get; set; }
|
||||||
|
void AddCustomUserDetails(Expression<Func<T, List<string>>> modelAccessor, int groupIndex = -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -171,21 +171,37 @@ namespace Disco.Services.Devices
|
|||||||
if (Options.DetailBatteries)
|
if (Options.DetailBatteries)
|
||||||
r.DeviceDetailBatteries = r.DeviceDetails.Batteries();
|
r.DeviceDetailBatteries = r.DeviceDetails.Batteries();
|
||||||
|
|
||||||
if (Options.AssignedUserDetailCustom && r.AssignedUser != null)
|
|
||||||
{
|
|
||||||
var detailsService = new DetailsProviderService(database);
|
|
||||||
r.AssignedUserCustomDetails = detailsService.GetDetails(r.AssignedUser);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (Options.UserDetailCustom?.Any() ?? false)
|
||||||
|
AddUserCustomDetails(database, records, taskStatus);
|
||||||
|
|
||||||
return records;
|
return records;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void AddUserCustomDetails(DiscoDataContext database, List<DeviceExportRecord> records, IScheduledTaskStatus status)
|
||||||
|
{
|
||||||
|
if (!records.Any(r => r.AssignedUser != null))
|
||||||
|
return;
|
||||||
|
status.UpdateStatus(50, "Extracting custom user detail records");
|
||||||
|
var detailsService = new DetailsProviderService(database);
|
||||||
|
var cache = new Dictionary<string, Dictionary<string, string>>(StringComparer.Ordinal);
|
||||||
|
foreach (var record in records)
|
||||||
|
{
|
||||||
|
var userId = record.AssignedUser?.UserId;
|
||||||
|
if (string.IsNullOrWhiteSpace(userId))
|
||||||
|
continue;
|
||||||
|
if (!cache.TryGetValue(userId, out var details))
|
||||||
|
details = detailsService.GetDetails(record.AssignedUser);
|
||||||
|
record.AssignedUserCustomDetails = details;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ExportMetadata<DeviceExportOptions, DeviceExportRecord> BuildMetadata(DiscoDataContext database, List<DeviceExportRecord> records, IScheduledTaskStatus taskStatus)
|
public ExportMetadata<DeviceExportOptions, DeviceExportRecord> BuildMetadata(DiscoDataContext database, List<DeviceExportRecord> records, IScheduledTaskStatus taskStatus)
|
||||||
{
|
{
|
||||||
var metadata = new ExportMetadata<DeviceExportOptions, DeviceExportRecord>(Options);
|
var metadata = new ExportMetadata<DeviceExportOptions, DeviceExportRecord>(Options);
|
||||||
metadata.IgnoreShortNames.Add("Device");
|
metadata.IgnoreGroupNames.Add("Device");
|
||||||
metadata.IgnoreShortNames.Add("Details");
|
metadata.IgnoreGroupNames.Add("Details");
|
||||||
|
|
||||||
// Device
|
// Device
|
||||||
metadata.Add(o => o.DeviceSerialNumber, r => r.Device.SerialNumber);
|
metadata.Add(o => o.DeviceSerialNumber, r => r.Device.SerialNumber);
|
||||||
@@ -233,13 +249,10 @@ namespace Disco.Services.Devices
|
|||||||
metadata.Add(o => o.AssignedUserEmailAddress, r => r.AssignedUser?.EmailAddress);
|
metadata.Add(o => o.AssignedUserEmailAddress, r => r.AssignedUser?.EmailAddress);
|
||||||
|
|
||||||
// User Custom Details
|
// User Custom Details
|
||||||
if (Options.AssignedUserDetailCustom)
|
if (Options.UserDetailCustom.Any())
|
||||||
{
|
{
|
||||||
var keys = records.Where(r => r.AssignedUserCustomDetails != null).SelectMany(r => r.AssignedUserCustomDetails.Keys).Distinct(StringComparer.OrdinalIgnoreCase).ToList();
|
foreach (var key in Options.UserDetailCustom.OrderBy(k => k, StringComparer.OrdinalIgnoreCase))
|
||||||
foreach (var key in keys.OrderBy(k => k, StringComparer.OrdinalIgnoreCase))
|
metadata.Add($"Assigned User Detail {key.TrimEnd('*', '&')}", r => r.AssignedUserCustomDetails != null && r.AssignedUserCustomDetails.TryGetValue(key, out var value) ? value : null);
|
||||||
{
|
|
||||||
metadata.Add(key, r => r.AssignedUserCustomDetails != null && r.AssignedUserCustomDetails.TryGetValue(key, out var value) ? value : null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Jobs
|
// Jobs
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ namespace Disco.Services.Devices.DeviceFlags
|
|||||||
query = query.Include(a => a.Device.DeviceProfile);
|
query = query.Include(a => a.Device.DeviceProfile);
|
||||||
if (Options.HasAssignedUserOptions())
|
if (Options.HasAssignedUserOptions())
|
||||||
query = query.Include(a => a.Device.AssignedUser);
|
query = query.Include(a => a.Device.AssignedUser);
|
||||||
if (Options.AssignedUserDetailCustom)
|
if (Options.UserDetailCustom?.Any() ?? false)
|
||||||
query = query.Include(a => a.Device.AssignedUser.UserDetails);
|
query = query.Include(a => a.Device.AssignedUser.UserDetails);
|
||||||
|
|
||||||
query = query.Where(a => Options.DeviceFlagIds.Contains(a.DeviceFlagId));
|
query = query.Where(a => Options.DeviceFlagIds.Contains(a.DeviceFlagId));
|
||||||
@@ -86,7 +86,7 @@ namespace Disco.Services.Devices.DeviceFlags
|
|||||||
Assignment = a
|
Assignment = a
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
if (Options.AssignedUserDetailCustom)
|
if (Options.UserDetailCustom?.Any() ?? false)
|
||||||
{
|
{
|
||||||
status.UpdateStatus(50, "Extracting custom user detail records");
|
status.UpdateStatus(50, "Extracting custom user detail records");
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ namespace Disco.Services.Devices.DeviceFlags
|
|||||||
public ExportMetadata<DeviceFlagExportOptions, DeviceFlagExportRecord> BuildMetadata(DiscoDataContext database, List<DeviceFlagExportRecord> records, IScheduledTaskStatus status)
|
public ExportMetadata<DeviceFlagExportOptions, DeviceFlagExportRecord> BuildMetadata(DiscoDataContext database, List<DeviceFlagExportRecord> records, IScheduledTaskStatus status)
|
||||||
{
|
{
|
||||||
var metadata = new ExportMetadata<DeviceFlagExportOptions, DeviceFlagExportRecord>(Options);
|
var metadata = new ExportMetadata<DeviceFlagExportOptions, DeviceFlagExportRecord>(Options);
|
||||||
metadata.IgnoreShortNames.Add("Device Flag");
|
metadata.IgnoreGroupNames.Add("Device Flag");
|
||||||
|
|
||||||
// Device Flag
|
// Device Flag
|
||||||
metadata.Add(o => o.Id, r => r.Assignment.DeviceFlagId);
|
metadata.Add(o => o.Id, r => r.Assignment.DeviceFlagId);
|
||||||
@@ -171,13 +171,10 @@ namespace Disco.Services.Devices.DeviceFlags
|
|||||||
metadata.Add(o => o.AssignedUserEmailAddress, r => r.Assignment.Device?.AssignedUser?.EmailAddress);
|
metadata.Add(o => o.AssignedUserEmailAddress, r => r.Assignment.Device?.AssignedUser?.EmailAddress);
|
||||||
|
|
||||||
// User Custom Details
|
// User Custom Details
|
||||||
if (Options.AssignedUserDetailCustom)
|
if (Options.UserDetailCustom?.Any() ?? false)
|
||||||
{
|
{
|
||||||
var keys = records.Where(r => r.AssignedUserCustomDetails != null).SelectMany(r => r.AssignedUserCustomDetails.Keys).Distinct(StringComparer.OrdinalIgnoreCase).ToList();
|
foreach (var key in Options.UserDetailCustom.OrderBy(k => k, StringComparer.OrdinalIgnoreCase))
|
||||||
foreach (var key in keys.OrderBy(k => k, StringComparer.OrdinalIgnoreCase))
|
metadata.Add($"Assigned User Detail {key.TrimEnd('*', '&')}", r => r.AssignedUserCustomDetails != null && r.AssignedUserCustomDetails.TryGetValue(key, out var value) ? value : null);
|
||||||
{
|
|
||||||
metadata.Add(key, r => r.AssignedUserCustomDetails != null && r.AssignedUserCustomDetails.TryGetValue(key, out var value) ? value : null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return metadata;
|
return metadata;
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ using Disco.Models.Repository;
|
|||||||
using Disco.Models.Services.Documents;
|
using Disco.Models.Services.Documents;
|
||||||
using Disco.Models.Services.Exporting;
|
using Disco.Models.Services.Exporting;
|
||||||
using Disco.Services.Exporting;
|
using Disco.Services.Exporting;
|
||||||
|
using Disco.Services.Plugins.Features.DetailsProvider;
|
||||||
using Disco.Services.Tasks;
|
using Disco.Services.Tasks;
|
||||||
|
using Disco.Services.Users;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Data.Entity;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data.Entity;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Disco.Services.Users;
|
|
||||||
using Disco.Services.Plugins.Features.DetailsProvider;
|
|
||||||
|
|
||||||
namespace Disco.Services.Documents
|
namespace Disco.Services.Documents
|
||||||
{
|
{
|
||||||
@@ -110,12 +110,10 @@ namespace Disco.Services.Documents
|
|||||||
metadata.Add(o => o.UserEmailAddress, r => r.User?.EmailAddress);
|
metadata.Add(o => o.UserEmailAddress, r => r.User?.EmailAddress);
|
||||||
|
|
||||||
// User Custom Details
|
// User Custom Details
|
||||||
if (Options.UserDetailCustom.Any())
|
if (Options.UserDetailCustom?.Any() ?? false)
|
||||||
{
|
{
|
||||||
foreach (var key in Options.UserDetailCustom.OrderBy(k => k, StringComparer.OrdinalIgnoreCase))
|
foreach (var key in Options.UserDetailCustom.OrderBy(k => k, StringComparer.OrdinalIgnoreCase))
|
||||||
{
|
metadata.Add($"User Detail {key.TrimEnd('*', '&')}", r => r.UserCustomDetails != null && r.UserCustomDetails.TryGetValue(key, out var value) ? value : null);
|
||||||
metadata.Add(key, r => r.UserCustomDetails != null && r.UserCustomDetails.TryGetValue(key, out var value) ? value : null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return metadata;
|
return metadata;
|
||||||
|
|||||||
@@ -139,10 +139,10 @@ namespace Disco.Services.Exporting
|
|||||||
var member = ((MemberExpression)optionAccessor.Body).Member;
|
var member = ((MemberExpression)optionAccessor.Body).Member;
|
||||||
var attribute = (DisplayAttribute)member.GetCustomAttributes(typeof(DisplayAttribute), false).Single();
|
var attribute = (DisplayAttribute)member.GetCustomAttributes(typeof(DisplayAttribute), false).Single();
|
||||||
|
|
||||||
if (metadata.IgnoreShortNames.Contains(attribute.ShortName))
|
if (metadata.IgnoreGroupNames.Contains(attribute.GroupName))
|
||||||
columnName = attribute.Name;
|
columnName = attribute.Name;
|
||||||
else
|
else
|
||||||
columnName = $"{attribute.ShortName} {attribute.Name}";
|
columnName = $"{attribute.GroupName} {attribute.Name}";
|
||||||
}
|
}
|
||||||
|
|
||||||
metadata.Add(columnName, valueAccessor, csvValueEncoder);
|
metadata.Add(columnName, valueAccessor, csvValueEncoder);
|
||||||
@@ -190,6 +190,8 @@ namespace Disco.Services.Exporting
|
|||||||
{ typeof(ushort?), ToStringEncoder },
|
{ typeof(ushort?), ToStringEncoder },
|
||||||
{ typeof(bool), ToStringEncoder },
|
{ typeof(bool), ToStringEncoder },
|
||||||
{ typeof(bool?), ToStringEncoder },
|
{ typeof(bool?), ToStringEncoder },
|
||||||
|
{ typeof(Guid), ToStringEncoder },
|
||||||
|
{ typeof(Guid?), ToStringEncoder },
|
||||||
{ typeof(DateTime), DateTimeEncoder },
|
{ typeof(DateTime), DateTimeEncoder },
|
||||||
{ typeof(DateTime?), NullableDateTimeEncoder },
|
{ typeof(DateTime?), NullableDateTimeEncoder },
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -219,8 +219,8 @@ namespace Disco.Services.Jobs
|
|||||||
public ExportMetadata<JobExportOptions, JobExportRecord> BuildMetadata(DiscoDataContext database, List<JobExportRecord> records, IScheduledTaskStatus status)
|
public ExportMetadata<JobExportOptions, JobExportRecord> BuildMetadata(DiscoDataContext database, List<JobExportRecord> records, IScheduledTaskStatus status)
|
||||||
{
|
{
|
||||||
var metadata = new ExportMetadata<JobExportOptions, JobExportRecord>(Options);
|
var metadata = new ExportMetadata<JobExportOptions, JobExportRecord>(Options);
|
||||||
metadata.IgnoreShortNames.Add("Job");
|
metadata.IgnoreGroupNames.Add("Job");
|
||||||
metadata.IgnoreShortNames.Add("Job Details");
|
metadata.IgnoreGroupNames.Add("Job Details");
|
||||||
|
|
||||||
// Job
|
// Job
|
||||||
metadata.Add(o => o.JobId, r => r.Job.Id);
|
metadata.Add(o => o.JobId, r => r.Job.Id);
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ namespace Disco.Services.Plugins.Features.ExportProvider
|
|||||||
[PluginFeatureCategory(DisplayName = "Exporter")]
|
[PluginFeatureCategory(DisplayName = "Exporter")]
|
||||||
public class ExportProviderFeature : PluginFeature
|
public class ExportProviderFeature : PluginFeature
|
||||||
{
|
{
|
||||||
public void RegisterExportType<T, E, R>()
|
public void RegisterExportType<T, O, R>()
|
||||||
where T : IExport<E, R>, new()
|
where T : IExport<O, R>, new()
|
||||||
where E : IExportOptions, new()
|
where O : IExportOptions, new()
|
||||||
where R : IExportRecord
|
where R : IExportRecord
|
||||||
{
|
{
|
||||||
SavedExports.RegisterExportType<T, E, R>();
|
SavedExports.RegisterExportType<T, O, R>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ namespace Disco.Services.Users.UserFlags
|
|||||||
Assignment = a
|
Assignment = a
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
if (Options.UserDetailCustom)
|
if (Options.UserDetailCustom?.Any() ?? false)
|
||||||
{
|
{
|
||||||
status.UpdateStatus(50, "Extracting custom user detail records");
|
status.UpdateStatus(50, "Extracting custom user detail records");
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ namespace Disco.Services.Users.UserFlags
|
|||||||
status.UpdateStatus(80, "Building metadata");
|
status.UpdateStatus(80, "Building metadata");
|
||||||
|
|
||||||
var metadata = new ExportMetadata<UserFlagExportOptions, UserFlagExportRecord>(Options);
|
var metadata = new ExportMetadata<UserFlagExportOptions, UserFlagExportRecord>(Options);
|
||||||
metadata.IgnoreShortNames.Add("User Flag");
|
metadata.IgnoreGroupNames.Add("User Flag");
|
||||||
|
|
||||||
// User Flag
|
// User Flag
|
||||||
metadata.Add(o => o.Id, r => r.Assignment.UserFlagId);
|
metadata.Add(o => o.Id, r => r.Assignment.UserFlagId);
|
||||||
@@ -120,13 +120,10 @@ namespace Disco.Services.Users.UserFlags
|
|||||||
metadata.Add(o => o.UserEmailAddress, r => r.Assignment.User?.EmailAddress);
|
metadata.Add(o => o.UserEmailAddress, r => r.Assignment.User?.EmailAddress);
|
||||||
|
|
||||||
// User Custom Details
|
// User Custom Details
|
||||||
if (Options.UserDetailCustom)
|
if (Options.UserDetailCustom?.Any() ?? false)
|
||||||
{
|
{
|
||||||
var keys = records.Where(r => r.UserCustomDetails != null).SelectMany(r => r.UserCustomDetails.Keys).Distinct(StringComparer.OrdinalIgnoreCase).ToList();
|
foreach (var key in Options.UserDetailCustom.OrderBy(k => k, StringComparer.OrdinalIgnoreCase))
|
||||||
foreach (var key in keys.OrderBy(k => k, StringComparer.OrdinalIgnoreCase))
|
metadata.Add($"User Detail {key.TrimEnd('*', '&')}", r => r.UserCustomDetails != null && r.UserCustomDetails.TryGetValue(key, out var value) ? value : null);
|
||||||
{
|
|
||||||
metadata.Add(key, r => r.UserCustomDetails != null && r.UserCustomDetails.TryGetValue(key, out var value) ? value : null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return metadata;
|
return metadata;
|
||||||
|
|||||||
@@ -687,21 +687,21 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
[DiscoAuthorize(Claims.Device.Actions.Export)]
|
[DiscoAuthorize(Claims.Device.Actions.Export)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult Export(ExportModel Model)
|
public virtual ActionResult Export(ExportModel model)
|
||||||
{
|
{
|
||||||
if (Model == null || Model.Options == null)
|
if (model == null || model.Options == null)
|
||||||
throw new ArgumentNullException("Model");
|
throw new ArgumentNullException("Model");
|
||||||
|
|
||||||
// Write Options to Configuration
|
// Write Options to Configuration
|
||||||
Database.DiscoConfiguration.Devices.LastExportOptions = Model.Options;
|
Database.DiscoConfiguration.Devices.LastExportOptions = model.Options;
|
||||||
Database.SaveChanges();
|
Database.SaveChanges();
|
||||||
|
|
||||||
// Start Export
|
// Start Export
|
||||||
var exportContext = new DeviceExport(Model.Options);
|
var exportContext = new DeviceExport(model.Options);
|
||||||
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Device.Export(id, null, null)));
|
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Device.Export(id, null, null)));
|
||||||
|
|
||||||
// Try waiting for completion
|
// Try waiting for completion
|
||||||
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(1)))
|
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(2)))
|
||||||
return RedirectToAction(MVC.Device.Export(taskContext.Id, null, null));
|
return RedirectToAction(MVC.Device.Export(taskContext.Id, null, null));
|
||||||
else
|
else
|
||||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskContext.TaskStatus.SessionId));
|
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskContext.TaskStatus.SessionId));
|
||||||
@@ -729,9 +729,11 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Device.Actions.Export)]
|
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Device.Actions.Export)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult SaveExport(ExportModel Model)
|
public virtual ActionResult SaveExport(ExportModel model)
|
||||||
{
|
{
|
||||||
var export = new DeviceExport(Model.Options);
|
Database.DiscoConfiguration.Devices.LastExportOptions = model.Options;
|
||||||
|
|
||||||
|
var export = new DeviceExport(model.Options);
|
||||||
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
||||||
|
|
||||||
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
||||||
|
|||||||
@@ -404,20 +404,20 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
[DiscoAuthorize(Claims.Config.DeviceFlag.Export)]
|
[DiscoAuthorize(Claims.Config.DeviceFlag.Export)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult Export(ExportModel Model)
|
public virtual ActionResult Export(ExportModel model)
|
||||||
{
|
{
|
||||||
if (Model == null || Model.Options == null)
|
if (model == null || model.Options == null)
|
||||||
throw new ArgumentNullException(nameof(Model));
|
throw new ArgumentNullException(nameof(model));
|
||||||
|
|
||||||
Database.DiscoConfiguration.DeviceFlags.LastExportOptions = Model.Options;
|
Database.DiscoConfiguration.DeviceFlags.LastExportOptions = model.Options;
|
||||||
Database.SaveChanges();
|
Database.SaveChanges();
|
||||||
|
|
||||||
// Start Export
|
// Start Export
|
||||||
var exportContext = new DeviceFlagExport(Model.Options);
|
var exportContext = new DeviceFlagExport(model.Options);
|
||||||
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Config.DeviceFlag.Export(id, null, null)));
|
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Config.DeviceFlag.Export(id, null, null)));
|
||||||
|
|
||||||
// Try waiting for completion
|
// Try waiting for completion
|
||||||
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(1)))
|
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(2)))
|
||||||
return RedirectToAction(MVC.Config.DeviceFlag.Export(taskContext.Id, null, null));
|
return RedirectToAction(MVC.Config.DeviceFlag.Export(taskContext.Id, null, null));
|
||||||
else
|
else
|
||||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskContext.TaskStatus.SessionId));
|
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskContext.TaskStatus.SessionId));
|
||||||
@@ -445,11 +445,11 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Config.DeviceFlag.Export)]
|
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Config.DeviceFlag.Export)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult SaveExport(ExportModel Model)
|
public virtual ActionResult SaveExport(ExportModel model)
|
||||||
{
|
{
|
||||||
Database.DiscoConfiguration.DeviceFlags.LastExportOptions = Model.Options;
|
Database.DiscoConfiguration.DeviceFlags.LastExportOptions = model.Options;
|
||||||
|
|
||||||
var export = new DeviceFlagExport(Model.Options);
|
var export = new DeviceFlagExport(model.Options);
|
||||||
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
||||||
|
|
||||||
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ using Disco.Services.Plugins;
|
|||||||
using Disco.Services.Plugins.Features.DocumentHandlerProvider;
|
using Disco.Services.Plugins.Features.DocumentHandlerProvider;
|
||||||
using Disco.Services.Tasks;
|
using Disco.Services.Tasks;
|
||||||
using Disco.Services.Users;
|
using Disco.Services.Users;
|
||||||
using Disco.Services.Users.UserFlags;
|
|
||||||
using Disco.Services.Web;
|
using Disco.Services.Web;
|
||||||
using Disco.Web.Areas.API.Models.DocumentTemplate;
|
using Disco.Web.Areas.API.Models.DocumentTemplate;
|
||||||
using Disco.Web.Areas.Config.Models.DocumentTemplate;
|
using Disco.Web.Areas.Config.Models.DocumentTemplate;
|
||||||
@@ -1453,25 +1452,25 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
[DiscoAuthorize(Claims.Config.DocumentTemplate.Export)]
|
[DiscoAuthorize(Claims.Config.DocumentTemplate.Export)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult Export(ExportModel Model)
|
public virtual ActionResult Export(ExportModel model)
|
||||||
{
|
{
|
||||||
if (Model == null || Model.Options == null)
|
if (model == null || model.Options == null)
|
||||||
throw new ArgumentNullException(nameof(Model));
|
throw new ArgumentNullException(nameof(model));
|
||||||
|
|
||||||
var templateId = default(string);
|
var templateId = default(string);
|
||||||
if (Model.Options.DocumentTemplateIds.Count == 1)
|
if (model.Options.DocumentTemplateIds.Count == 1)
|
||||||
templateId = Model.Options.DocumentTemplateIds.First();
|
templateId = model.Options.DocumentTemplateIds.First();
|
||||||
|
|
||||||
Database.DiscoConfiguration.Documents.LastExportOptions = Model.Options;
|
Database.DiscoConfiguration.Documents.LastExportOptions = model.Options;
|
||||||
Database.SaveChanges();
|
Database.SaveChanges();
|
||||||
|
|
||||||
// Start Export
|
// Start Export
|
||||||
var exportContext = new DocumentExport(Model.Options);
|
var exportContext = new DocumentExport(model.Options);
|
||||||
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Config.DocumentTemplate.Export(templateId, id)));
|
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Config.DocumentTemplate.Export(null, id)));
|
||||||
|
|
||||||
// Try waiting for completion
|
// Try waiting for completion
|
||||||
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(1)))
|
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(2)))
|
||||||
return RedirectToAction(MVC.Config.DocumentTemplate.Export(templateId, taskContext.Id));
|
return RedirectToAction(MVC.Config.DocumentTemplate.Export(null, taskContext.Id));
|
||||||
else
|
else
|
||||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskContext.TaskStatus.SessionId));
|
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskContext.TaskStatus.SessionId));
|
||||||
}
|
}
|
||||||
@@ -1495,11 +1494,11 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Config.DocumentTemplate.Export)]
|
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Config.DocumentTemplate.Export)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult SaveExport(ExportModel Model)
|
public virtual ActionResult SaveExport(ExportModel model)
|
||||||
{
|
{
|
||||||
Database.DiscoConfiguration.Documents.LastExportOptions = Model.Options;
|
Database.DiscoConfiguration.Documents.LastExportOptions = model.Options;
|
||||||
|
|
||||||
var export = new DocumentExport(Model.Options);
|
var export = new DocumentExport(model.Options);
|
||||||
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
||||||
|
|
||||||
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
||||||
|
|||||||
@@ -2182,7 +2182,7 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Job.Export(id)));
|
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Job.Export(id)));
|
||||||
|
|
||||||
// Try waiting for completion
|
// Try waiting for completion
|
||||||
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(1)))
|
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(2)))
|
||||||
return RedirectToAction(MVC.Job.Export(taskContext.Id));
|
return RedirectToAction(MVC.Job.Export(taskContext.Id));
|
||||||
else
|
else
|
||||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskContext.TaskStatus.SessionId));
|
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskContext.TaskStatus.SessionId));
|
||||||
@@ -2210,9 +2210,13 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Job.Actions.Export)]
|
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Job.Actions.Export)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult SaveExport(ExportModel Model)
|
public virtual ActionResult SaveExport(ExportModel model)
|
||||||
{
|
{
|
||||||
var export = new JobExport(Model.Options);
|
// Write Options to Configuration
|
||||||
|
Database.DiscoConfiguration.JobPreferences.LastExportOptions = model.Options;
|
||||||
|
Database.SaveChanges();
|
||||||
|
|
||||||
|
var export = new JobExport(model.Options);
|
||||||
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
||||||
|
|
||||||
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
||||||
|
|||||||
@@ -409,20 +409,20 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
[DiscoAuthorize(Claims.Config.UserFlag.Export)]
|
[DiscoAuthorize(Claims.Config.UserFlag.Export)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult Export(ExportModel Model)
|
public virtual ActionResult Export(ExportModel model)
|
||||||
{
|
{
|
||||||
if (Model == null || Model.Options == null)
|
if (model == null || model.Options == null)
|
||||||
throw new ArgumentNullException(nameof(Model));
|
throw new ArgumentNullException(nameof(model));
|
||||||
|
|
||||||
Database.DiscoConfiguration.UserFlags.LastExportOptions = Model.Options;
|
Database.DiscoConfiguration.UserFlags.LastExportOptions = model.Options;
|
||||||
Database.SaveChanges();
|
Database.SaveChanges();
|
||||||
|
|
||||||
// Start Export
|
// Start Export
|
||||||
var exportContext = new UserFlagExport(Model.Options);
|
var exportContext = new UserFlagExport(model.Options);
|
||||||
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Config.UserFlag.Export(id, null, null)));
|
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Config.UserFlag.Export(id, null, null)));
|
||||||
|
|
||||||
// Try waiting for completion
|
// Try waiting for completion
|
||||||
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(1)))
|
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(2)))
|
||||||
return RedirectToAction(MVC.Config.UserFlag.Export(taskContext.Id, null, null));
|
return RedirectToAction(MVC.Config.UserFlag.Export(taskContext.Id, null, null));
|
||||||
else
|
else
|
||||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskContext.TaskStatus.SessionId));
|
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskContext.TaskStatus.SessionId));
|
||||||
@@ -447,11 +447,11 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Config.UserFlag.Export)]
|
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Config.UserFlag.Export)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult SaveExport(ExportModel Model)
|
public virtual ActionResult SaveExport(ExportModel model)
|
||||||
{
|
{
|
||||||
Database.DiscoConfiguration.UserFlags.LastExportOptions = Model.Options;
|
Database.DiscoConfiguration.UserFlags.LastExportOptions = model.Options;
|
||||||
|
|
||||||
var export = new UserFlagExport(Model.Options);
|
var export = new UserFlagExport(model.Options);
|
||||||
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
||||||
|
|
||||||
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Disco.Models.Areas.Config.UI.DeviceFlag;
|
using Disco.Models.Areas.Config.UI.DeviceFlag;
|
||||||
using Disco.Models.Repository;
|
using Disco.Models.Repository;
|
||||||
using Disco.Models.Services.Devices.DeviceFlag;
|
using Disco.Models.Services.Devices.DeviceFlag;
|
||||||
|
using Disco.Models.Services.Users.UserFlags;
|
||||||
using Disco.Models.UI.Config.DeviceFlag;
|
using Disco.Models.UI.Config.DeviceFlag;
|
||||||
using Disco.Services.Authorization;
|
using Disco.Services.Authorization;
|
||||||
using Disco.Services.Devices.DeviceFlags;
|
using Disco.Services.Devices.DeviceFlags;
|
||||||
@@ -9,6 +10,7 @@ using Disco.Services.Extensions;
|
|||||||
using Disco.Services.Plugins.Features.UIExtension;
|
using Disco.Services.Plugins.Features.UIExtension;
|
||||||
using Disco.Services.Web;
|
using Disco.Services.Web;
|
||||||
using Disco.Web.Areas.Config.Models.DeviceFlag;
|
using Disco.Web.Areas.Config.Models.DeviceFlag;
|
||||||
|
using Disco.Web.Models.Shared;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -129,6 +131,9 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
DeviceFlags = DeviceFlagService.GetDeviceFlags(),
|
DeviceFlags = DeviceFlagService.GetDeviceFlags(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
m.Fields = ExportFieldsModel.Create(m.Options, DeviceFlagExportOptions.DefaultOptions(), nameof(DeviceFlagExportOptions.CurrentOnly));
|
||||||
|
m.Fields.AddCustomUserDetails(o => o.UserDetailCustom);
|
||||||
|
|
||||||
if (ExportTask.TryFromCache(exportId, out var context))
|
if (ExportTask.TryFromCache(exportId, out var context))
|
||||||
{
|
{
|
||||||
m.ExportId = context.Id;
|
m.ExportId = context.Id;
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ using Disco.Data.Repository;
|
|||||||
using Disco.Models.Areas.Config.UI.UserFlag;
|
using Disco.Models.Areas.Config.UI.UserFlag;
|
||||||
using Disco.Models.Repository;
|
using Disco.Models.Repository;
|
||||||
using Disco.Models.Services.Documents;
|
using Disco.Models.Services.Documents;
|
||||||
using Disco.Models.Services.Exporting;
|
|
||||||
using Disco.Models.UI.Config.DocumentTemplate;
|
using Disco.Models.UI.Config.DocumentTemplate;
|
||||||
using Disco.Services;
|
using Disco.Services;
|
||||||
using Disco.Services.Authorization;
|
using Disco.Services.Authorization;
|
||||||
@@ -306,27 +305,8 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
DocumentTemplates = Database.DocumentTemplates.OrderBy(d => d.Id).ToList(),
|
DocumentTemplates = Database.DocumentTemplates.OrderBy(d => d.Id).ToList(),
|
||||||
};
|
};
|
||||||
|
|
||||||
m.Fields = ExportFieldsModel.Create(m.Options, nameof(DocumentExportOptions.LatestOnly));
|
m.Fields = ExportFieldsModel.Create(m.Options, DocumentExportOptions.DefaultOptions(), nameof(DocumentExportOptions.LatestOnly));
|
||||||
|
m.Fields.AddCustomUserDetails(o => o.UserDetailCustom);
|
||||||
var userCustomDetailKeys = Database.UserDetails.Where(d => d.Scope == "Details").Select(d => d.Key).Distinct().OrderBy(k => k).ToList();
|
|
||||||
if (userCustomDetailKeys.Any())
|
|
||||||
{
|
|
||||||
var group = new ExportOptionGroup("User Custom Details");
|
|
||||||
foreach (var key in userCustomDetailKeys)
|
|
||||||
{
|
|
||||||
group.Add(new ExportOptionField()
|
|
||||||
{
|
|
||||||
GroupName = group.Name,
|
|
||||||
Name = key,
|
|
||||||
DisplayName = key.TrimEnd('*', '&'),
|
|
||||||
Description = $"{key} custom detail for the user associated with the document instance",
|
|
||||||
Checked = false,
|
|
||||||
Key = "UserDetailCustom",
|
|
||||||
Value = key,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
m.Fields.FieldGroups.Add(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ExportTask.TryFromCache(exportId, out var context))
|
if (ExportTask.TryFromCache(exportId, out var context))
|
||||||
{
|
{
|
||||||
@@ -340,6 +320,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
|
|
||||||
if (template != null)
|
if (template != null)
|
||||||
{
|
{
|
||||||
|
m.Options.DocumentTemplateIds.Clear();
|
||||||
m.Options.DocumentTemplateIds.Add(template.Id);
|
m.Options.DocumentTemplateIds.Add(template.Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using Disco.Services.Plugins.Features.UIExtension;
|
|||||||
using Disco.Services.Users.UserFlags;
|
using Disco.Services.Users.UserFlags;
|
||||||
using Disco.Services.Web;
|
using Disco.Services.Web;
|
||||||
using Disco.Web.Areas.Config.Models.UserFlag;
|
using Disco.Web.Areas.Config.Models.UserFlag;
|
||||||
|
using Disco.Web.Models.Shared;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -132,6 +133,9 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
UserFlags = UserFlagService.GetUserFlags(),
|
UserFlags = UserFlagService.GetUserFlags(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
m.Fields = ExportFieldsModel.Create(m.Options, UserFlagExportOptions.DefaultOptions(), nameof(UserFlagExportOptions.CurrentOnly));
|
||||||
|
m.Fields.AddCustomUserDetails(o => o.UserDetailCustom);
|
||||||
|
|
||||||
if (ExportTask.TryFromCache(exportId, out var context))
|
if (ExportTask.TryFromCache(exportId, out var context))
|
||||||
{
|
{
|
||||||
m.ExportId = exportId;
|
m.ExportId = exportId;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Disco.Models.Areas.Config.UI.DeviceFlag;
|
using Disco.Models.Areas.Config.UI.DeviceFlag;
|
||||||
using Disco.Models.Services.Devices.DeviceFlag;
|
using Disco.Models.Services.Devices.DeviceFlag;
|
||||||
using Disco.Models.Services.Exporting;
|
using Disco.Models.Services.Exporting;
|
||||||
|
using Disco.Models.UI.Shared;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -14,5 +15,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceFlag
|
|||||||
public ExportResult ExportResult { get; set; }
|
public ExportResult ExportResult { get; set; }
|
||||||
|
|
||||||
public List<Disco.Models.Repository.DeviceFlag> DeviceFlags { get; set; }
|
public List<Disco.Models.Repository.DeviceFlag> DeviceFlags { get; set; }
|
||||||
|
|
||||||
|
public SharedExportFieldsModel<DeviceFlagExportOptions> Fields { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Disco.Models.Areas.Config.UI.UserFlag;
|
using Disco.Models.Areas.Config.UI.UserFlag;
|
||||||
using Disco.Models.Services.Exporting;
|
using Disco.Models.Services.Exporting;
|
||||||
using Disco.Models.Services.Users.UserFlags;
|
using Disco.Models.Services.Users.UserFlags;
|
||||||
|
using Disco.Models.UI.Shared;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -14,5 +15,7 @@ namespace Disco.Web.Areas.Config.Models.UserFlag
|
|||||||
public ExportResult ExportResult { get; set; }
|
public ExportResult ExportResult { get; set; }
|
||||||
|
|
||||||
public List<Disco.Models.Repository.UserFlag> UserFlags { get; set; }
|
public List<Disco.Models.Repository.UserFlag> UserFlags { get; set; }
|
||||||
|
|
||||||
|
public SharedExportFieldsModel<UserFlagExportOptions> Fields { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,6 @@
|
|||||||
Authorization.RequireAny(Claims.Config.DeviceFlag.Export);
|
Authorization.RequireAny(Claims.Config.DeviceFlag.Export);
|
||||||
|
|
||||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Flags", MVC.Config.DeviceFlag.Index(null), "Export");
|
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Flags", MVC.Config.DeviceFlag.Index(null), "Export");
|
||||||
|
|
||||||
var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData);
|
|
||||||
var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool) && p.PropertyName != "CurrentOnly")
|
|
||||||
.GroupBy(m => m.ShortDisplayName);
|
|
||||||
}
|
}
|
||||||
<div id="DeviceFlag_Export">
|
<div id="DeviceFlag_Export">
|
||||||
@using (Html.BeginForm(MVC.API.DeviceFlag.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.DeviceFlag.SaveExport()) }))
|
@using (Html.BeginForm(MVC.API.DeviceFlag.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.DeviceFlag.SaveExport()) }))
|
||||||
@@ -48,89 +44,21 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="DeviceFlag_Export_Fields" class="form" style="width: 570px; margin-top: 15px;">
|
@Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups)
|
||||||
<h2>Export Fields <a id="DeviceFlag_Export_Fields_Defaults" href="#">(Defaults)</a></h2>
|
|
||||||
<table>
|
|
||||||
@foreach (var optionGroup in optionGroups)
|
|
||||||
{
|
|
||||||
var optionFields = optionGroup.ToList();
|
|
||||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
|
||||||
<tr>
|
|
||||||
<th style="width: 120px;">
|
|
||||||
@optionGroup.Key
|
|
||||||
@if (optionFields.Count > 2)
|
|
||||||
{
|
|
||||||
<span style="display: block;" class="select"><a class="selectAll" href="#">ALL</a> | <a class="selectNone" href="#">NONE</a></span>
|
|
||||||
}
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<div class="DeviceFlag_Export_Fields_Group">
|
|
||||||
<table class="none">
|
|
||||||
<tr>
|
|
||||||
<td style="width: 50%">
|
|
||||||
<ul class="none">
|
|
||||||
@foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
|
||||||
{
|
|
||||||
<li title="@optionItem.Description">
|
|
||||||
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
|
|
||||||
</li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
<td style="width: 50%">
|
|
||||||
<ul class="none">
|
|
||||||
@foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
|
||||||
{
|
|
||||||
<li title="@optionItem.Description">
|
|
||||||
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
|
|
||||||
</li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
}
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
var exportDefaultFields = ['Name', 'AddedDate', 'UserId', 'UserDisplayName', 'Comments'];
|
const $exportFields = $('#Export_Fields');
|
||||||
var $exportFields = $('#DeviceFlag_Export_Fields');
|
const $form = $exportFields.closest('form');
|
||||||
var $exportScope = $('#DeviceFlag_Export_Scope');
|
let $exportingDialog = null;
|
||||||
var $form = $exportScope.closest('form');
|
|
||||||
var $exportingDialog = null;
|
|
||||||
|
|
||||||
$exportFields.on('click', 'a.selectAll,a.selectNone', function () {
|
$.validator.unobtrusive.parse($form);
|
||||||
var $this = $(this);
|
$form.data("validator").settings.submitHandler = function () {
|
||||||
|
const exportFieldCount = $exportFields.find('input:checked').length;
|
||||||
$this.closest('tr').find('input').prop('checked', $this.is('.selectAll'));
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#DeviceFlag_Export_Fields_Defaults').click(function () {
|
|
||||||
|
|
||||||
$exportFields.find('input').prop('checked', false);
|
|
||||||
|
|
||||||
$.each(exportDefaultFields, function (index, value) {
|
|
||||||
$('#Options_' + value).prop('checked', true);
|
|
||||||
});
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Submit Validation
|
|
||||||
function submitHandler() {
|
|
||||||
var exportFieldCount = $exportFields.find('input:checked').length;
|
|
||||||
|
|
||||||
if (exportFieldCount > 0) {
|
if (exportFieldCount > 0) {
|
||||||
|
|
||||||
if ($exportingDialog == null) {
|
if (!$exportingDialog) {
|
||||||
$exportingDialog = $('#DeviceFlag_Export_Exporting').dialog({
|
$exportingDialog = $('#Export_Exporting').dialog({
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 164,
|
height: 164,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
@@ -141,24 +69,16 @@
|
|||||||
$exportingDialog.dialog('open');
|
$exportingDialog.dialog('open');
|
||||||
|
|
||||||
$form[0].submit();
|
$form[0].submit();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
alert('Select at least one field to export.');
|
|
||||||
}
|
|
||||||
$.validator.unobtrusive.parse($form);
|
|
||||||
$form.data("validator").settings.submitHandler = submitHandler;
|
|
||||||
|
|
||||||
$('#DeviceFlag_Export_Download_Dialog').dialog({
|
alert('Select at least one field to export.');
|
||||||
width: 400,
|
};
|
||||||
height: 164,
|
|
||||||
resizable: false,
|
$('#DeviceFlag_Export_Button').on('click', function () {
|
||||||
modal: true,
|
|
||||||
autoOpen: true
|
|
||||||
});
|
|
||||||
$('#DeviceFlag_Export_Button').click(function () {
|
|
||||||
$form.submit();
|
$form.submit();
|
||||||
});
|
});
|
||||||
$('#DeviceFlag_Export_Save_Button').click(function () {
|
$('#DeviceFlag_Export_Save_Button').on('click', function () {
|
||||||
$form.attr('action', $form[0].dataset.saveaction);
|
$form.attr('action', $form[0].dataset.saveaction);
|
||||||
$form.submit();
|
$form.submit();
|
||||||
});
|
});
|
||||||
@@ -168,7 +88,7 @@
|
|||||||
</div>
|
</div>
|
||||||
@if (Model.ExportId.HasValue)
|
@if (Model.ExportId.HasValue)
|
||||||
{
|
{
|
||||||
<div id="DeviceFlag_Export_Download_Dialog" class="dialog" title="Export Device Flags">
|
<div id="Export_Download_Dialog" class="dialog" title="Export Device Flags">
|
||||||
@if (Model.ExportResult.RecordCount == 0)
|
@if (Model.ExportResult.RecordCount == 0)
|
||||||
{
|
{
|
||||||
<h4>No records matched the filter criteria</h4>
|
<h4>No records matched the filter criteria</h4>
|
||||||
@@ -181,7 +101,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#DeviceFlag_Export_Download_Dialog')
|
$('#Export_Download_Dialog')
|
||||||
.dialog({
|
.dialog({
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 164,
|
height: 164,
|
||||||
@@ -192,7 +112,7 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
<div id="DeviceFlag_Export_Exporting" class="dialog" title="Exporting Device Flags...">
|
<div id="Export_Exporting" class="dialog" title="Exporting Device Flags...">
|
||||||
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting device flags...</h4>
|
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting device flags...</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="actionBar">
|
<div class="actionBar">
|
||||||
|
|||||||
@@ -56,10 +56,6 @@ namespace Disco.Web.Areas.Config.Views.DeviceFlag
|
|||||||
|
|
||||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Flags", MVC.Config.DeviceFlag.Index(null), "Export");
|
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Flags", MVC.Config.DeviceFlag.Index(null), "Export");
|
||||||
|
|
||||||
var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData);
|
|
||||||
var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool) && p.PropertyName != "CurrentOnly")
|
|
||||||
.GroupBy(m => m.ShortDisplayName);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
@@ -70,13 +66,13 @@ WriteLiteral(" id=\"DeviceFlag_Export\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 13 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 9 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 13 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 9 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
using (Html.BeginForm(MVC.API.DeviceFlag.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.DeviceFlag.SaveExport()) }))
|
using (Html.BeginForm(MVC.API.DeviceFlag.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.DeviceFlag.SaveExport()) }))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -84,14 +80,14 @@ WriteLiteral(">\r\n");
|
|||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 15 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 11 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
Write(Html.AntiForgeryToken());
|
Write(Html.AntiForgeryToken());
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 15 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 11 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -114,13 +110,13 @@ WriteLiteral(">\r\n Device Flags:\r\n
|
|||||||
" <td>\r\n");
|
" <td>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 24 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 20 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 24 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 20 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
foreach (var flag in Model.DeviceFlags)
|
foreach (var flag in Model.DeviceFlags)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -136,20 +132,20 @@ WriteLiteral(" id=\"Options_DeviceFlagIds\"");
|
|||||||
|
|
||||||
WriteLiteral(" name=\"Options.DeviceFlagIds\"");
|
WriteLiteral(" name=\"Options.DeviceFlagIds\"");
|
||||||
|
|
||||||
WriteAttribute("value", Tuple.Create(" value=\"", 1375), Tuple.Create("\"", 1391)
|
WriteAttribute("value", Tuple.Create(" value=\"", 1084), Tuple.Create("\"", 1100)
|
||||||
|
|
||||||
#line 28 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 24 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1383), Tuple.Create<System.Object, System.Int32>(flag.Id
|
, Tuple.Create(Tuple.Create("", 1092), Tuple.Create<System.Object, System.Int32>(flag.Id
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1383), false)
|
, 1092), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 28 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 24 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
Write(((bool)Model.Options.DeviceFlagIds.Contains(flag.Id)) ? "checked " : null);
|
Write(((bool)Model.Options.DeviceFlagIds.Contains(flag.Id)) ? "checked " : null);
|
||||||
|
|
||||||
|
|
||||||
@@ -157,31 +153,31 @@ WriteLiteral(" ");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" />\r\n <i");
|
WriteLiteral(" />\r\n <i");
|
||||||
|
|
||||||
WriteAttribute("class", Tuple.Create(" class=\"", 1512), Tuple.Create("\"", 1565)
|
WriteAttribute("class", Tuple.Create(" class=\"", 1221), Tuple.Create("\"", 1274)
|
||||||
, Tuple.Create(Tuple.Create("", 1520), Tuple.Create("fa", 1520), true)
|
, Tuple.Create(Tuple.Create("", 1229), Tuple.Create("fa", 1229), true)
|
||||||
, Tuple.Create(Tuple.Create(" ", 1522), Tuple.Create("fa-", 1523), true)
|
, Tuple.Create(Tuple.Create(" ", 1231), Tuple.Create("fa-", 1232), true)
|
||||||
|
|
||||||
#line 29 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 25 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1526), Tuple.Create<System.Object, System.Int32>(flag.Icon
|
, Tuple.Create(Tuple.Create("", 1235), Tuple.Create<System.Object, System.Int32>(flag.Icon
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1526), false)
|
, 1235), false)
|
||||||
, Tuple.Create(Tuple.Create(" ", 1538), Tuple.Create("fa-lg", 1539), true)
|
, Tuple.Create(Tuple.Create(" ", 1247), Tuple.Create("fa-lg", 1248), true)
|
||||||
, Tuple.Create(Tuple.Create(" ", 1544), Tuple.Create("d-", 1545), true)
|
, Tuple.Create(Tuple.Create(" ", 1253), Tuple.Create("d-", 1254), true)
|
||||||
|
|
||||||
#line 29 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 25 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1547), Tuple.Create<System.Object, System.Int32>(flag.IconColour
|
, Tuple.Create(Tuple.Create("", 1256), Tuple.Create<System.Object, System.Int32>(flag.IconColour
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1547), false)
|
, 1256), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral("></i>\r\n <span>");
|
WriteLiteral("></i>\r\n <span>");
|
||||||
|
|
||||||
|
|
||||||
#line 30 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 26 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
Write(flag.Name);
|
Write(flag.Name);
|
||||||
|
|
||||||
|
|
||||||
@@ -191,7 +187,7 @@ WriteLiteral("</span>\r\n </label>\r\n
|
|||||||
"div>\r\n");
|
"div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 33 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 29 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -201,7 +197,7 @@ WriteLiteral(" </td>\r\n </tr>\r\n
|
|||||||
" <th>");
|
" <th>");
|
||||||
|
|
||||||
|
|
||||||
#line 37 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 33 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
Write(Html.LabelFor(m => m.Options.CurrentOnly));
|
Write(Html.LabelFor(m => m.Options.CurrentOnly));
|
||||||
|
|
||||||
|
|
||||||
@@ -212,7 +208,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 39 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 35 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
Write(Html.CheckBoxFor(m => m.Options.CurrentOnly));
|
Write(Html.CheckBoxFor(m => m.Options.CurrentOnly));
|
||||||
|
|
||||||
|
|
||||||
@@ -223,7 +219,7 @@ WriteLiteral("\r\n <p>Uncheck to include all historical d
|
|||||||
"r>\r\n <th>");
|
"r>\r\n <th>");
|
||||||
|
|
||||||
|
|
||||||
#line 44 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 40 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
Write(Html.LabelFor(m => m.Options.Format));
|
Write(Html.LabelFor(m => m.Options.Format));
|
||||||
|
|
||||||
|
|
||||||
@@ -234,7 +230,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 46 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 42 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
Write(Html.DropDownListFor(m => m.Options.Format, Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)).Select(v => new SelectListItem() { Value = v, Text = v })));
|
Write(Html.DropDownListFor(m => m.Options.Format, Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)).Select(v => new SelectListItem() { Value = v, Text = v })));
|
||||||
|
|
||||||
|
|
||||||
@@ -243,381 +239,58 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
||||||
" </div>\r\n");
|
" </div>\r\n");
|
||||||
|
|
||||||
WriteLiteral(" <div");
|
|
||||||
|
|
||||||
WriteLiteral(" id=\"DeviceFlag_Export_Fields\"");
|
#line 47 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
|
|
||||||
WriteLiteral(" class=\"form\"");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 570px; margin-top: 15px;\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <h2>Export Fields <a");
|
|
||||||
|
|
||||||
WriteLiteral(" id=\"DeviceFlag_Export_Fields_Defaults\"");
|
|
||||||
|
|
||||||
WriteLiteral(" href=\"#\"");
|
|
||||||
|
|
||||||
WriteLiteral(">(Defaults)</a></h2>\r\n <table>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 54 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 54 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 47 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
foreach (var optionGroup in optionGroups)
|
Write(Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups));
|
||||||
{
|
|
||||||
var optionFields = optionGroup.ToList();
|
|
||||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <tr>\r\n <th");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 120px;\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
|
||||||
|
|
||||||
|
|
||||||
#line 60 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
Write(optionGroup.Key);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 61 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 61 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 47 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
if (optionFields.Count > 2)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <span");
|
WriteLiteral(" <script>\r\n $(function () {\r\n const $exportField" +
|
||||||
|
"s = $(\'#Export_Fields\');\r\n const $form = $exportFields.closest(\'f" +
|
||||||
WriteLiteral(" style=\"display: block;\"");
|
"orm\');\r\n let $exportingDialog = null;\r\n\r\n $.valida" +
|
||||||
|
"tor.unobtrusive.parse($form);\r\n $form.data(\"validator\").settings." +
|
||||||
WriteLiteral(" class=\"select\"");
|
"submitHandler = function () {\r\n const exportFieldCount = $exp" +
|
||||||
|
"ortFields.find(\'input:checked\').length;\r\n\r\n if (exportFieldCo" +
|
||||||
WriteLiteral("><a");
|
"unt > 0) {\r\n\r\n if (!$exportingDialog) {\r\n " +
|
||||||
|
" $exportingDialog = $(\'#Export_Exporting\').dialog({\r\n " +
|
||||||
WriteLiteral(" class=\"selectAll\"");
|
" width: 400,\r\n height: 164,\r\n " +
|
||||||
|
" resizable: false,\r\n mo" +
|
||||||
WriteLiteral(" href=\"#\"");
|
"dal: true,\r\n autoOpen: false\r\n " +
|
||||||
|
" });\r\n }\r\n $exportingDialo" +
|
||||||
WriteLiteral(">ALL</a> | <a");
|
"g.dialog(\'open\');\r\n\r\n $form[0].submit();\r\n " +
|
||||||
|
" return;\r\n }\r\n\r\n alert(\'Select at " +
|
||||||
WriteLiteral(" class=\"selectNone\"");
|
"least one field to export.\');\r\n };\r\n\r\n $(\'#DeviceF" +
|
||||||
|
"lag_Export_Button\').on(\'click\', function () {\r\n $form.submit(" +
|
||||||
WriteLiteral(" href=\"#\"");
|
");\r\n });\r\n $(\'#DeviceFlag_Export_Save_Button\').on(" +
|
||||||
|
"\'click\', function () {\r\n $form.attr(\'action\', $form[0].datase" +
|
||||||
WriteLiteral(">NONE</a></span>\r\n");
|
"t.saveaction);\r\n $form.submit();\r\n });\r\n " +
|
||||||
|
" });\r\n </script>\r\n");
|
||||||
|
|
||||||
#line 64 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" </th>\r\n <td>\r\n " +
|
|
||||||
" <div");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"DeviceFlag_Export_Fields_Group\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <table");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"none\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <tr>\r\n " +
|
|
||||||
" <td");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 50%\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <ul");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"none\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 72 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
#line 72 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <li");
|
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 3955), Tuple.Create("\"", 3986)
|
|
||||||
|
|
||||||
#line 74 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 3963), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 3963), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <input");
|
|
||||||
|
|
||||||
WriteLiteral(" type=\"checkbox\"");
|
|
||||||
|
|
||||||
WriteAttribute("id", Tuple.Create(" id=\"", 4068), Tuple.Create("\"", 4105)
|
|
||||||
, Tuple.Create(Tuple.Create("", 4073), Tuple.Create("Options_", 4073), true)
|
|
||||||
|
|
||||||
#line 75 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4081), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4081), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteAttribute("name", Tuple.Create(" name=\"", 4106), Tuple.Create("\"", 4145)
|
|
||||||
, Tuple.Create(Tuple.Create("", 4113), Tuple.Create("Options.", 4113), true)
|
|
||||||
|
|
||||||
#line 75 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4121), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4121), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(" value=\"true\"");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
|
||||||
|
|
||||||
|
|
||||||
#line 75 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
Write(((bool)optionItem.Model) ? "checked " : null);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" /><label");
|
|
||||||
|
|
||||||
WriteAttribute("for", Tuple.Create(" for=\"", 4216), Tuple.Create("\"", 4254)
|
|
||||||
, Tuple.Create(Tuple.Create("", 4222), Tuple.Create("Options_", 4222), true)
|
|
||||||
|
|
||||||
#line 75 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4230), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4230), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">");
|
|
||||||
|
|
||||||
|
|
||||||
#line 75 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
Write(optionItem.DisplayName);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("</label>\r\n </li>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 77 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" </ul>\r\n " +
|
|
||||||
" </td>\r\n <td");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 50%\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <ul");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"none\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 82 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
#line 82 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <li");
|
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 4843), Tuple.Create("\"", 4874)
|
|
||||||
|
|
||||||
#line 84 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4851), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4851), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <input");
|
|
||||||
|
|
||||||
WriteLiteral(" type=\"checkbox\"");
|
|
||||||
|
|
||||||
WriteAttribute("id", Tuple.Create(" id=\"", 4956), Tuple.Create("\"", 4993)
|
|
||||||
, Tuple.Create(Tuple.Create("", 4961), Tuple.Create("Options_", 4961), true)
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4969), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4969), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteAttribute("name", Tuple.Create(" name=\"", 4994), Tuple.Create("\"", 5033)
|
|
||||||
, Tuple.Create(Tuple.Create("", 5001), Tuple.Create("Options.", 5001), true)
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 5009), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 5009), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(" value=\"true\"");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
|
||||||
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
Write(((bool)optionItem.Model) ? "checked " : null);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" /><label");
|
|
||||||
|
|
||||||
WriteAttribute("for", Tuple.Create(" for=\"", 5104), Tuple.Create("\"", 5142)
|
|
||||||
, Tuple.Create(Tuple.Create("", 5110), Tuple.Create("Options_", 5110), true)
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 5118), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 5118), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">");
|
|
||||||
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
Write(optionItem.DisplayName);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("</label>\r\n </li>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 87 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 87 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(@" </ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
");
|
|
||||||
|
|
||||||
|
|
||||||
#line 95 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" </table>\r\n </div>\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" <script>\r\n $(function () {\r\n var exportDefaultF" +
|
|
||||||
"ields = [\'Name\', \'AddedDate\', \'UserId\', \'UserDisplayName\', \'Comments\'];\r\n " +
|
|
||||||
" var $exportFields = $(\'#DeviceFlag_Export_Fields\');\r\n va" +
|
|
||||||
"r $exportScope = $(\'#DeviceFlag_Export_Scope\');\r\n var $form = $ex" +
|
|
||||||
"portScope.closest(\'form\');\r\n var $exportingDialog = null;\r\n\r\n " +
|
|
||||||
" $exportFields.on(\'click\', \'a.selectAll,a.selectNone\', function () {\r" +
|
|
||||||
"\n var $this = $(this);\r\n\r\n $this.closest(\'" +
|
|
||||||
"tr\').find(\'input\').prop(\'checked\', $this.is(\'.selectAll\'));\r\n\r\n " +
|
|
||||||
" return false;\r\n });\r\n\r\n $(\'#DeviceFlag_Export_F" +
|
|
||||||
"ields_Defaults\').click(function () {\r\n\r\n $exportFields.find(\'" +
|
|
||||||
"input\').prop(\'checked\', false);\r\n\r\n $.each(exportDefaultField" +
|
|
||||||
"s, function (index, value) {\r\n $(\'#Options_\' + value).pro" +
|
|
||||||
"p(\'checked\', true);\r\n });\r\n\r\n return false" +
|
|
||||||
";\r\n });\r\n\r\n // Submit Validation\r\n " +
|
|
||||||
"function submitHandler() {\r\n var exportFieldCount = $exportFi" +
|
|
||||||
"elds.find(\'input:checked\').length;\r\n\r\n if (exportFieldCount >" +
|
|
||||||
" 0) {\r\n\r\n if ($exportingDialog == null) {\r\n " +
|
|
||||||
" $exportingDialog = $(\'#DeviceFlag_Export_Exporting\').dialog({\r\n " +
|
|
||||||
" width: 400,\r\n height" +
|
|
||||||
": 164,\r\n resizable: false,\r\n " +
|
|
||||||
" modal: true,\r\n autoOpen: false\r\n " +
|
|
||||||
" });\r\n }\r\n $e" +
|
|
||||||
"xportingDialog.dialog(\'open\');\r\n\r\n $form[0].submit();\r\n " +
|
|
||||||
" }\r\n else\r\n alert(\'Se" +
|
|
||||||
"lect at least one field to export.\');\r\n }\r\n $.vali" +
|
|
||||||
"dator.unobtrusive.parse($form);\r\n $form.data(\"validator\").setting" +
|
|
||||||
"s.submitHandler = submitHandler;\r\n\r\n $(\'#DeviceFlag_Export_Downlo" +
|
|
||||||
"ad_Dialog\').dialog({\r\n width: 400,\r\n heigh" +
|
|
||||||
"t: 164,\r\n resizable: false,\r\n modal: true," +
|
|
||||||
"\r\n autoOpen: true\r\n });\r\n $(\'#D" +
|
|
||||||
"eviceFlag_Export_Button\').click(function () {\r\n $form.submit(" +
|
|
||||||
");\r\n });\r\n $(\'#DeviceFlag_Export_Save_Button\').cli" +
|
|
||||||
"ck(function () {\r\n $form.attr(\'action\', $form[0].dataset.save" +
|
|
||||||
"action);\r\n $form.submit();\r\n });\r\n " +
|
|
||||||
"});\r\n </script>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 167 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("</div>\r\n");
|
WriteLiteral("</div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 169 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 89 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
if (Model.ExportId.HasValue)
|
if (Model.ExportId.HasValue)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -626,7 +299,7 @@ WriteLiteral("</div>\r\n");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <div");
|
WriteLiteral(" <div");
|
||||||
|
|
||||||
WriteLiteral(" id=\"DeviceFlag_Export_Download_Dialog\"");
|
WriteLiteral(" id=\"Export_Download_Dialog\"");
|
||||||
|
|
||||||
WriteLiteral(" class=\"dialog\"");
|
WriteLiteral(" class=\"dialog\"");
|
||||||
|
|
||||||
@@ -635,13 +308,13 @@ WriteLiteral(" title=\"Export Device Flags\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 172 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 92 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 172 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 92 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
if (Model.ExportResult.RecordCount == 0)
|
if (Model.ExportResult.RecordCount == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -651,7 +324,7 @@ WriteLiteral(">\r\n");
|
|||||||
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 175 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 95 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -662,7 +335,7 @@ WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
|||||||
WriteLiteral(" <h4>");
|
WriteLiteral(" <h4>");
|
||||||
|
|
||||||
|
|
||||||
#line 178 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 98 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
Write(Model.ExportResult.RecordCount);
|
Write(Model.ExportResult.RecordCount);
|
||||||
|
|
||||||
|
|
||||||
@@ -671,7 +344,7 @@ WriteLiteral(" <h4>");
|
|||||||
WriteLiteral(" record");
|
WriteLiteral(" record");
|
||||||
|
|
||||||
|
|
||||||
#line 178 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 98 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
||||||
|
|
||||||
|
|
||||||
@@ -681,14 +354,14 @@ WriteLiteral(" were successfully exported.</h4>\r\n");
|
|||||||
|
|
||||||
WriteLiteral(" <a");
|
WriteLiteral(" <a");
|
||||||
|
|
||||||
WriteAttribute("href", Tuple.Create(" href=\"", 8823), Tuple.Create("\"", 8898)
|
WriteAttribute("href", Tuple.Create(" href=\"", 4299), Tuple.Create("\"", 4374)
|
||||||
|
|
||||||
#line 179 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 99 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 8830), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceFlag.ExportRetrieve(Model.ExportId.Value))
|
, Tuple.Create(Tuple.Create("", 4306), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceFlag.ExportRetrieve(Model.ExportId.Value))
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 8830), false)
|
, 4306), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" class=\"button\"");
|
WriteLiteral(" class=\"button\"");
|
||||||
@@ -700,7 +373,7 @@ WriteLiteral(" class=\"fa fa-download fa-lg\"");
|
|||||||
WriteLiteral("></i>Download Device Flag Export</a>\r\n");
|
WriteLiteral("></i>Download Device Flag Export</a>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 180 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 100 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -710,7 +383,7 @@ WriteLiteral(" </div>\r\n");
|
|||||||
|
|
||||||
WriteLiteral(@" <script>
|
WriteLiteral(@" <script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#DeviceFlag_Export_Download_Dialog')
|
$('#Export_Download_Dialog')
|
||||||
.dialog({
|
.dialog({
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 164,
|
height: 164,
|
||||||
@@ -723,7 +396,7 @@ WriteLiteral(@" <script>
|
|||||||
");
|
");
|
||||||
|
|
||||||
|
|
||||||
#line 194 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 114 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -731,7 +404,7 @@ WriteLiteral(@" <script>
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("<div");
|
WriteLiteral("<div");
|
||||||
|
|
||||||
WriteLiteral(" id=\"DeviceFlag_Export_Exporting\"");
|
WriteLiteral(" id=\"Export_Exporting\"");
|
||||||
|
|
||||||
WriteLiteral(" class=\"dialog\"");
|
WriteLiteral(" class=\"dialog\"");
|
||||||
|
|
||||||
@@ -750,13 +423,13 @@ WriteLiteral(" class=\"actionBar\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 199 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 119 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 199 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 119 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -774,7 +447,7 @@ WriteLiteral(" class=\"button\"");
|
|||||||
WriteLiteral(">Save Export</button>\r\n");
|
WriteLiteral(">Save Export</button>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 202 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 122 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -795,7 +468,7 @@ WriteLiteral(" title=\"Requires Manage Saved Exports Permission\"");
|
|||||||
WriteLiteral(">Save Export</button>\r\n");
|
WriteLiteral(">Save Export</button>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 206 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
#line 126 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
@using Disco.Web.Areas.Config.Models.DocumentTemplate;
|
@using Disco.Web.Areas.Config.Models.DocumentTemplate;
|
||||||
@using Disco.Services.Exporting;
|
|
||||||
@model ExportModel
|
@model ExportModel
|
||||||
@{
|
@{
|
||||||
Authorization.Require(Claims.Config.DocumentTemplate.Export);
|
Authorization.Require(Claims.Config.DocumentTemplate.Export);
|
||||||
@@ -10,7 +9,7 @@
|
|||||||
@using (Html.BeginForm(MVC.API.DocumentTemplate.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.DocumentTemplate.SaveExport()) }))
|
@using (Html.BeginForm(MVC.API.DocumentTemplate.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.DocumentTemplate.SaveExport()) }))
|
||||||
{
|
{
|
||||||
@Html.AntiForgeryToken()
|
@Html.AntiForgeryToken()
|
||||||
<div id="DocumentTemplate_Export_Scope" class="form" style="width: 570px">
|
<div id="Export_Scope" class="form" style="width: 570px">
|
||||||
<h2>Export Scope</h2>
|
<h2>Export Scope</h2>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -58,127 +57,12 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="DocumentTemplate_Export_Fields" class="form" style="width: 570px; margin-top: 15px;">
|
@Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups)
|
||||||
<h2>Export Fields <a id="DocumentTemplate_Export_Fields_Defaults" href="#">(Defaults)</a></h2>
|
|
||||||
<table>
|
|
||||||
@foreach (var optionGroup in Model.Fields.FieldGroups)
|
|
||||||
{
|
|
||||||
var optionFields = optionGroup.ToList();
|
|
||||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
|
||||||
<tr>
|
|
||||||
<th style="width: 120px;">
|
|
||||||
@optionGroup.Name
|
|
||||||
@if (optionFields.Count > 2)
|
|
||||||
{
|
|
||||||
<span style="display: block;" class="select"><a class="selectAll" href="#">ALL</a> | <a class="selectNone" href="#">NONE</a></span>
|
|
||||||
}
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<div class="DocumentTemplate_Export_Fields_Group">
|
|
||||||
<table class="none">
|
|
||||||
<tr>
|
|
||||||
<td style="width: 50%">
|
|
||||||
<ul class="none">
|
|
||||||
@foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
|
||||||
{
|
|
||||||
<li title="@optionItem.Description">
|
|
||||||
<input type="checkbox" id="Options_@optionItem.Name" name="Options.@(optionItem.Key ?? optionItem.Name)" value="@(optionItem.Value ?? "true")" @((optionItem.Checked) ? "checked " : null) /><label for="Options_@optionItem.Name">@optionItem.DisplayName</label>
|
|
||||||
</li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
<td style="width: 50%">
|
|
||||||
<ul class="none">
|
|
||||||
@foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
|
||||||
{
|
|
||||||
<li title="@optionItem.Description">
|
|
||||||
<input type="checkbox" id="Options_@optionItem.Name" name="Options.@(optionItem.Key ?? optionItem.Name)" value="@(optionItem.Value ?? "true")" @((optionItem.Checked) ? "checked " : null) /><label for="Options_@optionItem.Name">@optionItem.DisplayName</label>
|
|
||||||
</li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
}
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
$(function () {
|
|
||||||
var exportDefaultFields = ['Id', 'Description', 'Scope', 'AttachmentId', 'AttachmentCreatedUser', 'AttachmentCreatedDate', 'AttachmentComments', 'DeviceSerialNumber', 'JobId', 'JobStatus', 'JobType', 'UserId', 'UserDisplayName'];
|
|
||||||
var $exportFields = $('#DocumentTemplate_Export_Fields');
|
|
||||||
var $exportScope = $('#DocumentTemplate_Export_Scope');
|
|
||||||
var $form = $exportScope.closest('form');
|
|
||||||
var $exportingDialog = null;
|
|
||||||
|
|
||||||
$exportFields.on('click', 'a.selectAll,a.selectNone', function () {
|
|
||||||
var $this = $(this);
|
|
||||||
|
|
||||||
$this.closest('tr').find('input').prop('checked', $this.is('.selectAll'));
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#DocumentTemplate_Export_Fields_Defaults').click(function () {
|
|
||||||
|
|
||||||
$exportFields.find('input').prop('checked', false);
|
|
||||||
|
|
||||||
$.each(exportDefaultFields, function (index, value) {
|
|
||||||
$('#Options_' + value).prop('checked', true);
|
|
||||||
});
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Submit Validation
|
|
||||||
function submitHandler() {
|
|
||||||
var exportFieldCount = $exportFields.find('input:checked').length;
|
|
||||||
|
|
||||||
if (exportFieldCount > 0) {
|
|
||||||
|
|
||||||
if ($exportingDialog == null) {
|
|
||||||
$exportingDialog = $('#DocumentTemplate_Export_Exporting').dialog({
|
|
||||||
width: 400,
|
|
||||||
height: 164,
|
|
||||||
resizable: false,
|
|
||||||
modal: true,
|
|
||||||
autoOpen: false
|
|
||||||
});
|
|
||||||
}
|
|
||||||
$exportingDialog.dialog('open');
|
|
||||||
|
|
||||||
$form[0].submit();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
alert('Select at least one field to export.');
|
|
||||||
}
|
|
||||||
$.validator.unobtrusive.parse($form);
|
|
||||||
$form.data("validator").settings.submitHandler = submitHandler;
|
|
||||||
|
|
||||||
$('#DocumentTemplate_Export_Download_Dialog').dialog({
|
|
||||||
width: 400,
|
|
||||||
height: 164,
|
|
||||||
resizable: false,
|
|
||||||
modal: true,
|
|
||||||
autoOpen: true
|
|
||||||
});
|
|
||||||
$('#DocumentTemplate_Export_Button').click(function () {
|
|
||||||
$form.submit();
|
|
||||||
});
|
|
||||||
$('#DocumentTemplate_Export_Save_Button').click(function () {
|
|
||||||
$form.attr('action', $form[0].dataset.saveaction);
|
|
||||||
$form.submit();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@if (Model.ExportId.HasValue)
|
@if (Model.ExportId.HasValue)
|
||||||
{
|
{
|
||||||
<div id="DocumentTemplate_Export_Download_Dialog" class="dialog" title="Export Document Instances">
|
<div id="Export_Download_Dialog" class="dialog" title="Export Document Instances">
|
||||||
@if (Model.ExportResult.RecordCount == 0)
|
@if (Model.ExportResult.RecordCount == 0)
|
||||||
{
|
{
|
||||||
<h4>No records matched the filter criteria</h4>
|
<h4>No records matched the filter criteria</h4>
|
||||||
@@ -191,7 +75,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#DocumentTemplate_Export_Download_Dialog')
|
$('#Export_Download_Dialog')
|
||||||
.dialog({
|
.dialog({
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 164,
|
height: 164,
|
||||||
@@ -202,7 +86,7 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
<div id="DocumentTemplate_Export_Exporting" class="dialog" title="Exporting Document Instances...">
|
<div id="Export_Exporting" class="dialog" title="Exporting Document Instances...">
|
||||||
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting document instances...</h4>
|
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting document instances...</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="actionBar">
|
<div class="actionBar">
|
||||||
@@ -216,4 +100,42 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
<button type="button" id="DocumentTemplate_Export_Button" class="button">Export Now</button>
|
<button type="button" id="DocumentTemplate_Export_Button" class="button">Export Now</button>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
const $form = $('#Export_Scope').closest('form');
|
||||||
|
let $exportingDialog = null;
|
||||||
|
|
||||||
|
$.validator.unobtrusive.parse($form);
|
||||||
|
$form.data("validator").settings.submitHandler = function () {
|
||||||
|
const exportFieldCount = $('#Export_Fields').find('input:checked').length;
|
||||||
|
|
||||||
|
if (exportFieldCount > 0) {
|
||||||
|
|
||||||
|
if (!$exportingDialog) {
|
||||||
|
$exportingDialog = $('#Export_Exporting').dialog({
|
||||||
|
width: 400,
|
||||||
|
height: 164,
|
||||||
|
resizable: false,
|
||||||
|
modal: true,
|
||||||
|
autoOpen: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$exportingDialog.dialog('open');
|
||||||
|
|
||||||
|
$form[0].submit();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
alert('Select at least one field to export.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#DocumentTemplate_Export_Button').on('click', function () {
|
||||||
|
$form.submit();
|
||||||
|
});
|
||||||
|
$('#DocumentTemplate_Export_Save_Button').on('click', function () {
|
||||||
|
$form.attr('action', $form[0].dataset.saveaction);
|
||||||
|
$form.submit();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -30,12 +30,6 @@ namespace Disco.Web.Areas.Config.Views.DocumentTemplate
|
|||||||
using Disco.Models.Repository;
|
using Disco.Models.Repository;
|
||||||
using Disco.Services;
|
using Disco.Services;
|
||||||
using Disco.Services.Authorization;
|
using Disco.Services.Authorization;
|
||||||
|
|
||||||
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
using Disco.Services.Exporting;
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
using Disco.Services.Web;
|
using Disco.Services.Web;
|
||||||
using Disco.Web;
|
using Disco.Web;
|
||||||
|
|
||||||
@@ -56,7 +50,7 @@ namespace Disco.Web.Areas.Config.Views.DocumentTemplate
|
|||||||
public override void Execute()
|
public override void Execute()
|
||||||
{
|
{
|
||||||
|
|
||||||
#line 4 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 3 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
|
|
||||||
Authorization.Require(Claims.Config.DocumentTemplate.Export);
|
Authorization.Require(Claims.Config.DocumentTemplate.Export);
|
||||||
|
|
||||||
@@ -72,13 +66,13 @@ WriteLiteral(" id=\"DocumentTemplate_Export\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 10 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 9 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 10 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 9 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
using (Html.BeginForm(MVC.API.DocumentTemplate.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.DocumentTemplate.SaveExport()) }))
|
using (Html.BeginForm(MVC.API.DocumentTemplate.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.DocumentTemplate.SaveExport()) }))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -86,14 +80,14 @@ WriteLiteral(">\r\n");
|
|||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 12 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 11 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
Write(Html.AntiForgeryToken());
|
Write(Html.AntiForgeryToken());
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 12 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 11 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -101,7 +95,7 @@ WriteLiteral(">\r\n");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <div");
|
WriteLiteral(" <div");
|
||||||
|
|
||||||
WriteLiteral(" id=\"DocumentTemplate_Export_Scope\"");
|
WriteLiteral(" id=\"Export_Scope\"");
|
||||||
|
|
||||||
WriteLiteral(" class=\"form\"");
|
WriteLiteral(" class=\"form\"");
|
||||||
|
|
||||||
@@ -124,13 +118,13 @@ WriteLiteral(" class=\"tableData\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 22 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 21 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 22 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 21 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
|
|
||||||
var index = 0;
|
var index = 0;
|
||||||
foreach (var document in Model.DocumentTemplates)
|
foreach (var document in Model.DocumentTemplates)
|
||||||
@@ -145,33 +139,33 @@ WriteLiteral(" <tr>\r\n
|
|||||||
|
|
||||||
WriteLiteral(" type=\"checkbox\"");
|
WriteLiteral(" type=\"checkbox\"");
|
||||||
|
|
||||||
WriteAttribute("id", Tuple.Create(" id=\"", 1353), Tuple.Create("\"", 1392)
|
WriteAttribute("id", Tuple.Create(" id=\"", 1302), Tuple.Create("\"", 1341)
|
||||||
, Tuple.Create(Tuple.Create("", 1358), Tuple.Create("Options_DocumentTemplateIds_", 1358), true)
|
, Tuple.Create(Tuple.Create("", 1307), Tuple.Create("Options_DocumentTemplateIds_", 1307), true)
|
||||||
|
|
||||||
#line 29 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 28 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1386), Tuple.Create<System.Object, System.Int32>(index
|
, Tuple.Create(Tuple.Create("", 1335), Tuple.Create<System.Object, System.Int32>(index
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1386), false)
|
, 1335), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" name=\"Options.DocumentTemplateIds\"");
|
WriteLiteral(" name=\"Options.DocumentTemplateIds\"");
|
||||||
|
|
||||||
WriteAttribute("value", Tuple.Create(" value=\"", 1428), Tuple.Create("\"", 1448)
|
WriteAttribute("value", Tuple.Create(" value=\"", 1377), Tuple.Create("\"", 1397)
|
||||||
|
|
||||||
#line 29 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 28 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1436), Tuple.Create<System.Object, System.Int32>(document.Id
|
, Tuple.Create(Tuple.Create("", 1385), Tuple.Create<System.Object, System.Int32>(document.Id
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1436), false)
|
, 1385), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 29 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 28 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
Write(((bool)Model.Options.DocumentTemplateIds.Contains(document.Id)) ? "checked " : null);
|
Write(((bool)Model.Options.DocumentTemplateIds.Contains(document.Id)) ? "checked " : null);
|
||||||
|
|
||||||
|
|
||||||
@@ -180,7 +174,7 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral(" />\r\n <strong>");
|
WriteLiteral(" />\r\n <strong>");
|
||||||
|
|
||||||
|
|
||||||
#line 30 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 29 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
Write(document.Id);
|
Write(document.Id);
|
||||||
|
|
||||||
|
|
||||||
@@ -190,21 +184,21 @@ WriteLiteral("</strong>\r\n </label>\
|
|||||||
" </td>\r\n <td>\r\n " +
|
" </td>\r\n <td>\r\n " +
|
||||||
" <label");
|
" <label");
|
||||||
|
|
||||||
WriteAttribute("for", Tuple.Create(" for=\"", 1817), Tuple.Create("\"", 1857)
|
WriteAttribute("for", Tuple.Create(" for=\"", 1766), Tuple.Create("\"", 1806)
|
||||||
, Tuple.Create(Tuple.Create("", 1823), Tuple.Create("Options_DocumentTemplateIds_", 1823), true)
|
, Tuple.Create(Tuple.Create("", 1772), Tuple.Create("Options_DocumentTemplateIds_", 1772), true)
|
||||||
|
|
||||||
#line 34 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 33 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1851), Tuple.Create<System.Object, System.Int32>(index
|
, Tuple.Create(Tuple.Create("", 1800), Tuple.Create<System.Object, System.Int32>(index
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1851), false)
|
, 1800), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">");
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
#line 34 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 33 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
Write(document.Description);
|
Write(document.Description);
|
||||||
|
|
||||||
|
|
||||||
@@ -216,7 +210,7 @@ WriteLiteral("</label>\r\n </td>\r\n
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 37 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 36 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
Write(document.Scope);
|
Write(document.Scope);
|
||||||
|
|
||||||
|
|
||||||
@@ -226,7 +220,7 @@ WriteLiteral("\r\n </td>\r\n
|
|||||||
" </tr>\r\n");
|
" </tr>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 40 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 39 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,7 +231,7 @@ WriteLiteral("\r\n </table>\r\n </td>\
|
|||||||
"tr>\r\n <tr>\r\n <th>");
|
"tr>\r\n <tr>\r\n <th>");
|
||||||
|
|
||||||
|
|
||||||
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 46 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
Write(Html.LabelFor(m => m.Options.LatestOnly));
|
Write(Html.LabelFor(m => m.Options.LatestOnly));
|
||||||
|
|
||||||
|
|
||||||
@@ -248,7 +242,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 49 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 48 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
Write(Html.CheckBoxFor(m => m.Options.LatestOnly));
|
Write(Html.CheckBoxFor(m => m.Options.LatestOnly));
|
||||||
|
|
||||||
|
|
||||||
@@ -259,7 +253,7 @@ WriteLiteral("\r\n <p>Uncheck to include all document ins
|
|||||||
" <th>");
|
" <th>");
|
||||||
|
|
||||||
|
|
||||||
#line 54 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 53 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
Write(Html.LabelFor(m => m.Options.Format));
|
Write(Html.LabelFor(m => m.Options.Format));
|
||||||
|
|
||||||
|
|
||||||
@@ -270,7 +264,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 56 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 55 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
Write(Html.DropDownListFor(m => m.Options.Format, Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)).Select(v => new SelectListItem() { Value = v, Text = v })));
|
Write(Html.DropDownListFor(m => m.Options.Format, Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)).Select(v => new SelectListItem() { Value = v, Text = v })));
|
||||||
|
|
||||||
|
|
||||||
@@ -279,390 +273,22 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
||||||
" </div>\r\n");
|
" </div>\r\n");
|
||||||
|
|
||||||
WriteLiteral(" <div");
|
|
||||||
|
|
||||||
WriteLiteral(" id=\"DocumentTemplate_Export_Fields\"");
|
#line 60 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
|
|
||||||
WriteLiteral(" class=\"form\"");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 570px; margin-top: 15px;\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <h2>Export Fields <a");
|
|
||||||
|
|
||||||
WriteLiteral(" id=\"DocumentTemplate_Export_Fields_Defaults\"");
|
|
||||||
|
|
||||||
WriteLiteral(" href=\"#\"");
|
|
||||||
|
|
||||||
WriteLiteral(">(Defaults)</a></h2>\r\n <table>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 64 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 64 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 60 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
foreach (var optionGroup in Model.Fields.FieldGroups)
|
Write(Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups));
|
||||||
{
|
|
||||||
var optionFields = optionGroup.ToList();
|
|
||||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <tr>\r\n <th");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 120px;\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
|
||||||
|
|
||||||
|
|
||||||
#line 70 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
Write(optionGroup.Name);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 71 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 71 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 60 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
if (optionFields.Count > 2)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <span");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"display: block;\"");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"select\"");
|
|
||||||
|
|
||||||
WriteLiteral("><a");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"selectAll\"");
|
|
||||||
|
|
||||||
WriteLiteral(" href=\"#\"");
|
|
||||||
|
|
||||||
WriteLiteral(">ALL</a> | <a");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"selectNone\"");
|
|
||||||
|
|
||||||
WriteLiteral(" href=\"#\"");
|
|
||||||
|
|
||||||
WriteLiteral(">NONE</a></span>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 74 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" </th>\r\n <td>\r\n " +
|
|
||||||
" <div");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"DocumentTemplate_Export_Fields_Group\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <table");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"none\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <tr>\r\n " +
|
|
||||||
" <td");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 50%\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <ul");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"none\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 82 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
#line 82 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <li");
|
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 4509), Tuple.Create("\"", 4540)
|
|
||||||
|
|
||||||
#line 84 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4517), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4517), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <input");
|
|
||||||
|
|
||||||
WriteLiteral(" type=\"checkbox\"");
|
|
||||||
|
|
||||||
WriteAttribute("id", Tuple.Create(" id=\"", 4622), Tuple.Create("\"", 4651)
|
|
||||||
, Tuple.Create(Tuple.Create("", 4627), Tuple.Create("Options_", 4627), true)
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4635), Tuple.Create<System.Object, System.Int32>(optionItem.Name
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4635), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteAttribute("name", Tuple.Create(" name=\"", 4652), Tuple.Create("\"", 4703)
|
|
||||||
, Tuple.Create(Tuple.Create("", 4659), Tuple.Create("Options.", 4659), true)
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4667), Tuple.Create<System.Object, System.Int32>(optionItem.Key ?? optionItem.Name
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4667), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteAttribute("value", Tuple.Create(" value=\"", 4704), Tuple.Create("\"", 4741)
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4712), Tuple.Create<System.Object, System.Int32>(optionItem.Value ?? "true"
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4712), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
|
||||||
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
Write((optionItem.Checked) ? "checked " : null);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" /><label");
|
|
||||||
|
|
||||||
WriteAttribute("for", Tuple.Create(" for=\"", 4795), Tuple.Create("\"", 4825)
|
|
||||||
, Tuple.Create(Tuple.Create("", 4801), Tuple.Create("Options_", 4801), true)
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4809), Tuple.Create<System.Object, System.Int32>(optionItem.Name
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4809), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">");
|
|
||||||
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
Write(optionItem.DisplayName);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("</label>\r\n </li>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 87 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" </ul>\r\n " +
|
|
||||||
" </td>\r\n <td");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 50%\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <ul");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"none\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 92 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
#line 92 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <li");
|
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 5414), Tuple.Create("\"", 5445)
|
|
||||||
|
|
||||||
#line 94 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 5422), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 5422), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <input");
|
|
||||||
|
|
||||||
WriteLiteral(" type=\"checkbox\"");
|
|
||||||
|
|
||||||
WriteAttribute("id", Tuple.Create(" id=\"", 5527), Tuple.Create("\"", 5556)
|
|
||||||
, Tuple.Create(Tuple.Create("", 5532), Tuple.Create("Options_", 5532), true)
|
|
||||||
|
|
||||||
#line 95 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 5540), Tuple.Create<System.Object, System.Int32>(optionItem.Name
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 5540), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteAttribute("name", Tuple.Create(" name=\"", 5557), Tuple.Create("\"", 5608)
|
|
||||||
, Tuple.Create(Tuple.Create("", 5564), Tuple.Create("Options.", 5564), true)
|
|
||||||
|
|
||||||
#line 95 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 5572), Tuple.Create<System.Object, System.Int32>(optionItem.Key ?? optionItem.Name
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 5572), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteAttribute("value", Tuple.Create(" value=\"", 5609), Tuple.Create("\"", 5646)
|
|
||||||
|
|
||||||
#line 95 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 5617), Tuple.Create<System.Object, System.Int32>(optionItem.Value ?? "true"
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 5617), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
|
||||||
|
|
||||||
|
|
||||||
#line 95 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
Write((optionItem.Checked) ? "checked " : null);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" /><label");
|
|
||||||
|
|
||||||
WriteAttribute("for", Tuple.Create(" for=\"", 5700), Tuple.Create("\"", 5730)
|
|
||||||
, Tuple.Create(Tuple.Create("", 5706), Tuple.Create("Options_", 5706), true)
|
|
||||||
|
|
||||||
#line 95 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 5714), Tuple.Create<System.Object, System.Int32>(optionItem.Name
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 5714), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">");
|
|
||||||
|
|
||||||
|
|
||||||
#line 95 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
Write(optionItem.DisplayName);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("</label>\r\n </li>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 97 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(@" </ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
");
|
|
||||||
|
|
||||||
|
|
||||||
#line 105 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" </table>\r\n </div>\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" <script>\r\n $(function () {\r\n var exportDefaultF" +
|
|
||||||
"ields = [\'Id\', \'Description\', \'Scope\', \'AttachmentId\', \'AttachmentCreatedUser\', " +
|
|
||||||
"\'AttachmentCreatedDate\', \'AttachmentComments\', \'DeviceSerialNumber\', \'JobId\', \'J" +
|
|
||||||
"obStatus\', \'JobType\', \'UserId\', \'UserDisplayName\'];\r\n var $export" +
|
|
||||||
"Fields = $(\'#DocumentTemplate_Export_Fields\');\r\n var $exportScope" +
|
|
||||||
" = $(\'#DocumentTemplate_Export_Scope\');\r\n var $form = $exportScop" +
|
|
||||||
"e.closest(\'form\');\r\n var $exportingDialog = null;\r\n\r\n " +
|
|
||||||
" $exportFields.on(\'click\', \'a.selectAll,a.selectNone\', function () {\r\n " +
|
|
||||||
" var $this = $(this);\r\n\r\n $this.closest(\'tr\').fin" +
|
|
||||||
"d(\'input\').prop(\'checked\', $this.is(\'.selectAll\'));\r\n\r\n retur" +
|
|
||||||
"n false;\r\n });\r\n\r\n $(\'#DocumentTemplate_Export_Fie" +
|
|
||||||
"lds_Defaults\').click(function () {\r\n\r\n $exportFields.find(\'in" +
|
|
||||||
"put\').prop(\'checked\', false);\r\n\r\n $.each(exportDefaultFields," +
|
|
||||||
" function (index, value) {\r\n $(\'#Options_\' + value).prop(" +
|
|
||||||
"\'checked\', true);\r\n });\r\n\r\n return false;\r" +
|
|
||||||
"\n });\r\n\r\n // Submit Validation\r\n fu" +
|
|
||||||
"nction submitHandler() {\r\n var exportFieldCount = $exportFiel" +
|
|
||||||
"ds.find(\'input:checked\').length;\r\n\r\n if (exportFieldCount > 0" +
|
|
||||||
") {\r\n\r\n if ($exportingDialog == null) {\r\n " +
|
|
||||||
" $exportingDialog = $(\'#DocumentTemplate_Export_Exporting\').dialog({\r" +
|
|
||||||
"\n width: 400,\r\n he" +
|
|
||||||
"ight: 164,\r\n resizable: false,\r\n " +
|
|
||||||
" modal: true,\r\n autoOpen: false\r\n " +
|
|
||||||
" });\r\n }\r\n " +
|
|
||||||
" $exportingDialog.dialog(\'open\');\r\n\r\n $form[0].submit();" +
|
|
||||||
"\r\n }\r\n else\r\n alert" +
|
|
||||||
"(\'Select at least one field to export.\');\r\n }\r\n $." +
|
|
||||||
"validator.unobtrusive.parse($form);\r\n $form.data(\"validator\").set" +
|
|
||||||
"tings.submitHandler = submitHandler;\r\n\r\n $(\'#DocumentTemplate_Exp" +
|
|
||||||
"ort_Download_Dialog\').dialog({\r\n width: 400,\r\n " +
|
|
||||||
" height: 164,\r\n resizable: false,\r\n mo" +
|
|
||||||
"dal: true,\r\n autoOpen: true\r\n });\r\n " +
|
|
||||||
" $(\'#DocumentTemplate_Export_Button\').click(function () {\r\n " +
|
|
||||||
" $form.submit();\r\n });\r\n $(\'#DocumentTemplate_Ex" +
|
|
||||||
"port_Save_Button\').click(function () {\r\n $form.attr(\'action\'," +
|
|
||||||
" $form[0].dataset.saveaction);\r\n $form.submit();\r\n " +
|
|
||||||
" });\r\n });\r\n </script>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 177 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -671,7 +297,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
|||||||
WriteLiteral("</div>\r\n");
|
WriteLiteral("</div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 179 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 63 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
if (Model.ExportId.HasValue)
|
if (Model.ExportId.HasValue)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -680,7 +306,7 @@ WriteLiteral("</div>\r\n");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <div");
|
WriteLiteral(" <div");
|
||||||
|
|
||||||
WriteLiteral(" id=\"DocumentTemplate_Export_Download_Dialog\"");
|
WriteLiteral(" id=\"Export_Download_Dialog\"");
|
||||||
|
|
||||||
WriteLiteral(" class=\"dialog\"");
|
WriteLiteral(" class=\"dialog\"");
|
||||||
|
|
||||||
@@ -689,13 +315,13 @@ WriteLiteral(" title=\"Export Document Instances\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 182 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 66 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 182 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 66 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
if (Model.ExportResult.RecordCount == 0)
|
if (Model.ExportResult.RecordCount == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -705,7 +331,7 @@ WriteLiteral(">\r\n");
|
|||||||
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 185 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 69 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -716,7 +342,7 @@ WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
|||||||
WriteLiteral(" <h4>");
|
WriteLiteral(" <h4>");
|
||||||
|
|
||||||
|
|
||||||
#line 188 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 72 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
Write(Model.ExportResult.RecordCount);
|
Write(Model.ExportResult.RecordCount);
|
||||||
|
|
||||||
|
|
||||||
@@ -725,7 +351,7 @@ WriteLiteral(" <h4>");
|
|||||||
WriteLiteral(" record");
|
WriteLiteral(" record");
|
||||||
|
|
||||||
|
|
||||||
#line 188 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 72 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
||||||
|
|
||||||
|
|
||||||
@@ -735,14 +361,14 @@ WriteLiteral(" were successfully exported.</h4>\r\n");
|
|||||||
|
|
||||||
WriteLiteral(" <a");
|
WriteLiteral(" <a");
|
||||||
|
|
||||||
WriteAttribute("href", Tuple.Create(" href=\"", 9605), Tuple.Create("\"", 9686)
|
WriteAttribute("href", Tuple.Create(" href=\"", 3517), Tuple.Create("\"", 3598)
|
||||||
|
|
||||||
#line 189 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 73 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 9612), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DocumentTemplate.ExportRetrieve(Model.ExportId.Value))
|
, Tuple.Create(Tuple.Create("", 3524), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DocumentTemplate.ExportRetrieve(Model.ExportId.Value))
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 9612), false)
|
, 3524), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" class=\"button\"");
|
WriteLiteral(" class=\"button\"");
|
||||||
@@ -754,7 +380,7 @@ WriteLiteral(" class=\"fa fa-download fa-lg\"");
|
|||||||
WriteLiteral("></i>Download Document Instance Export</a>\r\n");
|
WriteLiteral("></i>Download Document Instance Export</a>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 190 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 74 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -764,7 +390,7 @@ WriteLiteral(" </div>\r\n");
|
|||||||
|
|
||||||
WriteLiteral(@" <script>
|
WriteLiteral(@" <script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#DocumentTemplate_Export_Download_Dialog')
|
$('#Export_Download_Dialog')
|
||||||
.dialog({
|
.dialog({
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 164,
|
height: 164,
|
||||||
@@ -777,7 +403,7 @@ WriteLiteral(@" <script>
|
|||||||
");
|
");
|
||||||
|
|
||||||
|
|
||||||
#line 204 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 88 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -785,7 +411,7 @@ WriteLiteral(@" <script>
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("<div");
|
WriteLiteral("<div");
|
||||||
|
|
||||||
WriteLiteral(" id=\"DocumentTemplate_Export_Exporting\"");
|
WriteLiteral(" id=\"Export_Exporting\"");
|
||||||
|
|
||||||
WriteLiteral(" class=\"dialog\"");
|
WriteLiteral(" class=\"dialog\"");
|
||||||
|
|
||||||
@@ -804,13 +430,13 @@ WriteLiteral(" class=\"actionBar\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 209 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 93 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 209 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 93 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -828,7 +454,7 @@ WriteLiteral(" class=\"button\"");
|
|||||||
WriteLiteral(">Save Export</button>\r\n");
|
WriteLiteral(">Save Export</button>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 212 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 96 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -849,7 +475,7 @@ WriteLiteral(" title=\"Requires Manage Saved Exports Permission\"");
|
|||||||
WriteLiteral(">Save Export</button>\r\n");
|
WriteLiteral(">Save Export</button>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 216 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
#line 100 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -863,7 +489,47 @@ WriteLiteral(" id=\"DocumentTemplate_Export_Button\"");
|
|||||||
|
|
||||||
WriteLiteral(" class=\"button\"");
|
WriteLiteral(" class=\"button\"");
|
||||||
|
|
||||||
WriteLiteral(">Export Now</button>\r\n</div>\r\n");
|
WriteLiteral(@">Export Now</button>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
const $form = $('#Export_Scope').closest('form');
|
||||||
|
let $exportingDialog = null;
|
||||||
|
|
||||||
|
$.validator.unobtrusive.parse($form);
|
||||||
|
$form.data(""validator"").settings.submitHandler = function () {
|
||||||
|
const exportFieldCount = $('#Export_Fields').find('input:checked').length;
|
||||||
|
|
||||||
|
if (exportFieldCount > 0) {
|
||||||
|
|
||||||
|
if (!$exportingDialog) {
|
||||||
|
$exportingDialog = $('#Export_Exporting').dialog({
|
||||||
|
width: 400,
|
||||||
|
height: 164,
|
||||||
|
resizable: false,
|
||||||
|
modal: true,
|
||||||
|
autoOpen: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$exportingDialog.dialog('open');
|
||||||
|
|
||||||
|
$form[0].submit();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
alert('Select at least one field to export.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#DocumentTemplate_Export_Button').on('click', function () {
|
||||||
|
$form.submit();
|
||||||
|
});
|
||||||
|
$('#DocumentTemplate_Export_Save_Button').on('click', function () {
|
||||||
|
$form.attr('action', $form[0].dataset.saveaction);
|
||||||
|
$form.submit();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,6 @@
|
|||||||
Authorization.RequireAny(Claims.Config.UserFlag.Export);
|
Authorization.RequireAny(Claims.Config.UserFlag.Export);
|
||||||
|
|
||||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags", MVC.Config.UserFlag.Index(null), "Export");
|
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags", MVC.Config.UserFlag.Index(null), "Export");
|
||||||
|
|
||||||
var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData);
|
|
||||||
var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool) && p.PropertyName != "CurrentOnly")
|
|
||||||
.GroupBy(m => m.ShortDisplayName);
|
|
||||||
}
|
}
|
||||||
<div id="UserFlag_Export">
|
<div id="UserFlag_Export">
|
||||||
@using (Html.BeginForm(MVC.API.UserFlag.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.UserFlag.SaveExport()) }))
|
@using (Html.BeginForm(MVC.API.UserFlag.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.UserFlag.SaveExport()) }))
|
||||||
@@ -48,89 +44,21 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="UserFlag_Export_Fields" class="form" style="width: 570px; margin-top: 15px;">
|
@Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups)
|
||||||
<h2>Export Fields <a id="UserFlag_Export_Fields_Defaults" href="#">(Defaults)</a></h2>
|
|
||||||
<table>
|
|
||||||
@foreach (var optionGroup in optionGroups)
|
|
||||||
{
|
|
||||||
var optionFields = optionGroup.ToList();
|
|
||||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
|
||||||
<tr>
|
|
||||||
<th style="width: 120px;">
|
|
||||||
@optionGroup.Key
|
|
||||||
@if (optionFields.Count > 2)
|
|
||||||
{
|
|
||||||
<span style="display: block;" class="select"><a class="selectAll" href="#">ALL</a> | <a class="selectNone" href="#">NONE</a></span>
|
|
||||||
}
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<div class="UserFlag_Export_Fields_Group">
|
|
||||||
<table class="none">
|
|
||||||
<tr>
|
|
||||||
<td style="width: 50%">
|
|
||||||
<ul class="none">
|
|
||||||
@foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
|
||||||
{
|
|
||||||
<li title="@optionItem.Description">
|
|
||||||
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
|
|
||||||
</li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
<td style="width: 50%">
|
|
||||||
<ul class="none">
|
|
||||||
@foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
|
||||||
{
|
|
||||||
<li title="@optionItem.Description">
|
|
||||||
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
|
|
||||||
</li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
}
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
var exportDefaultFields = ['Name', 'AddedDate', 'UserId', 'UserDisplayName', 'Comments'];
|
const $exportFields = $('#Export_Fields');
|
||||||
var $exportFields = $('#UserFlag_Export_Fields');
|
const $form = $exportFields.closest('form');
|
||||||
var $exportScope = $('#UserFlag_Export_Scope');
|
let $exportingDialog = null;
|
||||||
var $form = $exportScope.closest('form');
|
|
||||||
var $exportingDialog = null;
|
|
||||||
|
|
||||||
$exportFields.on('click', 'a.selectAll,a.selectNone', function () {
|
$.validator.unobtrusive.parse($form);
|
||||||
var $this = $(this);
|
$form.data("validator").settings.submitHandler = function () {
|
||||||
|
const exportFieldCount = $exportFields.find('input:checked').length;
|
||||||
$this.closest('tr').find('input').prop('checked', $this.is('.selectAll'));
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#UserFlag_Export_Fields_Defaults').click(function () {
|
|
||||||
|
|
||||||
$exportFields.find('input').prop('checked', false);
|
|
||||||
|
|
||||||
$.each(exportDefaultFields, function (index, value) {
|
|
||||||
$('#Options_' + value).prop('checked', true);
|
|
||||||
});
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Submit Validation
|
|
||||||
function submitHandler() {
|
|
||||||
var exportFieldCount = $exportFields.find('input:checked').length;
|
|
||||||
|
|
||||||
if (exportFieldCount > 0) {
|
if (exportFieldCount > 0) {
|
||||||
|
|
||||||
if ($exportingDialog == null) {
|
if ($exportingDialog == null) {
|
||||||
$exportingDialog = $('#UserFlag_Export_Exporting').dialog({
|
$exportingDialog = $('#Export_Exporting').dialog({
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 164,
|
height: 164,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
@@ -141,24 +69,16 @@
|
|||||||
$exportingDialog.dialog('open');
|
$exportingDialog.dialog('open');
|
||||||
|
|
||||||
$form[0].submit();
|
$form[0].submit();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
alert('Select at least one field to export.');
|
|
||||||
}
|
|
||||||
$.validator.unobtrusive.parse($form);
|
|
||||||
$form.data("validator").settings.submitHandler = submitHandler;
|
|
||||||
|
|
||||||
$('#UserFlag_Export_Download_Dialog').dialog({
|
alert('Select at least one field to export.');
|
||||||
width: 400,
|
};
|
||||||
height: 164,
|
|
||||||
resizable: false,
|
$('#UserFlag_Export_Button').on('click', function () {
|
||||||
modal: true,
|
|
||||||
autoOpen: true
|
|
||||||
});
|
|
||||||
$('#UserFlag_Export_Button').click(function () {
|
|
||||||
$form.submit();
|
$form.submit();
|
||||||
});
|
});
|
||||||
$('#UserFlag_Export_Save_Button').click(function () {
|
$('#UserFlag_Export_Save_Button').on('click', function () {
|
||||||
$form.attr('action', $form[0].dataset.saveaction);
|
$form.attr('action', $form[0].dataset.saveaction);
|
||||||
$form.submit();
|
$form.submit();
|
||||||
});
|
});
|
||||||
@@ -168,7 +88,7 @@
|
|||||||
</div>
|
</div>
|
||||||
@if (Model.ExportId.HasValue)
|
@if (Model.ExportId.HasValue)
|
||||||
{
|
{
|
||||||
<div id="UserFlag_Export_Download_Dialog" class="dialog" title="Export User Flags">
|
<div id="Export_Download_Dialog" class="dialog" title="Export User Flags">
|
||||||
@if (Model.ExportResult.RecordCount == 0)
|
@if (Model.ExportResult.RecordCount == 0)
|
||||||
{
|
{
|
||||||
<h4>No records matched the filter criteria</h4>
|
<h4>No records matched the filter criteria</h4>
|
||||||
@@ -181,7 +101,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#UserFlag_Export_Download_Dialog')
|
$('#Export_Download_Dialog')
|
||||||
.dialog({
|
.dialog({
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 164,
|
height: 164,
|
||||||
@@ -192,7 +112,7 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
<div id="UserFlag_Export_Exporting" class="dialog" title="Exporting User Flags...">
|
<div id="Export_Exporting" class="dialog" title="Exporting User Flags...">
|
||||||
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting user flags...</h4>
|
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting user flags...</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="actionBar">
|
<div class="actionBar">
|
||||||
|
|||||||
@@ -56,10 +56,6 @@ namespace Disco.Web.Areas.Config.Views.UserFlag
|
|||||||
|
|
||||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags", MVC.Config.UserFlag.Index(null), "Export");
|
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags", MVC.Config.UserFlag.Index(null), "Export");
|
||||||
|
|
||||||
var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData);
|
|
||||||
var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool) && p.PropertyName != "CurrentOnly")
|
|
||||||
.GroupBy(m => m.ShortDisplayName);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
@@ -70,13 +66,13 @@ WriteLiteral(" id=\"UserFlag_Export\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 13 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 9 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 13 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 9 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
using (Html.BeginForm(MVC.API.UserFlag.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.UserFlag.SaveExport()) }))
|
using (Html.BeginForm(MVC.API.UserFlag.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.UserFlag.SaveExport()) }))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -84,14 +80,14 @@ WriteLiteral(">\r\n");
|
|||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 15 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 11 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
Write(Html.AntiForgeryToken());
|
Write(Html.AntiForgeryToken());
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 15 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 11 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -114,13 +110,13 @@ WriteLiteral(">\r\n User Flags:\r\n </
|
|||||||
" <td>\r\n");
|
" <td>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 24 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 20 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 24 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 20 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
foreach (var userFlag in Model.UserFlags)
|
foreach (var userFlag in Model.UserFlags)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -136,20 +132,20 @@ WriteLiteral(" id=\"Options_UserFlagIds\"");
|
|||||||
|
|
||||||
WriteLiteral(" name=\"Options.UserFlagIds\"");
|
WriteLiteral(" name=\"Options.UserFlagIds\"");
|
||||||
|
|
||||||
WriteAttribute("value", Tuple.Create(" value=\"", 1355), Tuple.Create("\"", 1375)
|
WriteAttribute("value", Tuple.Create(" value=\"", 1064), Tuple.Create("\"", 1084)
|
||||||
|
|
||||||
#line 28 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 24 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1363), Tuple.Create<System.Object, System.Int32>(userFlag.Id
|
, Tuple.Create(Tuple.Create("", 1072), Tuple.Create<System.Object, System.Int32>(userFlag.Id
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1363), false)
|
, 1072), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 28 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 24 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
Write(((bool)Model.Options.UserFlagIds.Contains(userFlag.Id)) ? "checked " : null);
|
Write(((bool)Model.Options.UserFlagIds.Contains(userFlag.Id)) ? "checked " : null);
|
||||||
|
|
||||||
|
|
||||||
@@ -157,31 +153,31 @@ WriteLiteral(" ");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" />\r\n <i");
|
WriteLiteral(" />\r\n <i");
|
||||||
|
|
||||||
WriteAttribute("class", Tuple.Create(" class=\"", 1498), Tuple.Create("\"", 1559)
|
WriteAttribute("class", Tuple.Create(" class=\"", 1207), Tuple.Create("\"", 1268)
|
||||||
, Tuple.Create(Tuple.Create("", 1506), Tuple.Create("fa", 1506), true)
|
, Tuple.Create(Tuple.Create("", 1215), Tuple.Create("fa", 1215), true)
|
||||||
, Tuple.Create(Tuple.Create(" ", 1508), Tuple.Create("fa-", 1509), true)
|
, Tuple.Create(Tuple.Create(" ", 1217), Tuple.Create("fa-", 1218), true)
|
||||||
|
|
||||||
#line 29 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 25 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1512), Tuple.Create<System.Object, System.Int32>(userFlag.Icon
|
, Tuple.Create(Tuple.Create("", 1221), Tuple.Create<System.Object, System.Int32>(userFlag.Icon
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1512), false)
|
, 1221), false)
|
||||||
, Tuple.Create(Tuple.Create(" ", 1528), Tuple.Create("fa-lg", 1529), true)
|
, Tuple.Create(Tuple.Create(" ", 1237), Tuple.Create("fa-lg", 1238), true)
|
||||||
, Tuple.Create(Tuple.Create(" ", 1534), Tuple.Create("d-", 1535), true)
|
, Tuple.Create(Tuple.Create(" ", 1243), Tuple.Create("d-", 1244), true)
|
||||||
|
|
||||||
#line 29 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 25 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1537), Tuple.Create<System.Object, System.Int32>(userFlag.IconColour
|
, Tuple.Create(Tuple.Create("", 1246), Tuple.Create<System.Object, System.Int32>(userFlag.IconColour
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1537), false)
|
, 1246), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral("></i>\r\n <span>");
|
WriteLiteral("></i>\r\n <span>");
|
||||||
|
|
||||||
|
|
||||||
#line 30 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 26 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
Write(userFlag.Name);
|
Write(userFlag.Name);
|
||||||
|
|
||||||
|
|
||||||
@@ -191,7 +187,7 @@ WriteLiteral("</span>\r\n </label>\r\n
|
|||||||
"div>\r\n");
|
"div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 33 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 29 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -201,7 +197,7 @@ WriteLiteral(" </td>\r\n </tr>\r\n
|
|||||||
" <th>");
|
" <th>");
|
||||||
|
|
||||||
|
|
||||||
#line 37 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 33 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
Write(Html.LabelFor(m => m.Options.CurrentOnly));
|
Write(Html.LabelFor(m => m.Options.CurrentOnly));
|
||||||
|
|
||||||
|
|
||||||
@@ -212,7 +208,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 39 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 35 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
Write(Html.CheckBoxFor(m => m.Options.CurrentOnly));
|
Write(Html.CheckBoxFor(m => m.Options.CurrentOnly));
|
||||||
|
|
||||||
|
|
||||||
@@ -223,7 +219,7 @@ WriteLiteral("\r\n <p>Uncheck to include all historical u
|
|||||||
"\r\n <th>");
|
"\r\n <th>");
|
||||||
|
|
||||||
|
|
||||||
#line 44 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 40 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
Write(Html.LabelFor(m => m.Options.Format));
|
Write(Html.LabelFor(m => m.Options.Format));
|
||||||
|
|
||||||
|
|
||||||
@@ -234,7 +230,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 46 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 42 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
Write(Html.DropDownListFor(m => m.Options.Format, Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)).Select(v => new SelectListItem() { Value = v, Text = v })));
|
Write(Html.DropDownListFor(m => m.Options.Format, Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)).Select(v => new SelectListItem() { Value = v, Text = v })));
|
||||||
|
|
||||||
|
|
||||||
@@ -243,381 +239,58 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
||||||
" </div>\r\n");
|
" </div>\r\n");
|
||||||
|
|
||||||
WriteLiteral(" <div");
|
|
||||||
|
|
||||||
WriteLiteral(" id=\"UserFlag_Export_Fields\"");
|
#line 47 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
|
|
||||||
WriteLiteral(" class=\"form\"");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 570px; margin-top: 15px;\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <h2>Export Fields <a");
|
|
||||||
|
|
||||||
WriteLiteral(" id=\"UserFlag_Export_Fields_Defaults\"");
|
|
||||||
|
|
||||||
WriteLiteral(" href=\"#\"");
|
|
||||||
|
|
||||||
WriteLiteral(">(Defaults)</a></h2>\r\n <table>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 54 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 54 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 47 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
foreach (var optionGroup in optionGroups)
|
Write(Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups));
|
||||||
{
|
|
||||||
var optionFields = optionGroup.ToList();
|
|
||||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <tr>\r\n <th");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 120px;\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
|
||||||
|
|
||||||
|
|
||||||
#line 60 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
Write(optionGroup.Key);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 61 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 61 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 47 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
if (optionFields.Count > 2)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <span");
|
WriteLiteral(" <script>\r\n $(function () {\r\n const $exportField" +
|
||||||
|
"s = $(\'#Export_Fields\');\r\n const $form = $exportFields.closest(\'f" +
|
||||||
WriteLiteral(" style=\"display: block;\"");
|
"orm\');\r\n let $exportingDialog = null;\r\n\r\n $.valida" +
|
||||||
|
"tor.unobtrusive.parse($form);\r\n $form.data(\"validator\").settings." +
|
||||||
WriteLiteral(" class=\"select\"");
|
"submitHandler = function () {\r\n const exportFieldCount = $exp" +
|
||||||
|
"ortFields.find(\'input:checked\').length;\r\n\r\n if (exportFieldCo" +
|
||||||
WriteLiteral("><a");
|
"unt > 0) {\r\n\r\n if ($exportingDialog == null) {\r\n " +
|
||||||
|
" $exportingDialog = $(\'#Export_Exporting\').dialog({\r\n " +
|
||||||
WriteLiteral(" class=\"selectAll\"");
|
" width: 400,\r\n height: 164," +
|
||||||
|
"\r\n resizable: false,\r\n " +
|
||||||
WriteLiteral(" href=\"#\"");
|
" modal: true,\r\n autoOpen: false\r\n " +
|
||||||
|
" });\r\n }\r\n $exporti" +
|
||||||
WriteLiteral(">ALL</a> | <a");
|
"ngDialog.dialog(\'open\');\r\n\r\n $form[0].submit();\r\n " +
|
||||||
|
" return;\r\n }\r\n\r\n alert(\'Sel" +
|
||||||
WriteLiteral(" class=\"selectNone\"");
|
"ect at least one field to export.\');\r\n };\r\n\r\n $(\'#" +
|
||||||
|
"UserFlag_Export_Button\').on(\'click\', function () {\r\n $form.su" +
|
||||||
WriteLiteral(" href=\"#\"");
|
"bmit();\r\n });\r\n $(\'#UserFlag_Export_Save_Button\')." +
|
||||||
|
"on(\'click\', function () {\r\n $form.attr(\'action\', $form[0].dat" +
|
||||||
WriteLiteral(">NONE</a></span>\r\n");
|
"aset.saveaction);\r\n $form.submit();\r\n });\r\n " +
|
||||||
|
" });\r\n </script>\r\n");
|
||||||
|
|
||||||
#line 64 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" </th>\r\n <td>\r\n " +
|
|
||||||
" <div");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"UserFlag_Export_Fields_Group\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <table");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"none\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <tr>\r\n " +
|
|
||||||
" <td");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 50%\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <ul");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"none\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 72 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
#line 72 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <li");
|
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 3945), Tuple.Create("\"", 3976)
|
|
||||||
|
|
||||||
#line 74 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 3953), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 3953), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <input");
|
|
||||||
|
|
||||||
WriteLiteral(" type=\"checkbox\"");
|
|
||||||
|
|
||||||
WriteAttribute("id", Tuple.Create(" id=\"", 4058), Tuple.Create("\"", 4095)
|
|
||||||
, Tuple.Create(Tuple.Create("", 4063), Tuple.Create("Options_", 4063), true)
|
|
||||||
|
|
||||||
#line 75 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4071), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4071), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteAttribute("name", Tuple.Create(" name=\"", 4096), Tuple.Create("\"", 4135)
|
|
||||||
, Tuple.Create(Tuple.Create("", 4103), Tuple.Create("Options.", 4103), true)
|
|
||||||
|
|
||||||
#line 75 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4111), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4111), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(" value=\"true\"");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
|
||||||
|
|
||||||
|
|
||||||
#line 75 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
Write(((bool)optionItem.Model) ? "checked " : null);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" /><label");
|
|
||||||
|
|
||||||
WriteAttribute("for", Tuple.Create(" for=\"", 4206), Tuple.Create("\"", 4244)
|
|
||||||
, Tuple.Create(Tuple.Create("", 4212), Tuple.Create("Options_", 4212), true)
|
|
||||||
|
|
||||||
#line 75 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4220), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4220), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">");
|
|
||||||
|
|
||||||
|
|
||||||
#line 75 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
Write(optionItem.DisplayName);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("</label>\r\n </li>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 77 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" </ul>\r\n " +
|
|
||||||
" </td>\r\n <td");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 50%\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <ul");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"none\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 82 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
#line 82 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <li");
|
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 4833), Tuple.Create("\"", 4864)
|
|
||||||
|
|
||||||
#line 84 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4841), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4841), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <input");
|
|
||||||
|
|
||||||
WriteLiteral(" type=\"checkbox\"");
|
|
||||||
|
|
||||||
WriteAttribute("id", Tuple.Create(" id=\"", 4946), Tuple.Create("\"", 4983)
|
|
||||||
, Tuple.Create(Tuple.Create("", 4951), Tuple.Create("Options_", 4951), true)
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4959), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4959), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteAttribute("name", Tuple.Create(" name=\"", 4984), Tuple.Create("\"", 5023)
|
|
||||||
, Tuple.Create(Tuple.Create("", 4991), Tuple.Create("Options.", 4991), true)
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4999), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4999), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(" value=\"true\"");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
|
||||||
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
Write(((bool)optionItem.Model) ? "checked " : null);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" /><label");
|
|
||||||
|
|
||||||
WriteAttribute("for", Tuple.Create(" for=\"", 5094), Tuple.Create("\"", 5132)
|
|
||||||
, Tuple.Create(Tuple.Create("", 5100), Tuple.Create("Options_", 5100), true)
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 5108), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 5108), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">");
|
|
||||||
|
|
||||||
|
|
||||||
#line 85 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
Write(optionItem.DisplayName);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("</label>\r\n </li>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 87 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 87 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(@" </ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
");
|
|
||||||
|
|
||||||
|
|
||||||
#line 95 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" </table>\r\n </div>\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" <script>\r\n $(function () {\r\n var exportDefaultF" +
|
|
||||||
"ields = [\'Name\', \'AddedDate\', \'UserId\', \'UserDisplayName\', \'Comments\'];\r\n " +
|
|
||||||
" var $exportFields = $(\'#UserFlag_Export_Fields\');\r\n var " +
|
|
||||||
"$exportScope = $(\'#UserFlag_Export_Scope\');\r\n var $form = $export" +
|
|
||||||
"Scope.closest(\'form\');\r\n var $exportingDialog = null;\r\n\r\n " +
|
|
||||||
" $exportFields.on(\'click\', \'a.selectAll,a.selectNone\', function () {\r\n " +
|
|
||||||
" var $this = $(this);\r\n\r\n $this.closest(\'tr\')" +
|
|
||||||
".find(\'input\').prop(\'checked\', $this.is(\'.selectAll\'));\r\n\r\n r" +
|
|
||||||
"eturn false;\r\n });\r\n\r\n $(\'#UserFlag_Export_Fields_" +
|
|
||||||
"Defaults\').click(function () {\r\n\r\n $exportFields.find(\'input\'" +
|
|
||||||
").prop(\'checked\', false);\r\n\r\n $.each(exportDefaultFields, fun" +
|
|
||||||
"ction (index, value) {\r\n $(\'#Options_\' + value).prop(\'che" +
|
|
||||||
"cked\', true);\r\n });\r\n\r\n return false;\r\n " +
|
|
||||||
" });\r\n\r\n // Submit Validation\r\n functi" +
|
|
||||||
"on submitHandler() {\r\n var exportFieldCount = $exportFields.f" +
|
|
||||||
"ind(\'input:checked\').length;\r\n\r\n if (exportFieldCount > 0) {\r" +
|
|
||||||
"\n\r\n if ($exportingDialog == null) {\r\n " +
|
|
||||||
" $exportingDialog = $(\'#UserFlag_Export_Exporting\').dialog({\r\n " +
|
|
||||||
" width: 400,\r\n height: 164,\r\n" +
|
|
||||||
" resizable: false,\r\n " +
|
|
||||||
" modal: true,\r\n autoOpen: false\r\n " +
|
|
||||||
" });\r\n }\r\n $exporting" +
|
|
||||||
"Dialog.dialog(\'open\');\r\n\r\n $form[0].submit();\r\n " +
|
|
||||||
" }\r\n else\r\n alert(\'Select at " +
|
|
||||||
"least one field to export.\');\r\n }\r\n $.validator.un" +
|
|
||||||
"obtrusive.parse($form);\r\n $form.data(\"validator\").settings.submit" +
|
|
||||||
"Handler = submitHandler;\r\n\r\n $(\'#UserFlag_Export_Download_Dialog\'" +
|
|
||||||
").dialog({\r\n width: 400,\r\n height: 164,\r\n " +
|
|
||||||
" resizable: false,\r\n modal: true,\r\n " +
|
|
||||||
" autoOpen: true\r\n });\r\n $(\'#UserFlag_Ex" +
|
|
||||||
"port_Button\').click(function () {\r\n $form.submit();\r\n " +
|
|
||||||
" });\r\n $(\'#UserFlag_Export_Save_Button\').click(function ()" +
|
|
||||||
" {\r\n $form.attr(\'action\', $form[0].dataset.saveaction);\r\n " +
|
|
||||||
" $form.submit();\r\n });\r\n });\r\n <" +
|
|
||||||
"/script>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 167 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("</div>\r\n");
|
WriteLiteral("</div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 169 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 89 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
if (Model.ExportId.HasValue)
|
if (Model.ExportId.HasValue)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -626,7 +299,7 @@ WriteLiteral("</div>\r\n");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <div");
|
WriteLiteral(" <div");
|
||||||
|
|
||||||
WriteLiteral(" id=\"UserFlag_Export_Download_Dialog\"");
|
WriteLiteral(" id=\"Export_Download_Dialog\"");
|
||||||
|
|
||||||
WriteLiteral(" class=\"dialog\"");
|
WriteLiteral(" class=\"dialog\"");
|
||||||
|
|
||||||
@@ -635,13 +308,13 @@ WriteLiteral(" title=\"Export User Flags\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 172 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 92 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 172 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 92 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
if (Model.ExportResult.RecordCount == 0)
|
if (Model.ExportResult.RecordCount == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -651,7 +324,7 @@ WriteLiteral(">\r\n");
|
|||||||
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 175 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 95 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -662,7 +335,7 @@ WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
|||||||
WriteLiteral(" <h4>");
|
WriteLiteral(" <h4>");
|
||||||
|
|
||||||
|
|
||||||
#line 178 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 98 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
Write(Model.ExportResult.RecordCount);
|
Write(Model.ExportResult.RecordCount);
|
||||||
|
|
||||||
|
|
||||||
@@ -671,7 +344,7 @@ WriteLiteral(" <h4>");
|
|||||||
WriteLiteral(" record");
|
WriteLiteral(" record");
|
||||||
|
|
||||||
|
|
||||||
#line 178 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 98 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
||||||
|
|
||||||
|
|
||||||
@@ -681,14 +354,14 @@ WriteLiteral(" were successfully exported.</h4>\r\n");
|
|||||||
|
|
||||||
WriteLiteral(" <a");
|
WriteLiteral(" <a");
|
||||||
|
|
||||||
WriteAttribute("href", Tuple.Create(" href=\"", 8795), Tuple.Create("\"", 8868)
|
WriteAttribute("href", Tuple.Create(" href=\"", 4296), Tuple.Create("\"", 4369)
|
||||||
|
|
||||||
#line 179 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 99 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 8802), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.UserFlag.ExportRetrieve(Model.ExportId.Value))
|
, Tuple.Create(Tuple.Create("", 4303), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.UserFlag.ExportRetrieve(Model.ExportId.Value))
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 8802), false)
|
, 4303), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" class=\"button\"");
|
WriteLiteral(" class=\"button\"");
|
||||||
@@ -700,7 +373,7 @@ WriteLiteral(" class=\"fa fa-download fa-lg\"");
|
|||||||
WriteLiteral("></i>Download User Flag Export</a>\r\n");
|
WriteLiteral("></i>Download User Flag Export</a>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 180 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 100 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -710,7 +383,7 @@ WriteLiteral(" </div>\r\n");
|
|||||||
|
|
||||||
WriteLiteral(@" <script>
|
WriteLiteral(@" <script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#UserFlag_Export_Download_Dialog')
|
$('#Export_Download_Dialog')
|
||||||
.dialog({
|
.dialog({
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 164,
|
height: 164,
|
||||||
@@ -723,7 +396,7 @@ WriteLiteral(@" <script>
|
|||||||
");
|
");
|
||||||
|
|
||||||
|
|
||||||
#line 194 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 114 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -731,7 +404,7 @@ WriteLiteral(@" <script>
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("<div");
|
WriteLiteral("<div");
|
||||||
|
|
||||||
WriteLiteral(" id=\"UserFlag_Export_Exporting\"");
|
WriteLiteral(" id=\"Export_Exporting\"");
|
||||||
|
|
||||||
WriteLiteral(" class=\"dialog\"");
|
WriteLiteral(" class=\"dialog\"");
|
||||||
|
|
||||||
@@ -750,13 +423,13 @@ WriteLiteral(" class=\"actionBar\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 199 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 119 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 199 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 119 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -774,7 +447,7 @@ WriteLiteral(" class=\"button\"");
|
|||||||
WriteLiteral(">Save Export</button>\r\n");
|
WriteLiteral(">Save Export</button>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 202 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 122 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -795,7 +468,7 @@ WriteLiteral(" title=\"Requires Manage Saved Exports Permission\"");
|
|||||||
WriteLiteral(">Save Export</button>\r\n");
|
WriteLiteral(">Save Export</button>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 206 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
#line 126 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4721,6 +4721,7 @@ header .watermark,
|
|||||||
background-color: #888;
|
background-color: #888;
|
||||||
}
|
}
|
||||||
#QuickSearchMenu {
|
#QuickSearchMenu {
|
||||||
|
width: 190px !important;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
background: none;
|
background: none;
|
||||||
@@ -4750,6 +4751,9 @@ header .watermark,
|
|||||||
position: relative;
|
position: relative;
|
||||||
border-left: 1px solid #D1D1D1;
|
border-left: 1px solid #D1D1D1;
|
||||||
border-right: 1px solid #D1D1D1;
|
border-right: 1px solid #D1D1D1;
|
||||||
|
overflow-x: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
#layout_PageHeading a {
|
#layout_PageHeading a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -6038,3 +6042,31 @@ i.clipboard-button {
|
|||||||
i.clipboard-button:hover {
|
i.clipboard-button:hover {
|
||||||
color: #9e9e9e;
|
color: #9e9e9e;
|
||||||
}
|
}
|
||||||
|
#Export_Exporting {
|
||||||
|
padding-top: 50px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#Export_Exporting i {
|
||||||
|
margin-right: 10px;
|
||||||
|
color: #1e6dab;
|
||||||
|
}
|
||||||
|
#Export_Download_Dialog {
|
||||||
|
padding-top: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#Export_Download_Dialog h4 {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
#Export_Download_Dialog a {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
#Export_Fields #Export_Fields_Defaults {
|
||||||
|
font-size: 0.75em;
|
||||||
|
}
|
||||||
|
#Export_Fields th {
|
||||||
|
font-size: 1.05em;
|
||||||
|
}
|
||||||
|
#Export_Fields th span {
|
||||||
|
margin-top: 4px;
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1827,24 +1827,6 @@ h1.Config_DocumentTemplates {
|
|||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
#UserFlag_Export_Download_Dialog {
|
|
||||||
padding-top: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
#UserFlag_Export_Download_Dialog h4 {
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
#UserFlag_Export_Download_Dialog a {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
#UserFlag_Export_Exporting {
|
|
||||||
padding-top: 50px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
#UserFlag_Export_Exporting i {
|
|
||||||
margin-right: 10px;
|
|
||||||
color: #1e6dab;
|
|
||||||
}
|
|
||||||
#Config_DeviceFlags_Show #DeviceFlag_OnAssignmentExpression,
|
#Config_DeviceFlags_Show #DeviceFlag_OnAssignmentExpression,
|
||||||
#Config_DeviceFlags_Show #DeviceFlag_OnUnassignmentExpression {
|
#Config_DeviceFlags_Show #DeviceFlag_OnUnassignmentExpression {
|
||||||
height: 16px;
|
height: 16px;
|
||||||
@@ -1975,34 +1957,6 @@ h1.Config_DocumentTemplates {
|
|||||||
#Config_DeviceFlags_BulkAssign_AssignDialog.loading > form {
|
#Config_DeviceFlags_BulkAssign_AssignDialog.loading > form {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#DeviceFlag_Export #DeviceFlag_Export_Fields #DeviceFlag_Export_Fields_Defaults {
|
|
||||||
font-size: 0.75em;
|
|
||||||
}
|
|
||||||
#DeviceFlag_Export #DeviceFlag_Export_Fields th {
|
|
||||||
font-size: 1.05em;
|
|
||||||
}
|
|
||||||
#DeviceFlag_Export #DeviceFlag_Export_Fields th span {
|
|
||||||
margin-top: 4px;
|
|
||||||
font-size: 0.8em;
|
|
||||||
}
|
|
||||||
#DeviceFlag_Export_Download_Dialog {
|
|
||||||
padding-top: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
#DeviceFlag_Export_Download_Dialog h4 {
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
#DeviceFlag_Export_Download_Dialog a {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
#DeviceFlag_Export_Exporting {
|
|
||||||
padding-top: 50px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
#DeviceFlag_Export_Exporting i {
|
|
||||||
margin-right: 10px;
|
|
||||||
color: #1e6dab;
|
|
||||||
}
|
|
||||||
#DocumentTemplate_BulkGenerate .actions {
|
#DocumentTemplate_BulkGenerate .actions {
|
||||||
padding-bottom: 0.5em;
|
padding-bottom: 0.5em;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@@ -2077,21 +2031,3 @@ h1.Config_DocumentTemplates {
|
|||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
#DocumentTemplate_Export_Download_Dialog {
|
|
||||||
padding-top: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
#DocumentTemplate_Export_Download_Dialog h4 {
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
#DocumentTemplate_Export_Download_Dialog a {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
#DocumentTemplate_Export_Exporting {
|
|
||||||
padding-top: 50px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
#DocumentTemplate_Export_Exporting i {
|
|
||||||
margin-right: 10px;
|
|
||||||
color: #1e6dab;
|
|
||||||
}
|
|
||||||
@@ -2175,29 +2175,6 @@ h1.Config_DocumentTemplates {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#UserFlag_Export_Download_Dialog {
|
|
||||||
padding-top: 20px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#UserFlag_Export_Exporting {
|
|
||||||
padding-top: 50px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
i {
|
|
||||||
margin-right: 10px;
|
|
||||||
color: @StatusInformation;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#Config_DeviceFlags_Show {
|
#Config_DeviceFlags_Show {
|
||||||
|
|
||||||
#DeviceFlag_OnAssignmentExpression, #DeviceFlag_OnUnassignmentExpression {
|
#DeviceFlag_OnAssignmentExpression, #DeviceFlag_OnUnassignmentExpression {
|
||||||
@@ -2374,46 +2351,6 @@ h1.Config_DocumentTemplates {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#DeviceFlag_Export {
|
|
||||||
#DeviceFlag_Export_Fields {
|
|
||||||
#DeviceFlag_Export_Fields_Defaults {
|
|
||||||
font-size: .75em;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
font-size: 1.05em;
|
|
||||||
|
|
||||||
span {
|
|
||||||
margin-top: 4px;
|
|
||||||
font-size: .8em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#DeviceFlag_Export_Download_Dialog {
|
|
||||||
padding-top: 20px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#DeviceFlag_Export_Exporting {
|
|
||||||
padding-top: 50px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
i {
|
|
||||||
margin-right: 10px;
|
|
||||||
color: @StatusInformation;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#DocumentTemplate_BulkGenerate {
|
#DocumentTemplate_BulkGenerate {
|
||||||
.actions {
|
.actions {
|
||||||
padding-bottom: .5em;
|
padding-bottom: .5em;
|
||||||
@@ -2514,26 +2451,3 @@ h1.Config_DocumentTemplates {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#DocumentTemplate_Export_Download_Dialog {
|
|
||||||
padding-top: 20px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#DocumentTemplate_Export_Exporting {
|
|
||||||
padding-top: 50px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
i {
|
|
||||||
margin-right: 10px;
|
|
||||||
color: @StatusInformation;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -536,34 +536,6 @@
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#Devices_Export #Devices_Export_Fields #Devices_Export_Fields_Defaults {
|
|
||||||
font-size: 0.75em;
|
|
||||||
}
|
|
||||||
#Devices_Export #Devices_Export_Fields th {
|
|
||||||
font-size: 1.05em;
|
|
||||||
}
|
|
||||||
#Devices_Export #Devices_Export_Fields th span {
|
|
||||||
margin-top: 4px;
|
|
||||||
font-size: 0.8em;
|
|
||||||
}
|
|
||||||
#Devices_Export_Download_Dialog {
|
|
||||||
padding-top: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
#Devices_Export_Download_Dialog h4 {
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
#Devices_Export_Download_Dialog a {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
#Devices_Export_Exporting {
|
|
||||||
padding-top: 50px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
#Devices_Export_Exporting i {
|
|
||||||
margin-right: 10px;
|
|
||||||
color: #1e6dab;
|
|
||||||
}
|
|
||||||
#Devices_Import #ImportFile {
|
#Devices_Import #ImportFile {
|
||||||
width: 96%;
|
width: 96%;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
|
|||||||
@@ -556,44 +556,6 @@
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Devices_Export_Fields {
|
|
||||||
#Devices_Export_Fields_Defaults {
|
|
||||||
font-size: .75em;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
font-size: 1.05em;
|
|
||||||
|
|
||||||
span {
|
|
||||||
margin-top: 4px;
|
|
||||||
font-size: .8em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#Devices_Export_Download_Dialog {
|
|
||||||
padding-top: 20px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#Devices_Export_Exporting {
|
|
||||||
padding-top: 50px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
i {
|
|
||||||
margin-right: 10px;
|
|
||||||
color: @StatusInformation;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#Devices_Import {
|
#Devices_Import {
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1011,21 +1011,3 @@
|
|||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
#Jobs_Export_Download_Dialog {
|
|
||||||
padding-top: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
#Jobs_Export_Download_Dialog h4 {
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
#Jobs_Export_Download_Dialog a {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
#Jobs_Export_Exporting {
|
|
||||||
padding-top: 50px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
#Jobs_Export_Exporting i {
|
|
||||||
margin-right: 10px;
|
|
||||||
color: #1e6dab;
|
|
||||||
}
|
|
||||||
@@ -1112,26 +1112,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#Jobs_Export_Download_Dialog {
|
|
||||||
padding-top: 20px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#Jobs_Export_Exporting {
|
|
||||||
padding-top: 50px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
i {
|
|
||||||
margin-right: 10px;
|
|
||||||
color: @StatusInformation;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -289,6 +289,7 @@ header .watermark,
|
|||||||
background-color: #888;
|
background-color: #888;
|
||||||
}
|
}
|
||||||
#QuickSearchMenu {
|
#QuickSearchMenu {
|
||||||
|
width: 190px !important;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
background: none;
|
background: none;
|
||||||
@@ -318,6 +319,9 @@ header .watermark,
|
|||||||
position: relative;
|
position: relative;
|
||||||
border-left: 1px solid #D1D1D1;
|
border-left: 1px solid #D1D1D1;
|
||||||
border-right: 1px solid #D1D1D1;
|
border-right: 1px solid #D1D1D1;
|
||||||
|
overflow-x: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
#layout_PageHeading a {
|
#layout_PageHeading a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -1606,3 +1610,31 @@ i.clipboard-button {
|
|||||||
i.clipboard-button:hover {
|
i.clipboard-button:hover {
|
||||||
color: #9e9e9e;
|
color: #9e9e9e;
|
||||||
}
|
}
|
||||||
|
#Export_Exporting {
|
||||||
|
padding-top: 50px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#Export_Exporting i {
|
||||||
|
margin-right: 10px;
|
||||||
|
color: #1e6dab;
|
||||||
|
}
|
||||||
|
#Export_Download_Dialog {
|
||||||
|
padding-top: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#Export_Download_Dialog h4 {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
#Export_Download_Dialog a {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
#Export_Fields #Export_Fields_Defaults {
|
||||||
|
font-size: 0.75em;
|
||||||
|
}
|
||||||
|
#Export_Fields th {
|
||||||
|
font-size: 1.05em;
|
||||||
|
}
|
||||||
|
#Export_Fields th span {
|
||||||
|
margin-top: 4px;
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
@@ -217,6 +217,7 @@ header, #header {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#QuickSearchMenu {
|
#QuickSearchMenu {
|
||||||
|
width: 190px !important;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
font-size: .9em;
|
font-size: .9em;
|
||||||
background: none;
|
background: none;
|
||||||
@@ -253,6 +254,9 @@ header, #header {
|
|||||||
position: relative;
|
position: relative;
|
||||||
border-left: 1px solid @BackgroundColour;
|
border-left: 1px solid @BackgroundColour;
|
||||||
border-right: 1px solid @BackgroundColour;
|
border-right: 1px solid @BackgroundColour;
|
||||||
|
overflow-x: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -1710,3 +1714,41 @@ i.clipboard-button {
|
|||||||
color: @ButtonHoverColour;
|
color: @ButtonHoverColour;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#Export_Exporting {
|
||||||
|
padding-top: 50px;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
i {
|
||||||
|
margin-right: 10px;
|
||||||
|
color: @StatusInformation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#Export_Download_Dialog {
|
||||||
|
padding-top: 20px;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#Export_Fields {
|
||||||
|
#Export_Fields_Defaults {
|
||||||
|
font-size: .75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
font-size: 1.05em;
|
||||||
|
|
||||||
|
span {
|
||||||
|
margin-top: 4px;
|
||||||
|
font-size: .8em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,5 +1,6 @@
|
|||||||
using Disco.Models.Repository;
|
using Disco.Models.Repository;
|
||||||
using Disco.Models.Services.Devices;
|
using Disco.Models.Services.Devices;
|
||||||
|
using Disco.Models.Services.Documents;
|
||||||
using Disco.Models.Services.Jobs.JobLists;
|
using Disco.Models.Services.Jobs.JobLists;
|
||||||
using Disco.Models.UI.Device;
|
using Disco.Models.UI.Device;
|
||||||
using Disco.Services;
|
using Disco.Services;
|
||||||
@@ -11,6 +12,7 @@ using Disco.Services.Plugins.Features.DetailsProvider;
|
|||||||
using Disco.Services.Plugins.Features.UIExtension;
|
using Disco.Services.Plugins.Features.UIExtension;
|
||||||
using Disco.Services.Users;
|
using Disco.Services.Users;
|
||||||
using Disco.Services.Web;
|
using Disco.Services.Web;
|
||||||
|
using Disco.Web.Models.Shared;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data.Entity;
|
using System.Data.Entity;
|
||||||
@@ -111,8 +113,8 @@ namespace Disco.Web.Controllers
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Export
|
#region Export
|
||||||
|
[HttpGet]
|
||||||
[DiscoAuthorizeAny(Claims.Device.Actions.Export), HttpGet]
|
[DiscoAuthorize(Claims.Device.Actions.Export)]
|
||||||
public virtual ActionResult Export(Guid? exportId, DeviceExportTypes? exportType, int? exportTypeTargetId)
|
public virtual ActionResult Export(Guid? exportId, DeviceExportTypes? exportType, int? exportTypeTargetId)
|
||||||
{
|
{
|
||||||
var m = new Models.Device.ExportModel()
|
var m = new Models.Device.ExportModel()
|
||||||
@@ -123,6 +125,9 @@ namespace Disco.Web.Controllers
|
|||||||
DeviceProfiles = Database.DeviceProfiles.OrderBy(dp => dp.Name).Select(dp => new { Key = dp.Id, Value = dp.Name }).ToList().Select(i => new KeyValuePair<int, string>(i.Key, i.Value))
|
DeviceProfiles = Database.DeviceProfiles.OrderBy(dp => dp.Name).Select(dp => new { Key = dp.Id, Value = dp.Name }).ToList().Select(i => new KeyValuePair<int, string>(i.Key, i.Value))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
m.Fields = ExportFieldsModel.Create(m.Options, DeviceExportOptions.DefaultOptions());
|
||||||
|
m.Fields.AddCustomUserDetails(o => o.UserDetailCustom, m.Fields.FieldGroups.FindIndex(g => g.Name == "Assigned User") + 1);
|
||||||
|
|
||||||
if (ExportTask.TryFromCache(exportId, out var context))
|
if (ExportTask.TryFromCache(exportId, out var context))
|
||||||
{
|
{
|
||||||
m.ExportId = context.Id;
|
m.ExportId = context.Id;
|
||||||
@@ -136,7 +141,7 @@ namespace Disco.Web.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UI Extensions
|
// UI Extensions
|
||||||
UIExtensions.ExecuteExtensions<DeviceExportModel>(this.ControllerContext, m);
|
UIExtensions.ExecuteExtensions<DeviceExportModel>(ControllerContext, m);
|
||||||
|
|
||||||
return View(m);
|
return View(m);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -975,6 +975,11 @@
|
|||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
<DependentUpon>Queues.cshtml</DependentUpon>
|
<DependentUpon>Queues.cshtml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Views\Shared\_ExportFields.generated.cs">
|
||||||
|
<DependentUpon>_ExportFields.cshtml</DependentUpon>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Views\Shared\_CustomDetailValueRender.generated.cs">
|
<Compile Include="Views\Shared\_CustomDetailValueRender.generated.cs">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
@@ -2465,6 +2470,10 @@
|
|||||||
<Generator>RazorGenerator</Generator>
|
<Generator>RazorGenerator</Generator>
|
||||||
<LastGenOutput>Licence.generated.cs</LastGenOutput>
|
<LastGenOutput>Licence.generated.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="Views\Shared\_ExportFields.cshtml">
|
||||||
|
<Generator>RazorGenerator</Generator>
|
||||||
|
<LastGenOutput>_ExportFields.generated.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
<None Include="Views\Shared\_CustomDetailValueRender.cshtml">
|
<None Include="Views\Shared\_CustomDetailValueRender.cshtml">
|
||||||
<Generator>RazorGenerator</Generator>
|
<Generator>RazorGenerator</Generator>
|
||||||
<LastGenOutput>_CustomDetailValueRender.generated.cs</LastGenOutput>
|
<LastGenOutput>_CustomDetailValueRender.generated.cs</LastGenOutput>
|
||||||
|
|||||||
@@ -546,7 +546,7 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public class ActionParamsClass_Export
|
public class ActionParamsClass_Export
|
||||||
{
|
{
|
||||||
public readonly string Model = "Model";
|
public readonly string model = "model";
|
||||||
}
|
}
|
||||||
static readonly ActionParamsClass_ExportRetrieve s_params_ExportRetrieve = new ActionParamsClass_ExportRetrieve();
|
static readonly ActionParamsClass_ExportRetrieve s_params_ExportRetrieve = new ActionParamsClass_ExportRetrieve();
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
@@ -562,7 +562,7 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public class ActionParamsClass_SaveExport
|
public class ActionParamsClass_SaveExport
|
||||||
{
|
{
|
||||||
public readonly string Model = "Model";
|
public readonly string model = "model";
|
||||||
}
|
}
|
||||||
static readonly ViewsClass s_views = new ViewsClass();
|
static readonly ViewsClass s_views = new ViewsClass();
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
@@ -915,14 +915,14 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Device.ExportModel Model);
|
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Device.ExportModel model);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult Export(Disco.Web.Models.Device.ExportModel Model)
|
public override System.Web.Mvc.ActionResult Export(Disco.Web.Models.Device.ExportModel model)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||||
ExportOverride(callInfo, Model);
|
ExportOverride(callInfo, model);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -939,14 +939,14 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Device.ExportModel Model);
|
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Device.ExportModel model);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Models.Device.ExportModel Model)
|
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Models.Device.ExportModel model)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||||
SaveExportOverride(callInfo, Model);
|
SaveExportOverride(callInfo, model);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public class ActionParamsClass_Export
|
public class ActionParamsClass_Export
|
||||||
{
|
{
|
||||||
public readonly string Model = "Model";
|
public readonly string model = "model";
|
||||||
}
|
}
|
||||||
static readonly ActionParamsClass_ExportRetrieve s_params_ExportRetrieve = new ActionParamsClass_ExportRetrieve();
|
static readonly ActionParamsClass_ExportRetrieve s_params_ExportRetrieve = new ActionParamsClass_ExportRetrieve();
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
@@ -365,7 +365,7 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public class ActionParamsClass_SaveExport
|
public class ActionParamsClass_SaveExport
|
||||||
{
|
{
|
||||||
public readonly string Model = "Model";
|
public readonly string model = "model";
|
||||||
}
|
}
|
||||||
static readonly ViewsClass s_views = new ViewsClass();
|
static readonly ViewsClass s_views = new ViewsClass();
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
@@ -571,14 +571,14 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel Model);
|
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel model);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult Export(Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel Model)
|
public override System.Web.Mvc.ActionResult Export(Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel model)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||||
ExportOverride(callInfo, Model);
|
ExportOverride(callInfo, model);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -595,14 +595,14 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel Model);
|
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel model);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel Model)
|
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel model)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||||
SaveExportOverride(callInfo, Model);
|
SaveExportOverride(callInfo, model);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -758,7 +758,7 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public class ActionParamsClass_Export
|
public class ActionParamsClass_Export
|
||||||
{
|
{
|
||||||
public readonly string Model = "Model";
|
public readonly string model = "model";
|
||||||
}
|
}
|
||||||
static readonly ActionParamsClass_ExportRetrieve s_params_ExportRetrieve = new ActionParamsClass_ExportRetrieve();
|
static readonly ActionParamsClass_ExportRetrieve s_params_ExportRetrieve = new ActionParamsClass_ExportRetrieve();
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
@@ -774,7 +774,7 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public class ActionParamsClass_SaveExport
|
public class ActionParamsClass_SaveExport
|
||||||
{
|
{
|
||||||
public readonly string Model = "Model";
|
public readonly string model = "model";
|
||||||
}
|
}
|
||||||
static readonly ViewsClass s_views = new ViewsClass();
|
static readonly ViewsClass s_views = new ViewsClass();
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
@@ -1314,14 +1314,14 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel Model);
|
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel model);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult Export(Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel Model)
|
public override System.Web.Mvc.ActionResult Export(Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel model)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||||
ExportOverride(callInfo, Model);
|
ExportOverride(callInfo, model);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1338,14 +1338,14 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel Model);
|
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel model);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel Model)
|
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel model)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||||
SaveExportOverride(callInfo, Model);
|
SaveExportOverride(callInfo, model);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1293,7 +1293,7 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public class ActionParamsClass_SaveExport
|
public class ActionParamsClass_SaveExport
|
||||||
{
|
{
|
||||||
public readonly string Model = "Model";
|
public readonly string model = "model";
|
||||||
}
|
}
|
||||||
static readonly ViewsClass s_views = new ViewsClass();
|
static readonly ViewsClass s_views = new ViewsClass();
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
@@ -2257,14 +2257,14 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Job.ExportModel Model);
|
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Job.ExportModel model);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Models.Job.ExportModel Model)
|
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Models.Job.ExportModel model)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||||
SaveExportOverride(callInfo, Model);
|
SaveExportOverride(callInfo, model);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public class ActionParamsClass_Export
|
public class ActionParamsClass_Export
|
||||||
{
|
{
|
||||||
public readonly string Model = "Model";
|
public readonly string model = "model";
|
||||||
}
|
}
|
||||||
static readonly ActionParamsClass_ExportRetrieve s_params_ExportRetrieve = new ActionParamsClass_ExportRetrieve();
|
static readonly ActionParamsClass_ExportRetrieve s_params_ExportRetrieve = new ActionParamsClass_ExportRetrieve();
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
@@ -365,7 +365,7 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public class ActionParamsClass_SaveExport
|
public class ActionParamsClass_SaveExport
|
||||||
{
|
{
|
||||||
public readonly string Model = "Model";
|
public readonly string model = "model";
|
||||||
}
|
}
|
||||||
static readonly ViewsClass s_views = new ViewsClass();
|
static readonly ViewsClass s_views = new ViewsClass();
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
@@ -571,14 +571,14 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.UserFlag.ExportModel Model);
|
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.UserFlag.ExportModel model);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult Export(Disco.Web.Areas.Config.Models.UserFlag.ExportModel Model)
|
public override System.Web.Mvc.ActionResult Export(Disco.Web.Areas.Config.Models.UserFlag.ExportModel model)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||||
ExportOverride(callInfo, Model);
|
ExportOverride(callInfo, model);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -595,14 +595,14 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.UserFlag.ExportModel Model);
|
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.UserFlag.ExportModel model);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Areas.Config.Models.UserFlag.ExportModel Model)
|
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Areas.Config.Models.UserFlag.ExportModel model)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||||
SaveExportOverride(callInfo, Model);
|
SaveExportOverride(callInfo, model);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ namespace T4MVC
|
|||||||
public readonly string _CustomDetailValueRender = "_CustomDetailValueRender";
|
public readonly string _CustomDetailValueRender = "_CustomDetailValueRender";
|
||||||
public readonly string _DialogLayout = "_DialogLayout";
|
public readonly string _DialogLayout = "_DialogLayout";
|
||||||
public readonly string _EmptyLayout = "_EmptyLayout";
|
public readonly string _EmptyLayout = "_EmptyLayout";
|
||||||
|
public readonly string _ExportFields = "_ExportFields";
|
||||||
public readonly string _GenerateDocumentControl = "_GenerateDocumentControl";
|
public readonly string _GenerateDocumentControl = "_GenerateDocumentControl";
|
||||||
public readonly string _JobTable = "_JobTable";
|
public readonly string _JobTable = "_JobTable";
|
||||||
public readonly string _JobTableRender = "_JobTableRender";
|
public readonly string _JobTableRender = "_JobTableRender";
|
||||||
@@ -52,6 +53,7 @@ namespace T4MVC
|
|||||||
public readonly string _CustomDetailValueRender = "~/Views/Shared/_CustomDetailValueRender.cshtml";
|
public readonly string _CustomDetailValueRender = "~/Views/Shared/_CustomDetailValueRender.cshtml";
|
||||||
public readonly string _DialogLayout = "~/Views/Shared/_DialogLayout.cshtml";
|
public readonly string _DialogLayout = "~/Views/Shared/_DialogLayout.cshtml";
|
||||||
public readonly string _EmptyLayout = "~/Views/Shared/_EmptyLayout.cshtml";
|
public readonly string _EmptyLayout = "~/Views/Shared/_EmptyLayout.cshtml";
|
||||||
|
public readonly string _ExportFields = "~/Views/Shared/_ExportFields.cshtml";
|
||||||
public readonly string _GenerateDocumentControl = "~/Views/Shared/_GenerateDocumentControl.cshtml";
|
public readonly string _GenerateDocumentControl = "~/Views/Shared/_GenerateDocumentControl.cshtml";
|
||||||
public readonly string _JobTable = "~/Views/Shared/_JobTable.cshtml";
|
public readonly string _JobTable = "~/Views/Shared/_JobTable.cshtml";
|
||||||
public readonly string _JobTableRender = "~/Views/Shared/_JobTableRender.cshtml";
|
public readonly string _JobTableRender = "~/Views/Shared/_JobTableRender.cshtml";
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Disco.Models.Services.Devices;
|
using Disco.Models.Services.Devices;
|
||||||
using Disco.Models.Services.Exporting;
|
using Disco.Models.Services.Exporting;
|
||||||
using Disco.Models.UI.Device;
|
using Disco.Models.UI.Device;
|
||||||
|
using Disco.Models.UI.Shared;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -16,5 +17,7 @@ namespace Disco.Web.Models.Device
|
|||||||
public IEnumerable<KeyValuePair<int, string>> DeviceBatches { get; set; }
|
public IEnumerable<KeyValuePair<int, string>> DeviceBatches { get; set; }
|
||||||
public IEnumerable<KeyValuePair<int, string>> DeviceModels { get; set; }
|
public IEnumerable<KeyValuePair<int, string>> DeviceModels { get; set; }
|
||||||
public IEnumerable<KeyValuePair<int, string>> DeviceProfiles { get; set; }
|
public IEnumerable<KeyValuePair<int, string>> DeviceProfiles { get; set; }
|
||||||
|
|
||||||
|
public SharedExportFieldsModel<DeviceExportOptions> Fields { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,17 +1,21 @@
|
|||||||
using Disco.Models.Services.Exporting;
|
using Disco.Data.Repository;
|
||||||
|
using Disco.Models.Services.Exporting;
|
||||||
using Disco.Models.UI.Shared;
|
using Disco.Models.UI.Shared;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Linq.Expressions;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
|
|
||||||
namespace Disco.Web.Models.Shared
|
namespace Disco.Web.Models.Shared
|
||||||
{
|
{
|
||||||
public static class ExportFieldsModel
|
public static class ExportFieldsModel
|
||||||
{
|
{
|
||||||
public static ExportFieldsModel<V> Create<V>(V options, params string[] ignoreProperties)
|
public static ExportFieldsModel<V> Create<V>(V options, V defaultOptions, params string[] ignoreProperties)
|
||||||
where V : IExportOptions
|
where V : IExportOptions
|
||||||
{
|
{
|
||||||
return new ExportFieldsModel<V>(options, ignoreProperties);
|
return new ExportFieldsModel<V>(options, defaultOptions, ignoreProperties);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20,28 +24,37 @@ namespace Disco.Web.Models.Shared
|
|||||||
public T Options { get; set; }
|
public T Options { get; set; }
|
||||||
public List<ExportOptionGroup> FieldGroups { get; set; }
|
public List<ExportOptionGroup> FieldGroups { get; set; }
|
||||||
|
|
||||||
public ExportFieldsModel(T options, params string[] ignoreProperties)
|
public ExportFieldsModel(T options, T defaultOptions, params string[] ignoreProperties)
|
||||||
{
|
{
|
||||||
FieldGroups = GetFields(options, ignoreProperties);
|
Options = options;
|
||||||
|
FieldGroups = GetFields(options, defaultOptions, ignoreProperties);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<ExportOptionGroup> GetFields(T options, params string[] ignoreProperties)
|
private static List<ExportOptionGroup> GetFields(T options, T defaultOptions, params string[] ignoreProperties)
|
||||||
{
|
{
|
||||||
var viewData = new ViewDataDictionary<IExportOptions>(options);
|
var properties = new List<ExportOptionField>();
|
||||||
var metaData = ModelMetadata.FromLambdaExpression(o => o, viewData);
|
|
||||||
|
|
||||||
var properties = metaData.Properties
|
foreach (var prop in typeof(T).GetProperties(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public))
|
||||||
.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool) && !ignoreProperties.Contains(p.PropertyName));
|
{
|
||||||
|
if (prop.PropertyType != typeof(bool) || ignoreProperties.Contains(prop.Name))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
var display = prop.GetCustomAttributes(typeof(DisplayAttribute), false).FirstOrDefault() as DisplayAttribute;
|
||||||
|
if (display == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
properties.Add(new ExportOptionField()
|
||||||
|
{
|
||||||
|
GroupName = display.GroupName,
|
||||||
|
Name = prop.Name,
|
||||||
|
DisplayName = display.Name,
|
||||||
|
Description = display.Description,
|
||||||
|
IsDefault = (bool)prop.GetValue(defaultOptions),
|
||||||
|
IsChecked = (bool)prop.GetValue(options),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return properties
|
return properties
|
||||||
.Select(p => new ExportOptionField()
|
|
||||||
{
|
|
||||||
GroupName = p.ShortDisplayName,
|
|
||||||
Name = p.PropertyName,
|
|
||||||
DisplayName = p.DisplayName,
|
|
||||||
Description = p.Description,
|
|
||||||
Checked = (bool)p.Model,
|
|
||||||
})
|
|
||||||
.GroupBy(p => p.GroupName)
|
.GroupBy(p => p.GroupName)
|
||||||
.Select(g =>
|
.Select(g =>
|
||||||
{
|
{
|
||||||
@@ -51,5 +64,39 @@ namespace Disco.Web.Models.Shared
|
|||||||
})
|
})
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AddCustomUserDetails(Expression<Func<T, List<string>>> modelAccessor, int groupIndex = -1)
|
||||||
|
{
|
||||||
|
List<string> userCustomDetailKeys;
|
||||||
|
using (var database = new DiscoDataContext())
|
||||||
|
userCustomDetailKeys = database.UserDetails.Where(d => d.Scope == "Details").Select(d => d.Key).Distinct().OrderBy(k => k).ToList();
|
||||||
|
|
||||||
|
if (userCustomDetailKeys.Any())
|
||||||
|
{
|
||||||
|
var fieldKey = ((MemberExpression)modelAccessor.Body).Member.Name;
|
||||||
|
var checkedKeys = modelAccessor.Compile().Invoke(Options);
|
||||||
|
|
||||||
|
var group = new ExportOptionGroup("User Custom Details");
|
||||||
|
foreach (var key in userCustomDetailKeys)
|
||||||
|
{
|
||||||
|
var displayName = key.TrimEnd('*', '&');
|
||||||
|
group.Add(new ExportOptionField()
|
||||||
|
{
|
||||||
|
GroupName = group.Name,
|
||||||
|
Name = key,
|
||||||
|
DisplayName = displayName,
|
||||||
|
Description = $"{displayName} custom detail for the user",
|
||||||
|
IsChecked = checkedKeys?.Contains(key) ?? false,
|
||||||
|
CustomKey = fieldKey,
|
||||||
|
CustomValue = key,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (groupIndex < 0)
|
||||||
|
FieldGroups.Add(group);
|
||||||
|
else
|
||||||
|
FieldGroups.Insert(groupIndex, group);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,11 +3,7 @@
|
|||||||
@{
|
@{
|
||||||
Authorization.RequireAny(Claims.Device.Actions.Export);
|
Authorization.RequireAny(Claims.Device.Actions.Export);
|
||||||
|
|
||||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Export Devices");
|
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Export");
|
||||||
|
|
||||||
var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData);
|
|
||||||
var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool))
|
|
||||||
.GroupBy(m => m.ShortDisplayName);
|
|
||||||
}
|
}
|
||||||
<div id="Devices_Export">
|
<div id="Devices_Export">
|
||||||
@using (Html.BeginForm(MVC.API.Device.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.Device.SaveExport()) }))
|
@using (Html.BeginForm(MVC.API.Device.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.Device.SaveExport()) }))
|
||||||
@@ -41,64 +37,15 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="Devices_Export_Fields" class="form" style="width: 570px; margin-top: 15px;">
|
@Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups)
|
||||||
<h2>Export Fields <a id="Devices_Export_Fields_Defaults" href="#">(Defaults)</a></h2>
|
|
||||||
<table>
|
|
||||||
@foreach (var optionGroup in optionGroups)
|
|
||||||
{
|
|
||||||
var optionFields = optionGroup.ToList();
|
|
||||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
|
||||||
<tr>
|
|
||||||
<th style="width: 120px;">
|
|
||||||
@optionGroup.Key
|
|
||||||
@if (optionFields.Count > 2)
|
|
||||||
{
|
|
||||||
<span style="display: block;" class="select"><a class="selectAll" href="#">ALL</a> | <a class="selectNone" href="#">NONE</a></span>
|
|
||||||
}
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<div class="Devices_Export_Fields_Group">
|
|
||||||
<table class="none">
|
|
||||||
<tr>
|
|
||||||
<td style="width: 50%">
|
|
||||||
<ul class="none">
|
|
||||||
@foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
|
||||||
{
|
|
||||||
<li title="@optionItem.Description">
|
|
||||||
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
|
|
||||||
</li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
<td style="width: 50%">
|
|
||||||
<ul class="none">
|
|
||||||
@foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
|
||||||
{
|
|
||||||
<li title="@optionItem.Description">
|
|
||||||
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
|
|
||||||
</li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
}
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
var exportDefaultFields = ['DeviceSerialNumber', 'ModelId', 'ProfileId', 'BatchId', 'AssignedUserId', 'DeviceLocation', 'DeviceAssetNumber'];
|
const $exportType = $('#Options_ExportType');
|
||||||
var $exportFields = $('#Devices_Export_Fields');
|
const $exportTypeTargetContainers = $('#Devices_Export_Type').find('.Devices_Export_Type_Target');
|
||||||
var $exportType = $('#Options_ExportType');
|
const $form = $exportType.closest('form');
|
||||||
var $exportTypeTargetContainers = $('#Devices_Export_Type').find('.Devices_Export_Type_Target');
|
let $exportingDialog = null;
|
||||||
var $form = $exportType.closest('form');
|
|
||||||
var $exportingDialog = null;
|
|
||||||
|
|
||||||
function exportTypeChange() {
|
$exportType.on('change', function () {
|
||||||
$exportTypeTargetContainers.hide();
|
$exportTypeTargetContainers.hide();
|
||||||
$exportTypeTargetContainers.find('select').prop('disabled', true);
|
$exportTypeTargetContainers.find('select').prop('disabled', true);
|
||||||
|
|
||||||
@@ -113,37 +60,14 @@
|
|||||||
$('#Devices_Export_Type_Target_Model').show().find('select').prop('disabled', false);
|
$('#Devices_Export_Type_Target_Model').show().find('select').prop('disabled', false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}).trigger('change');
|
||||||
$exportType.change(exportTypeChange);
|
|
||||||
exportTypeChange();
|
|
||||||
|
|
||||||
$exportFields.on('click', 'a.selectAll,a.selectNone', function () {
|
|
||||||
var $this = $(this);
|
|
||||||
|
|
||||||
$this.closest('tr').find('input').prop('checked', $this.is('.selectAll'));
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#Devices_Export_Fields_Defaults').click(function () {
|
|
||||||
|
|
||||||
$exportFields.find('input').prop('checked', false);
|
|
||||||
|
|
||||||
$.each(exportDefaultFields, function (index, value) {
|
|
||||||
$('#Options_' + value).prop('checked', true);
|
|
||||||
});
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Submit Validation
|
|
||||||
function submitHandler() {
|
|
||||||
var exportFieldCount = $exportFields.find('input:checked').length;
|
|
||||||
|
|
||||||
|
$.validator.unobtrusive.parse($form);
|
||||||
|
$form.data("validator").settings.submitHandler = function () {
|
||||||
|
const exportFieldCount = $('#Export_Fields').find('input:checked').length;
|
||||||
if (exportFieldCount > 0) {
|
if (exportFieldCount > 0) {
|
||||||
|
|
||||||
if ($exportingDialog == null) {
|
if ($exportingDialog == null) {
|
||||||
$exportingDialog = $('#Devices_Export_Exporting').dialog({
|
$exportingDialog = $('#Export_Exporting').dialog({
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 164,
|
height: 164,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
@@ -154,24 +78,16 @@
|
|||||||
$exportingDialog.dialog('open');
|
$exportingDialog.dialog('open');
|
||||||
|
|
||||||
$form[0].submit();
|
$form[0].submit();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
alert('Select at least one field to export.');
|
|
||||||
}
|
|
||||||
$.validator.unobtrusive.parse($form);
|
|
||||||
$form.data("validator").settings.submitHandler = submitHandler;
|
|
||||||
|
|
||||||
$('#Devices_Export_Download_Dialog').dialog({
|
alert('Select at least one field to export.');
|
||||||
width: 400,
|
};
|
||||||
height: 164,
|
|
||||||
resizable: false,
|
$('#Devices_Export_Button').on('click', function () {
|
||||||
modal: true,
|
|
||||||
autoOpen: true
|
|
||||||
});
|
|
||||||
$('#Devices_Export_Button').click(function () {
|
|
||||||
$form.submit();
|
$form.submit();
|
||||||
});
|
});
|
||||||
$('#Devices_Export_Save_Button').click(function () {
|
$('#Devices_Export_Save_Button').on('click', function () {
|
||||||
$form.attr('action', $form[0].dataset.saveaction);
|
$form.attr('action', $form[0].dataset.saveaction);
|
||||||
$form.submit();
|
$form.submit();
|
||||||
});
|
});
|
||||||
@@ -181,7 +97,7 @@
|
|||||||
</div>
|
</div>
|
||||||
@if (Model.ExportId.HasValue)
|
@if (Model.ExportId.HasValue)
|
||||||
{
|
{
|
||||||
<div id="Devices_Export_Download_Dialog" class="dialog" title="Export Devices">
|
<div id="Export_Download_Dialog" class="dialog" title="Export Devices">
|
||||||
@if (Model.ExportResult.RecordCount == 0)
|
@if (Model.ExportResult.RecordCount == 0)
|
||||||
{
|
{
|
||||||
<h4>No records matched the filter criteria</h4>
|
<h4>No records matched the filter criteria</h4>
|
||||||
@@ -194,7 +110,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#Devices_Export_Download_Dialog')
|
$('#Export_Download_Dialog')
|
||||||
.dialog({
|
.dialog({
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 164,
|
height: 164,
|
||||||
@@ -205,7 +121,7 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
<div id="Devices_Export_Exporting" class="dialog" title="Exporting Devices...">
|
<div id="Export_Exporting" class="dialog" title="Exporting Devices...">
|
||||||
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting devices...</h4>
|
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting devices...</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="actionBar">
|
<div class="actionBar">
|
||||||
|
|||||||
@@ -54,11 +54,7 @@ namespace Disco.Web.Views.Device
|
|||||||
|
|
||||||
Authorization.RequireAny(Claims.Device.Actions.Export);
|
Authorization.RequireAny(Claims.Device.Actions.Export);
|
||||||
|
|
||||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Export Devices");
|
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Export");
|
||||||
|
|
||||||
var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData);
|
|
||||||
var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool))
|
|
||||||
.GroupBy(m => m.ShortDisplayName);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -70,13 +66,13 @@ WriteLiteral(" id=\"Devices_Export\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 13 "..\..\Views\Device\Export.cshtml"
|
#line 9 "..\..\Views\Device\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 13 "..\..\Views\Device\Export.cshtml"
|
#line 9 "..\..\Views\Device\Export.cshtml"
|
||||||
using (Html.BeginForm(MVC.API.Device.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.Device.SaveExport()) }))
|
using (Html.BeginForm(MVC.API.Device.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.Device.SaveExport()) }))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -84,14 +80,14 @@ WriteLiteral(">\r\n");
|
|||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 15 "..\..\Views\Device\Export.cshtml"
|
#line 11 "..\..\Views\Device\Export.cshtml"
|
||||||
Write(Html.AntiForgeryToken());
|
Write(Html.AntiForgeryToken());
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 15 "..\..\Views\Device\Export.cshtml"
|
#line 11 "..\..\Views\Device\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -116,7 +112,7 @@ WriteLiteral(">\r\n Type:\r\n </th>\r\
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 24 "..\..\Views\Device\Export.cshtml"
|
#line 20 "..\..\Views\Device\Export.cshtml"
|
||||||
Write(Html.DropDownListFor(m => m.Options.ExportType, Enum.GetNames(typeof(Disco.Models.Services.Devices.DeviceExportTypes)).Select(t => new SelectListItem() { Text = t, Value = t })));
|
Write(Html.DropDownListFor(m => m.Options.ExportType, Enum.GetNames(typeof(Disco.Models.Services.Devices.DeviceExportTypes)).Select(t => new SelectListItem() { Text = t, Value = t })));
|
||||||
|
|
||||||
|
|
||||||
@@ -133,7 +129,7 @@ WriteLiteral(">\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 26 "..\..\Views\Device\Export.cshtml"
|
#line 22 "..\..\Views\Device\Export.cshtml"
|
||||||
Write(Html.DropDownListFor(m => m.Options.ExportTypeTargetId, Model.DeviceBatches.Select(i => new SelectListItem() { Value = i.Key.ToString(), Text = i.Value })));
|
Write(Html.DropDownListFor(m => m.Options.ExportTypeTargetId, Model.DeviceBatches.Select(i => new SelectListItem() { Value = i.Key.ToString(), Text = i.Value })));
|
||||||
|
|
||||||
|
|
||||||
@@ -150,7 +146,7 @@ WriteLiteral(">\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 29 "..\..\Views\Device\Export.cshtml"
|
#line 25 "..\..\Views\Device\Export.cshtml"
|
||||||
Write(Html.DropDownListFor(m => m.Options.ExportTypeTargetId, Model.DeviceModels.Select(i => new SelectListItem() { Value = i.Key.ToString(), Text = i.Value })));
|
Write(Html.DropDownListFor(m => m.Options.ExportTypeTargetId, Model.DeviceModels.Select(i => new SelectListItem() { Value = i.Key.ToString(), Text = i.Value })));
|
||||||
|
|
||||||
|
|
||||||
@@ -167,7 +163,7 @@ WriteLiteral(">\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 32 "..\..\Views\Device\Export.cshtml"
|
#line 28 "..\..\Views\Device\Export.cshtml"
|
||||||
Write(Html.DropDownListFor(m => m.Options.ExportTypeTargetId, Model.DeviceProfiles.Select(i => new SelectListItem() { Value = i.Key.ToString(), Text = i.Value })));
|
Write(Html.DropDownListFor(m => m.Options.ExportTypeTargetId, Model.DeviceProfiles.Select(i => new SelectListItem() { Value = i.Key.ToString(), Text = i.Value })));
|
||||||
|
|
||||||
|
|
||||||
@@ -177,7 +173,7 @@ WriteLiteral("\r\n </div>\r\n </td>\r\
|
|||||||
">\r\n <tr>\r\n <th>");
|
">\r\n <tr>\r\n <th>");
|
||||||
|
|
||||||
|
|
||||||
#line 37 "..\..\Views\Device\Export.cshtml"
|
#line 33 "..\..\Views\Device\Export.cshtml"
|
||||||
Write(Html.LabelFor(m => m.Options.Format));
|
Write(Html.LabelFor(m => m.Options.Format));
|
||||||
|
|
||||||
|
|
||||||
@@ -188,7 +184,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 39 "..\..\Views\Device\Export.cshtml"
|
#line 35 "..\..\Views\Device\Export.cshtml"
|
||||||
Write(Html.DropDownListFor(m => m.Options.Format, Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)).Select(v => new SelectListItem() { Value = v, Text = v })));
|
Write(Html.DropDownListFor(m => m.Options.Format, Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)).Select(v => new SelectListItem() { Value = v, Text = v })));
|
||||||
|
|
||||||
|
|
||||||
@@ -197,385 +193,62 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
||||||
" </div>\r\n");
|
" </div>\r\n");
|
||||||
|
|
||||||
WriteLiteral(" <div");
|
|
||||||
|
|
||||||
WriteLiteral(" id=\"Devices_Export_Fields\"");
|
#line 40 "..\..\Views\Device\Export.cshtml"
|
||||||
|
|
||||||
WriteLiteral(" class=\"form\"");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 570px; margin-top: 15px;\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <h2>Export Fields <a");
|
|
||||||
|
|
||||||
WriteLiteral(" id=\"Devices_Export_Fields_Defaults\"");
|
|
||||||
|
|
||||||
WriteLiteral(" href=\"#\"");
|
|
||||||
|
|
||||||
WriteLiteral(">(Defaults)</a></h2>\r\n <table>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 47 "..\..\Views\Device\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 47 "..\..\Views\Device\Export.cshtml"
|
#line 40 "..\..\Views\Device\Export.cshtml"
|
||||||
foreach (var optionGroup in optionGroups)
|
Write(Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups));
|
||||||
{
|
|
||||||
var optionFields = optionGroup.ToList();
|
|
||||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <tr>\r\n <th");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 120px;\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
|
||||||
|
|
||||||
|
|
||||||
#line 53 "..\..\Views\Device\Export.cshtml"
|
|
||||||
Write(optionGroup.Key);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 54 "..\..\Views\Device\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 54 "..\..\Views\Device\Export.cshtml"
|
#line 40 "..\..\Views\Device\Export.cshtml"
|
||||||
if (optionFields.Count > 2)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <span");
|
WriteLiteral(" <script>\r\n $(function () {\r\n const $exportType " +
|
||||||
|
"= $(\'#Options_ExportType\');\r\n const $exportTypeTargetContainers =" +
|
||||||
WriteLiteral(" style=\"display: block;\"");
|
" $(\'#Devices_Export_Type\').find(\'.Devices_Export_Type_Target\');\r\n " +
|
||||||
|
" const $form = $exportType.closest(\'form\');\r\n let $exportingDialo" +
|
||||||
WriteLiteral(" class=\"select\"");
|
"g = null;\r\n\r\n $exportType.on(\'change\', function () {\r\n " +
|
||||||
|
" $exportTypeTargetContainers.hide();\r\n $exportTypeTar" +
|
||||||
WriteLiteral("><a");
|
"getContainers.find(\'select\').prop(\'disabled\', true);\r\n\r\n swit" +
|
||||||
|
"ch ($exportType.val()) {\r\n case \'Batch\':\r\n " +
|
||||||
WriteLiteral(" class=\"selectAll\"");
|
" $(\'#Devices_Export_Type_Target_Batch\').show().find(\'select\').prop(\'" +
|
||||||
|
"disabled\', false);\r\n break;\r\n " +
|
||||||
WriteLiteral(" href=\"#\"");
|
"case \'Profile\':\r\n $(\'#Devices_Export_Type_Target_Prof" +
|
||||||
|
"ile\').show().find(\'select\').prop(\'disabled\', false);\r\n " +
|
||||||
WriteLiteral(">ALL</a> | <a");
|
" break;\r\n case \'Model\':\r\n $(\'" +
|
||||||
|
"#Devices_Export_Type_Target_Model\').show().find(\'select\').prop(\'disabled\', false" +
|
||||||
WriteLiteral(" class=\"selectNone\"");
|
");\r\n break;\r\n }\r\n }" +
|
||||||
|
").trigger(\'change\');\r\n\r\n $.validator.unobtrusive.parse($form);\r\n " +
|
||||||
WriteLiteral(" href=\"#\"");
|
" $form.data(\"validator\").settings.submitHandler = function () {\r\n " +
|
||||||
|
" const exportFieldCount = $(\'#Export_Fields\').find(\'input:chec" +
|
||||||
WriteLiteral(">NONE</a></span>\r\n");
|
"ked\').length;\r\n if (exportFieldCount > 0) {\r\n " +
|
||||||
|
" if ($exportingDialog == null) {\r\n $exportingD" +
|
||||||
|
"ialog = $(\'#Export_Exporting\').dialog({\r\n width: " +
|
||||||
#line 57 "..\..\Views\Device\Export.cshtml"
|
"400,\r\n height: 164,\r\n " +
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" </th>\r\n <td>\r\n " +
|
|
||||||
" <div");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"Devices_Export_Fields_Group\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <table");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"none\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <tr>\r\n " +
|
|
||||||
" <td");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 50%\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <ul");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"none\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 65 "..\..\Views\Device\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
#line 65 "..\..\Views\Device\Export.cshtml"
|
|
||||||
foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <li");
|
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 4003), Tuple.Create("\"", 4034)
|
|
||||||
|
|
||||||
#line 67 "..\..\Views\Device\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4011), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4011), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <input");
|
|
||||||
|
|
||||||
WriteLiteral(" type=\"checkbox\"");
|
|
||||||
|
|
||||||
WriteAttribute("id", Tuple.Create(" id=\"", 4116), Tuple.Create("\"", 4153)
|
|
||||||
, Tuple.Create(Tuple.Create("", 4121), Tuple.Create("Options_", 4121), true)
|
|
||||||
|
|
||||||
#line 68 "..\..\Views\Device\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4129), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4129), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteAttribute("name", Tuple.Create(" name=\"", 4154), Tuple.Create("\"", 4193)
|
|
||||||
, Tuple.Create(Tuple.Create("", 4161), Tuple.Create("Options.", 4161), true)
|
|
||||||
|
|
||||||
#line 68 "..\..\Views\Device\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4169), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4169), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(" value=\"true\"");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
|
||||||
|
|
||||||
|
|
||||||
#line 68 "..\..\Views\Device\Export.cshtml"
|
|
||||||
Write(((bool)optionItem.Model) ? "checked " : null);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" /><label");
|
|
||||||
|
|
||||||
WriteAttribute("for", Tuple.Create(" for=\"", 4264), Tuple.Create("\"", 4302)
|
|
||||||
, Tuple.Create(Tuple.Create("", 4270), Tuple.Create("Options_", 4270), true)
|
|
||||||
|
|
||||||
#line 68 "..\..\Views\Device\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4278), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4278), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">");
|
|
||||||
|
|
||||||
|
|
||||||
#line 68 "..\..\Views\Device\Export.cshtml"
|
|
||||||
Write(optionItem.DisplayName);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("</label>\r\n </li>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 70 "..\..\Views\Device\Export.cshtml"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" </ul>\r\n " +
|
|
||||||
" </td>\r\n <td");
|
|
||||||
|
|
||||||
WriteLiteral(" style=\"width: 50%\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <ul");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"none\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 75 "..\..\Views\Device\Export.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
#line 75 "..\..\Views\Device\Export.cshtml"
|
|
||||||
foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <li");
|
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 4891), Tuple.Create("\"", 4922)
|
|
||||||
|
|
||||||
#line 77 "..\..\Views\Device\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 4899), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 4899), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <input");
|
|
||||||
|
|
||||||
WriteLiteral(" type=\"checkbox\"");
|
|
||||||
|
|
||||||
WriteAttribute("id", Tuple.Create(" id=\"", 5004), Tuple.Create("\"", 5041)
|
|
||||||
, Tuple.Create(Tuple.Create("", 5009), Tuple.Create("Options_", 5009), true)
|
|
||||||
|
|
||||||
#line 78 "..\..\Views\Device\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 5017), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 5017), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteAttribute("name", Tuple.Create(" name=\"", 5042), Tuple.Create("\"", 5081)
|
|
||||||
, Tuple.Create(Tuple.Create("", 5049), Tuple.Create("Options.", 5049), true)
|
|
||||||
|
|
||||||
#line 78 "..\..\Views\Device\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 5057), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 5057), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(" value=\"true\"");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
|
||||||
|
|
||||||
|
|
||||||
#line 78 "..\..\Views\Device\Export.cshtml"
|
|
||||||
Write(((bool)optionItem.Model) ? "checked " : null);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" /><label");
|
|
||||||
|
|
||||||
WriteAttribute("for", Tuple.Create(" for=\"", 5152), Tuple.Create("\"", 5190)
|
|
||||||
, Tuple.Create(Tuple.Create("", 5158), Tuple.Create("Options_", 5158), true)
|
|
||||||
|
|
||||||
#line 78 "..\..\Views\Device\Export.cshtml"
|
|
||||||
, Tuple.Create(Tuple.Create("", 5166), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
, 5166), false)
|
|
||||||
);
|
|
||||||
|
|
||||||
WriteLiteral(">");
|
|
||||||
|
|
||||||
|
|
||||||
#line 78 "..\..\Views\Device\Export.cshtml"
|
|
||||||
Write(optionItem.DisplayName);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("</label>\r\n </li>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 80 "..\..\Views\Device\Export.cshtml"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(@" </ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
");
|
|
||||||
|
|
||||||
|
|
||||||
#line 88 "..\..\Views\Device\Export.cshtml"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" </table>\r\n </div>\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" <script>\r\n $(function () {\r\n var exportDefaultF" +
|
|
||||||
"ields = [\'DeviceSerialNumber\', \'ModelId\', \'ProfileId\', \'BatchId\', \'AssignedUserI" +
|
|
||||||
"d\', \'DeviceLocation\', \'DeviceAssetNumber\'];\r\n var $exportFields =" +
|
|
||||||
" $(\'#Devices_Export_Fields\');\r\n var $exportType = $(\'#Options_Exp" +
|
|
||||||
"ortType\');\r\n var $exportTypeTargetContainers = $(\'#Devices_Export" +
|
|
||||||
"_Type\').find(\'.Devices_Export_Type_Target\');\r\n var $form = $expor" +
|
|
||||||
"tType.closest(\'form\');\r\n var $exportingDialog = null;\r\n\r\n " +
|
|
||||||
" function exportTypeChange() {\r\n $exportTypeTargetCont" +
|
|
||||||
"ainers.hide();\r\n $exportTypeTargetContainers.find(\'select\').p" +
|
|
||||||
"rop(\'disabled\', true);\r\n\r\n switch ($exportType.val()) {\r\n " +
|
|
||||||
" case \'Batch\':\r\n $(\'#Devices_Expor" +
|
|
||||||
"t_Type_Target_Batch\').show().find(\'select\').prop(\'disabled\', false);\r\n " +
|
|
||||||
" break;\r\n case \'Profile\':\r\n " +
|
|
||||||
" $(\'#Devices_Export_Type_Target_Profile\').show().find(\'select\').pr" +
|
|
||||||
"op(\'disabled\', false);\r\n break;\r\n " +
|
|
||||||
" case \'Model\':\r\n $(\'#Devices_Export_Type_Target_Mo" +
|
|
||||||
"del\').show().find(\'select\').prop(\'disabled\', false);\r\n " +
|
|
||||||
" break;\r\n }\r\n }\r\n $exportType." +
|
|
||||||
"change(exportTypeChange);\r\n exportTypeChange();\r\n\r\n " +
|
|
||||||
" $exportFields.on(\'click\', \'a.selectAll,a.selectNone\', function () {\r\n " +
|
|
||||||
" var $this = $(this);\r\n\r\n $this.closest(\'tr\').find(" +
|
|
||||||
"\'input\').prop(\'checked\', $this.is(\'.selectAll\'));\r\n\r\n return " +
|
|
||||||
"false;\r\n });\r\n\r\n $(\'#Devices_Export_Fields_Default" +
|
|
||||||
"s\').click(function () {\r\n\r\n $exportFields.find(\'input\').prop(" +
|
|
||||||
"\'checked\', false);\r\n\r\n $.each(exportDefaultFields, function (" +
|
|
||||||
"index, value) {\r\n $(\'#Options_\' + value).prop(\'checked\', " +
|
|
||||||
"true);\r\n });\r\n\r\n return false;\r\n " +
|
|
||||||
" });\r\n\r\n // Submit Validation\r\n function subm" +
|
|
||||||
"itHandler() {\r\n var exportFieldCount = $exportFields.find(\'in" +
|
|
||||||
"put:checked\').length;\r\n\r\n if (exportFieldCount > 0) {\r\n\r\n " +
|
|
||||||
" if ($exportingDialog == null) {\r\n " +
|
|
||||||
" $exportingDialog = $(\'#Devices_Export_Exporting\').dialog({\r\n " +
|
|
||||||
" width: 400,\r\n height: 164,\r\n " +
|
|
||||||
" resizable: false,\r\n modal" +
|
|
||||||
": true,\r\n autoOpen: false\r\n " +
|
|
||||||
" });\r\n }\r\n $exportingDialog.d" +
|
|
||||||
"ialog(\'open\');\r\n\r\n $form[0].submit();\r\n " +
|
|
||||||
" }\r\n else\r\n alert(\'Select at least on" +
|
|
||||||
"e field to export.\');\r\n }\r\n $.validator.unobtrusiv" +
|
|
||||||
"e.parse($form);\r\n $form.data(\"validator\").settings.submitHandler " +
|
|
||||||
"= submitHandler;\r\n\r\n $(\'#Devices_Export_Download_Dialog\').dialog(" +
|
|
||||||
"{\r\n width: 400,\r\n height: 164,\r\n " +
|
|
||||||
" resizable: false,\r\n modal: true,\r\n " +
|
" resizable: false,\r\n modal: true,\r\n " +
|
||||||
" autoOpen: true\r\n });\r\n $(\'#Devices_Export_Butto" +
|
" autoOpen: false\r\n });\r\n " +
|
||||||
"n\').click(function () {\r\n $form.submit();\r\n })" +
|
" }\r\n $exportingDialog.dialog(\'open\');\r\n\r\n " +
|
||||||
";\r\n $(\'#Devices_Export_Save_Button\').click(function () {\r\n " +
|
" $form[0].submit();\r\n return;\r\n " +
|
||||||
|
" }\r\n\r\n alert(\'Select at least one field to expo" +
|
||||||
|
"rt.\');\r\n };\r\n\r\n $(\'#Devices_Export_Button\').on(\'cl" +
|
||||||
|
"ick\', function () {\r\n $form.submit();\r\n });\r\n " +
|
||||||
|
" $(\'#Devices_Export_Save_Button\').on(\'click\', function () {\r\n " +
|
||||||
" $form.attr(\'action\', $form[0].dataset.saveaction);\r\n " +
|
" $form.attr(\'action\', $form[0].dataset.saveaction);\r\n " +
|
||||||
" $form.submit();\r\n });\r\n });\r\n </script>\r\n");
|
" $form.submit();\r\n });\r\n });\r\n </script>\r" +
|
||||||
|
"\n");
|
||||||
|
|
||||||
|
|
||||||
#line 180 "..\..\Views\Device\Export.cshtml"
|
#line 96 "..\..\Views\Device\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -584,7 +257,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
|||||||
WriteLiteral("</div>\r\n");
|
WriteLiteral("</div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 182 "..\..\Views\Device\Export.cshtml"
|
#line 98 "..\..\Views\Device\Export.cshtml"
|
||||||
if (Model.ExportId.HasValue)
|
if (Model.ExportId.HasValue)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -593,7 +266,7 @@ WriteLiteral("</div>\r\n");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <div");
|
WriteLiteral(" <div");
|
||||||
|
|
||||||
WriteLiteral(" id=\"Devices_Export_Download_Dialog\"");
|
WriteLiteral(" id=\"Export_Download_Dialog\"");
|
||||||
|
|
||||||
WriteLiteral(" class=\"dialog\"");
|
WriteLiteral(" class=\"dialog\"");
|
||||||
|
|
||||||
@@ -602,13 +275,13 @@ WriteLiteral(" title=\"Export Devices\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 185 "..\..\Views\Device\Export.cshtml"
|
#line 101 "..\..\Views\Device\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 185 "..\..\Views\Device\Export.cshtml"
|
#line 101 "..\..\Views\Device\Export.cshtml"
|
||||||
if (Model.ExportResult.RecordCount == 0)
|
if (Model.ExportResult.RecordCount == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -618,7 +291,7 @@ WriteLiteral(">\r\n");
|
|||||||
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 188 "..\..\Views\Device\Export.cshtml"
|
#line 104 "..\..\Views\Device\Export.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -629,7 +302,7 @@ WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
|||||||
WriteLiteral(" <h4>");
|
WriteLiteral(" <h4>");
|
||||||
|
|
||||||
|
|
||||||
#line 191 "..\..\Views\Device\Export.cshtml"
|
#line 107 "..\..\Views\Device\Export.cshtml"
|
||||||
Write(Model.ExportResult.RecordCount);
|
Write(Model.ExportResult.RecordCount);
|
||||||
|
|
||||||
|
|
||||||
@@ -638,7 +311,7 @@ WriteLiteral(" <h4>");
|
|||||||
WriteLiteral(" record");
|
WriteLiteral(" record");
|
||||||
|
|
||||||
|
|
||||||
#line 191 "..\..\Views\Device\Export.cshtml"
|
#line 107 "..\..\Views\Device\Export.cshtml"
|
||||||
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
||||||
|
|
||||||
|
|
||||||
@@ -648,14 +321,14 @@ WriteLiteral(" were successfully exported.</h4>\r\n");
|
|||||||
|
|
||||||
WriteLiteral(" <a");
|
WriteLiteral(" <a");
|
||||||
|
|
||||||
WriteAttribute("href", Tuple.Create(" href=\"", 9958), Tuple.Create("\"", 10029)
|
WriteAttribute("href", Tuple.Create(" href=\"", 5389), Tuple.Create("\"", 5460)
|
||||||
|
|
||||||
#line 192 "..\..\Views\Device\Export.cshtml"
|
#line 108 "..\..\Views\Device\Export.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 9965), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.ExportRetrieve(Model.ExportId.Value))
|
, Tuple.Create(Tuple.Create("", 5396), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.ExportRetrieve(Model.ExportId.Value))
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 9965), false)
|
, 5396), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" class=\"button\"");
|
WriteLiteral(" class=\"button\"");
|
||||||
@@ -667,7 +340,7 @@ WriteLiteral(" class=\"fa fa-download fa-lg\"");
|
|||||||
WriteLiteral("></i>Download Device Export</a>\r\n");
|
WriteLiteral("></i>Download Device Export</a>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 193 "..\..\Views\Device\Export.cshtml"
|
#line 109 "..\..\Views\Device\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -677,7 +350,7 @@ WriteLiteral(" </div>\r\n");
|
|||||||
|
|
||||||
WriteLiteral(@" <script>
|
WriteLiteral(@" <script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#Devices_Export_Download_Dialog')
|
$('#Export_Download_Dialog')
|
||||||
.dialog({
|
.dialog({
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 164,
|
height: 164,
|
||||||
@@ -690,7 +363,7 @@ WriteLiteral(@" <script>
|
|||||||
");
|
");
|
||||||
|
|
||||||
|
|
||||||
#line 207 "..\..\Views\Device\Export.cshtml"
|
#line 123 "..\..\Views\Device\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -698,7 +371,7 @@ WriteLiteral(@" <script>
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("<div");
|
WriteLiteral("<div");
|
||||||
|
|
||||||
WriteLiteral(" id=\"Devices_Export_Exporting\"");
|
WriteLiteral(" id=\"Export_Exporting\"");
|
||||||
|
|
||||||
WriteLiteral(" class=\"dialog\"");
|
WriteLiteral(" class=\"dialog\"");
|
||||||
|
|
||||||
@@ -717,13 +390,13 @@ WriteLiteral(" class=\"actionBar\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 212 "..\..\Views\Device\Export.cshtml"
|
#line 128 "..\..\Views\Device\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 212 "..\..\Views\Device\Export.cshtml"
|
#line 128 "..\..\Views\Device\Export.cshtml"
|
||||||
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -741,7 +414,7 @@ WriteLiteral(" class=\"button\"");
|
|||||||
WriteLiteral(">Save Export</button>\r\n");
|
WriteLiteral(">Save Export</button>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 215 "..\..\Views\Device\Export.cshtml"
|
#line 131 "..\..\Views\Device\Export.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -762,7 +435,7 @@ WriteLiteral(" title=\"Requires Manage Saved Exports Permission\"");
|
|||||||
WriteLiteral(">Save Export</button>\r\n");
|
WriteLiteral(">Save Export</button>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 219 "..\..\Views\Device\Export.cshtml"
|
#line 135 "..\..\Views\Device\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -225,7 +225,7 @@
|
|||||||
|
|
||||||
if (exportFieldCount > 0) {
|
if (exportFieldCount > 0) {
|
||||||
|
|
||||||
const $exportingDialog = $('#Devices_Export_Exporting').dialog({
|
const $exportingDialog = $('#Export_Exporting').dialog({
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 164,
|
height: 164,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
@@ -239,13 +239,6 @@
|
|||||||
alert('Select at least one field to export.');
|
alert('Select at least one field to export.');
|
||||||
};
|
};
|
||||||
|
|
||||||
$('#Devices_Export_Download_Dialog').dialog({
|
|
||||||
width: 400,
|
|
||||||
height: 164,
|
|
||||||
resizable: false,
|
|
||||||
modal: true,
|
|
||||||
autoOpen: true
|
|
||||||
});
|
|
||||||
$('#Jobs_Export_Button').click(function () {
|
$('#Jobs_Export_Button').click(function () {
|
||||||
$form.submit();
|
$form.submit();
|
||||||
});
|
});
|
||||||
@@ -259,7 +252,7 @@
|
|||||||
</div>
|
</div>
|
||||||
@if (Model.ExportId.HasValue)
|
@if (Model.ExportId.HasValue)
|
||||||
{
|
{
|
||||||
<div id="Jobs_Export_Download_Dialog" class="dialog" title="Export Jobs">
|
<div id="Export_Download_Dialog" class="dialog" title="Export Jobs">
|
||||||
@if (Model.ExportResult.RecordCount == 0)
|
@if (Model.ExportResult.RecordCount == 0)
|
||||||
{
|
{
|
||||||
<h4>No records matched the filter criteria</h4>
|
<h4>No records matched the filter criteria</h4>
|
||||||
@@ -272,7 +265,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#Jobs_Export_Download_Dialog')
|
$('#Export_Download_Dialog')
|
||||||
.dialog({
|
.dialog({
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 164,
|
height: 164,
|
||||||
@@ -283,7 +276,7 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
<div id="Jobs_Export_Exporting" class="dialog" title="Exporting Jobs...">
|
<div id="Export_Exporting" class="dialog" title="Exporting Jobs...">
|
||||||
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting jobs...</h4>
|
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting jobs...</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="actionBar">
|
<div class="actionBar">
|
||||||
|
|||||||
@@ -936,24 +936,20 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
|||||||
"e($form);\r\n $form.data(\"validator\").settings.submitHandler = func" +
|
"e($form);\r\n $form.data(\"validator\").settings.submitHandler = func" +
|
||||||
"tion () {\r\n var exportFieldCount = $exportFields.find(\'input:" +
|
"tion () {\r\n var exportFieldCount = $exportFields.find(\'input:" +
|
||||||
"checked\').length;\r\n\r\n if (exportFieldCount > 0) {\r\n\r\n " +
|
"checked\').length;\r\n\r\n if (exportFieldCount > 0) {\r\n\r\n " +
|
||||||
" const $exportingDialog = $(\'#Devices_Export_Exporting\').dialog({" +
|
" const $exportingDialog = $(\'#Export_Exporting\').dialog({\r\n " +
|
||||||
"\r\n width: 400,\r\n height: 1" +
|
" width: 400,\r\n height: 164,\r\n " +
|
||||||
"64,\r\n resizable: false,\r\n " +
|
" resizable: false,\r\n modal: t" +
|
||||||
"modal: true,\r\n autoOpen: true\r\n " +
|
"rue,\r\n autoOpen: true\r\n });\r\n\r" +
|
||||||
" });\r\n\r\n $form[0].submit();\r\n }\r\n " +
|
"\n $form[0].submit();\r\n }\r\n " +
|
||||||
" else\r\n alert(\'Select at least one field t" +
|
" else\r\n alert(\'Select at least one field to export" +
|
||||||
"o export.\');\r\n };\r\n\r\n $(\'#Devices_Export_Download_" +
|
".\');\r\n };\r\n\r\n $(\'#Jobs_Export_Button\').click(funct" +
|
||||||
"Dialog\').dialog({\r\n width: 400,\r\n height: " +
|
"ion () {\r\n $form.submit();\r\n });\r\n " +
|
||||||
"164,\r\n resizable: false,\r\n modal: true,\r\n " +
|
" $(\'#Jobs_Export_Save_Button\').click(function () {\r\n $form" +
|
||||||
" autoOpen: true\r\n });\r\n $(\'#Jobs" +
|
".attr(\'action\', $form[0].dataset.saveaction);\r\n $form.submit(" +
|
||||||
"_Export_Button\').click(function () {\r\n $form.submit();\r\n " +
|
");\r\n });\r\n });\r\n </script>\r\n");
|
||||||
" });\r\n $(\'#Jobs_Export_Save_Button\').click(function () " +
|
|
||||||
"{\r\n $form.attr(\'action\', $form[0].dataset.saveaction);\r\n " +
|
|
||||||
" $form.submit();\r\n });\r\n });\r\n </" +
|
|
||||||
"script>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 258 "..\..\Views\Job\Export.cshtml"
|
#line 251 "..\..\Views\Job\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -962,7 +958,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
|||||||
WriteLiteral("</div>\r\n");
|
WriteLiteral("</div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 260 "..\..\Views\Job\Export.cshtml"
|
#line 253 "..\..\Views\Job\Export.cshtml"
|
||||||
if (Model.ExportId.HasValue)
|
if (Model.ExportId.HasValue)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -971,7 +967,7 @@ WriteLiteral("</div>\r\n");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <div");
|
WriteLiteral(" <div");
|
||||||
|
|
||||||
WriteLiteral(" id=\"Jobs_Export_Download_Dialog\"");
|
WriteLiteral(" id=\"Export_Download_Dialog\"");
|
||||||
|
|
||||||
WriteLiteral(" class=\"dialog\"");
|
WriteLiteral(" class=\"dialog\"");
|
||||||
|
|
||||||
@@ -980,13 +976,13 @@ WriteLiteral(" title=\"Export Jobs\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 263 "..\..\Views\Job\Export.cshtml"
|
#line 256 "..\..\Views\Job\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 263 "..\..\Views\Job\Export.cshtml"
|
#line 256 "..\..\Views\Job\Export.cshtml"
|
||||||
if (Model.ExportResult.RecordCount == 0)
|
if (Model.ExportResult.RecordCount == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -996,7 +992,7 @@ WriteLiteral(">\r\n");
|
|||||||
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 266 "..\..\Views\Job\Export.cshtml"
|
#line 259 "..\..\Views\Job\Export.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1007,7 +1003,7 @@ WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
|||||||
WriteLiteral(" <h4>");
|
WriteLiteral(" <h4>");
|
||||||
|
|
||||||
|
|
||||||
#line 269 "..\..\Views\Job\Export.cshtml"
|
#line 262 "..\..\Views\Job\Export.cshtml"
|
||||||
Write(Model.ExportResult.RecordCount);
|
Write(Model.ExportResult.RecordCount);
|
||||||
|
|
||||||
|
|
||||||
@@ -1016,7 +1012,7 @@ WriteLiteral(" <h4>");
|
|||||||
WriteLiteral(" record");
|
WriteLiteral(" record");
|
||||||
|
|
||||||
|
|
||||||
#line 269 "..\..\Views\Job\Export.cshtml"
|
#line 262 "..\..\Views\Job\Export.cshtml"
|
||||||
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
||||||
|
|
||||||
|
|
||||||
@@ -1026,14 +1022,14 @@ WriteLiteral(" were successfully exported.</h4>\r\n");
|
|||||||
|
|
||||||
WriteLiteral(" <a");
|
WriteLiteral(" <a");
|
||||||
|
|
||||||
WriteAttribute("href", Tuple.Create(" href=\"", 14696), Tuple.Create("\"", 14764)
|
WriteAttribute("href", Tuple.Create(" href=\"", 14423), Tuple.Create("\"", 14491)
|
||||||
|
|
||||||
#line 270 "..\..\Views\Job\Export.cshtml"
|
#line 263 "..\..\Views\Job\Export.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 14703), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.ExportRetrieve(Model.ExportId.Value))
|
, Tuple.Create(Tuple.Create("", 14430), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.ExportRetrieve(Model.ExportId.Value))
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 14703), false)
|
, 14430), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" class=\"button\"");
|
WriteLiteral(" class=\"button\"");
|
||||||
@@ -1045,7 +1041,7 @@ WriteLiteral(" class=\"fa fa-download fa-lg\"");
|
|||||||
WriteLiteral("></i>Download Job Export</a>\r\n");
|
WriteLiteral("></i>Download Job Export</a>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 271 "..\..\Views\Job\Export.cshtml"
|
#line 264 "..\..\Views\Job\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1055,7 +1051,7 @@ WriteLiteral(" </div>\r\n");
|
|||||||
|
|
||||||
WriteLiteral(@" <script>
|
WriteLiteral(@" <script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#Jobs_Export_Download_Dialog')
|
$('#Export_Download_Dialog')
|
||||||
.dialog({
|
.dialog({
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 164,
|
height: 164,
|
||||||
@@ -1068,7 +1064,7 @@ WriteLiteral(@" <script>
|
|||||||
");
|
");
|
||||||
|
|
||||||
|
|
||||||
#line 285 "..\..\Views\Job\Export.cshtml"
|
#line 278 "..\..\Views\Job\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1076,7 +1072,7 @@ WriteLiteral(@" <script>
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("<div");
|
WriteLiteral("<div");
|
||||||
|
|
||||||
WriteLiteral(" id=\"Jobs_Export_Exporting\"");
|
WriteLiteral(" id=\"Export_Exporting\"");
|
||||||
|
|
||||||
WriteLiteral(" class=\"dialog\"");
|
WriteLiteral(" class=\"dialog\"");
|
||||||
|
|
||||||
@@ -1095,13 +1091,13 @@ WriteLiteral(" class=\"actionBar\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 290 "..\..\Views\Job\Export.cshtml"
|
#line 283 "..\..\Views\Job\Export.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 290 "..\..\Views\Job\Export.cshtml"
|
#line 283 "..\..\Views\Job\Export.cshtml"
|
||||||
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1119,7 +1115,7 @@ WriteLiteral(" class=\"button\"");
|
|||||||
WriteLiteral(">Save Export</button>\r\n");
|
WriteLiteral(">Save Export</button>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 293 "..\..\Views\Job\Export.cshtml"
|
#line 286 "..\..\Views\Job\Export.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1140,7 +1136,7 @@ WriteLiteral(" title=\"Requires Manage Saved Exports Permission\"");
|
|||||||
WriteLiteral(">Save Export</button>\r\n");
|
WriteLiteral(">Save Export</button>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 297 "..\..\Views\Job\Export.cshtml"
|
#line 290 "..\..\Views\Job\Export.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
@using Disco.Models.Services.Exporting;
|
||||||
|
@using System.Collections.Generic;
|
||||||
|
@model List<ExportOptionGroup>
|
||||||
|
@{
|
||||||
|
var optionId = 0;
|
||||||
|
}
|
||||||
|
<div id="Export_Fields" class="form" style="width: 570px; margin-top: 15px;">
|
||||||
|
<h2>Export Fields <a id="Export_Fields_Defaults" href="#">(Defaults)</a></h2>
|
||||||
|
<table>
|
||||||
|
@foreach (var optionGroup in Model)
|
||||||
|
{
|
||||||
|
var optionFields = optionGroup.ToList();
|
||||||
|
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
||||||
|
<tr>
|
||||||
|
<th style="width: 120px;">
|
||||||
|
@optionGroup.Name
|
||||||
|
@if (optionFields.Count > 2)
|
||||||
|
{
|
||||||
|
<span style="display: block;" class="select"><a class="selectAll" href="#">ALL</a> | <a class="selectNone" href="#">NONE</a></span>
|
||||||
|
}
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<div class="Export_Fields_Group">
|
||||||
|
<table class="none">
|
||||||
|
<tr>
|
||||||
|
<td style="width: 50%">
|
||||||
|
<ul class="none">
|
||||||
|
@foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
||||||
|
{
|
||||||
|
<li title="@optionItem.Description">
|
||||||
|
<input type="checkbox" id="Export_Field_Option_@optionId" name="Options.@(optionItem.CustomKey ?? optionItem.Name)" value="@(optionItem.CustomValue ?? "true")" @(optionItem.IsDefault ? " data-default" : null) @((optionItem.IsChecked) ? " checked " : null) /><label for="Export_Field_Option_@optionId">@optionItem.DisplayName</label>
|
||||||
|
</li>
|
||||||
|
optionId++;
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
<td style="width: 50%">
|
||||||
|
<ul class="none">
|
||||||
|
@foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
||||||
|
{
|
||||||
|
<li title="@optionItem.Description">
|
||||||
|
<input type="checkbox" id="Export_Field_Option_@optionId" name="Options.@(optionItem.CustomKey ?? optionItem.Name)" value="@(optionItem.CustomValue ?? "true")" @(optionItem.IsDefault ? " data-default" : null) @((optionItem.IsChecked) ? " checked " : null) /><label for="Export_Field_Option_@optionId">@optionItem.DisplayName</label>
|
||||||
|
</li>
|
||||||
|
optionId++;
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
var $exportFields = $('#Export_Fields');
|
||||||
|
var $form = $exportFields.closest('form');
|
||||||
|
var $exportingDialog = null;
|
||||||
|
|
||||||
|
$exportFields.on('click', 'a.selectAll,a.selectNone', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
const $this = $(this);
|
||||||
|
$this.closest('tr').find('input').prop('checked', $this.is('.selectAll'));
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#Export_Fields_Defaults').click(function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
$exportFields.find('input').prop('checked', false);
|
||||||
|
$exportFields.find('input[data-default]').prop('checked', true);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,450 @@
|
|||||||
|
#pragma warning disable 1591
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace Disco.Web.Views.Shared
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
|
||||||
|
#line 2 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
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.Models.Repository;
|
||||||
|
|
||||||
|
#line 1 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
using Disco.Models.Services.Exporting;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
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("~/Views/Shared/_ExportFields.cshtml")]
|
||||||
|
public partial class _ExportFields : Disco.Services.Web.WebViewPage<List<ExportOptionGroup>>
|
||||||
|
{
|
||||||
|
public _ExportFields()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
public override void Execute()
|
||||||
|
{
|
||||||
|
|
||||||
|
#line 4 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
|
||||||
|
var optionId = 0;
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n<div");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"Export_Fields\"");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"form\"");
|
||||||
|
|
||||||
|
WriteLiteral(" style=\"width: 570px; margin-top: 15px;\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <h2>Export Fields <a");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"Export_Fields_Defaults\"");
|
||||||
|
|
||||||
|
WriteLiteral(" href=\"#\"");
|
||||||
|
|
||||||
|
WriteLiteral(">(Defaults)</a></h2>\r\n <table>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 10 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 10 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
foreach (var optionGroup in Model)
|
||||||
|
{
|
||||||
|
var optionFields = optionGroup.ToList();
|
||||||
|
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <tr>\r\n <th");
|
||||||
|
|
||||||
|
WriteLiteral(" style=\"width: 120px;\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 16 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
Write(optionGroup.Name);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 17 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 17 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
if (optionFields.Count > 2)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <span");
|
||||||
|
|
||||||
|
WriteLiteral(" style=\"display: block;\"");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"select\"");
|
||||||
|
|
||||||
|
WriteLiteral("><a");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"selectAll\"");
|
||||||
|
|
||||||
|
WriteLiteral(" href=\"#\"");
|
||||||
|
|
||||||
|
WriteLiteral(">ALL</a> | <a");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"selectNone\"");
|
||||||
|
|
||||||
|
WriteLiteral(" href=\"#\"");
|
||||||
|
|
||||||
|
WriteLiteral(">NONE</a></span>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 20 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" </th>\r\n <td>\r\n <div");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"Export_Fields_Group\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <table");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"none\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <tr>\r\n <td");
|
||||||
|
|
||||||
|
WriteLiteral(" style=\"width: 50%\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <ul");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"none\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 28 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 28 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <li");
|
||||||
|
|
||||||
|
WriteAttribute("title", Tuple.Create(" title=\"", 1349), Tuple.Create("\"", 1380)
|
||||||
|
|
||||||
|
#line 30 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 1357), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 1357), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <input");
|
||||||
|
|
||||||
|
WriteLiteral(" type=\"checkbox\"");
|
||||||
|
|
||||||
|
WriteAttribute("id", Tuple.Create(" id=\"", 1454), Tuple.Create("\"", 1488)
|
||||||
|
, Tuple.Create(Tuple.Create("", 1459), Tuple.Create("Export_Field_Option_", 1459), true)
|
||||||
|
|
||||||
|
#line 31 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 1479), Tuple.Create<System.Object, System.Int32>(optionId
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 1479), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteAttribute("name", Tuple.Create(" name=\"", 1489), Tuple.Create("\"", 1546)
|
||||||
|
, Tuple.Create(Tuple.Create("", 1496), Tuple.Create("Options.", 1496), true)
|
||||||
|
|
||||||
|
#line 31 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 1504), Tuple.Create<System.Object, System.Int32>(optionItem.CustomKey ?? optionItem.Name
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 1504), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteAttribute("value", Tuple.Create(" value=\"", 1547), Tuple.Create("\"", 1590)
|
||||||
|
|
||||||
|
#line 31 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 1555), Tuple.Create<System.Object, System.Int32>(optionItem.CustomValue ?? "true"
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 1555), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 31 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
Write(optionItem.IsDefault ? " data-default" : null);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 31 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
Write((optionItem.IsChecked) ? " checked " : null);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" /><label");
|
||||||
|
|
||||||
|
WriteAttribute("for", Tuple.Create(" for=\"", 1696), Tuple.Create("\"", 1731)
|
||||||
|
, Tuple.Create(Tuple.Create("", 1702), Tuple.Create("Export_Field_Option_", 1702), true)
|
||||||
|
|
||||||
|
#line 31 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 1722), Tuple.Create<System.Object, System.Int32>(optionId
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 1722), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
|
#line 31 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
Write(optionItem.DisplayName);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("</label>\r\n </li>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 33 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
optionId++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" </ul>\r\n </td>\r" +
|
||||||
|
"\n <td");
|
||||||
|
|
||||||
|
WriteLiteral(" style=\"width: 50%\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <ul");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"none\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 39 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 39 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <li");
|
||||||
|
|
||||||
|
WriteAttribute("title", Tuple.Create(" title=\"", 2305), Tuple.Create("\"", 2336)
|
||||||
|
|
||||||
|
#line 41 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 2313), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 2313), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <input");
|
||||||
|
|
||||||
|
WriteLiteral(" type=\"checkbox\"");
|
||||||
|
|
||||||
|
WriteAttribute("id", Tuple.Create(" id=\"", 2410), Tuple.Create("\"", 2444)
|
||||||
|
, Tuple.Create(Tuple.Create("", 2415), Tuple.Create("Export_Field_Option_", 2415), true)
|
||||||
|
|
||||||
|
#line 42 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 2435), Tuple.Create<System.Object, System.Int32>(optionId
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 2435), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteAttribute("name", Tuple.Create(" name=\"", 2445), Tuple.Create("\"", 2502)
|
||||||
|
, Tuple.Create(Tuple.Create("", 2452), Tuple.Create("Options.", 2452), true)
|
||||||
|
|
||||||
|
#line 42 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 2460), Tuple.Create<System.Object, System.Int32>(optionItem.CustomKey ?? optionItem.Name
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 2460), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteAttribute("value", Tuple.Create(" value=\"", 2503), Tuple.Create("\"", 2546)
|
||||||
|
|
||||||
|
#line 42 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 2511), Tuple.Create<System.Object, System.Int32>(optionItem.CustomValue ?? "true"
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 2511), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 42 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
Write(optionItem.IsDefault ? " data-default" : null);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 42 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
Write((optionItem.IsChecked) ? " checked " : null);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" /><label");
|
||||||
|
|
||||||
|
WriteAttribute("for", Tuple.Create(" for=\"", 2652), Tuple.Create("\"", 2687)
|
||||||
|
, Tuple.Create(Tuple.Create("", 2658), Tuple.Create("Export_Field_Option_", 2658), true)
|
||||||
|
|
||||||
|
#line 42 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 2678), Tuple.Create<System.Object, System.Int32>(optionId
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 2678), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
|
#line 42 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
Write(optionItem.DisplayName);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("</label>\r\n </li>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 44 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
optionId++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" </ul>\r\n </td>\r" +
|
||||||
|
"\n </tr>\r\n </table>\r\n " +
|
||||||
|
" </div>\r\n </td>\r\n </tr>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 53 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(@" </table>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
var $exportFields = $('#Export_Fields');
|
||||||
|
var $form = $exportFields.closest('form');
|
||||||
|
var $exportingDialog = null;
|
||||||
|
|
||||||
|
$exportFields.on('click', 'a.selectAll,a.selectNone', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
const $this = $(this);
|
||||||
|
$this.closest('tr').find('input').prop('checked', $this.is('.selectAll'));
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#Export_Fields_Defaults').click(function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
$exportFields.find('input').prop('checked', false);
|
||||||
|
$exportFields.find('input[data-default]').prop('checked', true);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore 1591
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<div class="page">
|
<div class="page">
|
||||||
<header>
|
<header>
|
||||||
<div id="heading">
|
<div id="heading">
|
||||||
<a href="@Url.Action(MVC.Job.Index())"><i title="Disco ICT - Jobs"></i></a>
|
<a href="@Url.Action(MVC.Job.Index())"><i title="Disco ICT"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<nav>
|
<nav>
|
||||||
<ul id="menu">
|
<ul id="menu">
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ WriteAttribute("href", Tuple.Create(" href=\"", 688), Tuple.Create("\"", 723)
|
|||||||
|
|
||||||
WriteLiteral("><i");
|
WriteLiteral("><i");
|
||||||
|
|
||||||
WriteLiteral(" title=\"Disco ICT - Jobs\"");
|
WriteLiteral(" title=\"Disco ICT\"");
|
||||||
|
|
||||||
WriteLiteral("></i></a>\r\n </div>\r\n <nav>\r\n <ul");
|
WriteLiteral("></i></a>\r\n </div>\r\n <nav>\r\n <ul");
|
||||||
|
|
||||||
@@ -143,15 +143,15 @@ WriteLiteral(" id=\"menu\"");
|
|||||||
|
|
||||||
WriteLiteral(">\r\n <li");
|
WriteLiteral(">\r\n <li");
|
||||||
|
|
||||||
WriteAttribute("class", Tuple.Create(" class=\"", 857), Tuple.Create("\"", 947)
|
WriteAttribute("class", Tuple.Create(" class=\"", 850), Tuple.Create("\"", 940)
|
||||||
, Tuple.Create(Tuple.Create("", 865), Tuple.Create("d-sm", 865), true)
|
, Tuple.Create(Tuple.Create("", 858), Tuple.Create("d-sm", 858), true)
|
||||||
|
|
||||||
#line 24 "..\..\Views\Shared\_Layout.cshtml"
|
#line 24 "..\..\Views\Shared\_Layout.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 869), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Job.Name ? " active" : null
|
, Tuple.Create(Tuple.Create("", 862), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Job.Name ? " active" : null
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 869), false)
|
, 862), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">");
|
WriteLiteral(">");
|
||||||
@@ -208,37 +208,37 @@ WriteLiteral("></i><a>Queues</a>\r\n <ul>\r\n
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <li><a");
|
WriteLiteral(" <li><a");
|
||||||
|
|
||||||
WriteAttribute("href", Tuple.Create(" href=\"", 1688), Tuple.Create("\"", 1745)
|
WriteAttribute("href", Tuple.Create(" href=\"", 1681), Tuple.Create("\"", 1738)
|
||||||
|
|
||||||
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1695), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Queue(queueToken.JobQueue.Id))
|
, Tuple.Create(Tuple.Create("", 1688), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Queue(queueToken.JobQueue.Id))
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1695), false)
|
, 1688), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral("><i");
|
WriteLiteral("><i");
|
||||||
|
|
||||||
WriteAttribute("class", Tuple.Create(" class=\"", 1749), Tuple.Create("\"", 1832)
|
WriteAttribute("class", Tuple.Create(" class=\"", 1742), Tuple.Create("\"", 1825)
|
||||||
, Tuple.Create(Tuple.Create("", 1757), Tuple.Create("fa", 1757), true)
|
, Tuple.Create(Tuple.Create("", 1750), Tuple.Create("fa", 1750), true)
|
||||||
, Tuple.Create(Tuple.Create(" ", 1759), Tuple.Create("fa-", 1760), true)
|
, Tuple.Create(Tuple.Create(" ", 1752), Tuple.Create("fa-", 1753), true)
|
||||||
|
|
||||||
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1763), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.Icon
|
, Tuple.Create(Tuple.Create("", 1756), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.Icon
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1763), false)
|
, 1756), false)
|
||||||
, Tuple.Create(Tuple.Create(" ", 1790), Tuple.Create("fa-fw", 1791), true)
|
, Tuple.Create(Tuple.Create(" ", 1783), Tuple.Create("fa-fw", 1784), true)
|
||||||
, Tuple.Create(Tuple.Create(" ", 1796), Tuple.Create("d-", 1797), true)
|
, Tuple.Create(Tuple.Create(" ", 1789), Tuple.Create("d-", 1790), true)
|
||||||
|
|
||||||
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1799), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.IconColour
|
, Tuple.Create(Tuple.Create("", 1792), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.IconColour
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1799), false)
|
, 1792), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral("></i>");
|
WriteLiteral("></i>");
|
||||||
@@ -718,14 +718,14 @@ WriteLiteral(" </ul>\r\n </li>\r\n");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <li");
|
WriteLiteral(" <li");
|
||||||
|
|
||||||
WriteAttribute("class", Tuple.Create(" class=\"", 6912), Tuple.Create("\"", 7000)
|
WriteAttribute("class", Tuple.Create(" class=\"", 6905), Tuple.Create("\"", 6993)
|
||||||
|
|
||||||
#line 111 "..\..\Views\Shared\_Layout.cshtml"
|
#line 111 "..\..\Views\Shared\_Layout.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 6920), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Device.Name ? "active" : null
|
, Tuple.Create(Tuple.Create("", 6913), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Device.Name ? "active" : null
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 6920), false)
|
, 6913), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">");
|
WriteLiteral(">");
|
||||||
@@ -758,14 +758,14 @@ WriteLiteral(" ");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <li");
|
WriteLiteral(" <li");
|
||||||
|
|
||||||
WriteAttribute("class", Tuple.Create(" class=\"", 7213), Tuple.Create("\"", 7299)
|
WriteAttribute("class", Tuple.Create(" class=\"", 7206), Tuple.Create("\"", 7292)
|
||||||
|
|
||||||
#line 115 "..\..\Views\Shared\_Layout.cshtml"
|
#line 115 "..\..\Views\Shared\_Layout.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 7221), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.User.Name ? "active" : null
|
, Tuple.Create(Tuple.Create("", 7214), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.User.Name ? "active" : null
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 7221), false)
|
, 7214), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">");
|
WriteLiteral(">");
|
||||||
@@ -788,15 +788,15 @@ WriteLiteral("</li>\r\n");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <li");
|
WriteLiteral(" <li");
|
||||||
|
|
||||||
WriteAttribute("class", Tuple.Create(" class=\"", 7413), Tuple.Create("\"", 7511)
|
WriteAttribute("class", Tuple.Create(" class=\"", 7406), Tuple.Create("\"", 7504)
|
||||||
, Tuple.Create(Tuple.Create("", 7421), Tuple.Create("moveRight", 7421), true)
|
, Tuple.Create(Tuple.Create("", 7414), Tuple.Create("moveRight", 7414), true)
|
||||||
|
|
||||||
#line 117 "..\..\Views\Shared\_Layout.cshtml"
|
#line 117 "..\..\Views\Shared\_Layout.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 7430), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Public.Name ? " active" : null
|
, Tuple.Create(Tuple.Create("", 7423), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Public.Name ? " active" : null
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 7430), false)
|
, 7423), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">");
|
WriteLiteral(">");
|
||||||
@@ -826,14 +826,14 @@ WriteLiteral("</li>\r\n");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <li");
|
WriteLiteral(" <li");
|
||||||
|
|
||||||
WriteAttribute("class", Tuple.Create(" class=\"", 7689), Tuple.Create("\"", 7777)
|
WriteAttribute("class", Tuple.Create(" class=\"", 7682), Tuple.Create("\"", 7770)
|
||||||
|
|
||||||
#line 120 "..\..\Views\Shared\_Layout.cshtml"
|
#line 120 "..\..\Views\Shared\_Layout.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 7697), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Config.Name ? "active" : null
|
, Tuple.Create(Tuple.Create("", 7690), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Config.Name ? "active" : null
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 7697), false)
|
, 7690), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">");
|
WriteLiteral(">");
|
||||||
|
|||||||
Reference in New Issue
Block a user