feature: document handlers

This commit is contained in:
Gary Sharp
2022-12-03 14:32:05 +11:00
parent 96cccab958
commit 13e666d95a
26 changed files with 1027 additions and 120 deletions
+3
View File
@@ -3,8 +3,10 @@ using Disco.Models.Services.Jobs.JobLists;
using Disco.Models.Services.Plugins.Details;
using Disco.Models.UI.Device;
using Disco.Services.Plugins;
using Disco.Services.Plugins.Features.DocumentHandlerProvider;
using Disco.Web.Models.Shared;
using System.Collections.Generic;
using System.Linq;
namespace Disco.Web.Models.Device
{
@@ -30,6 +32,7 @@ namespace Disco.Web.Models.Device
Target = Device,
Templates = DocumentTemplates,
TemplatePackages = DocumentTemplatePackages,
HandlersPresent = Plugins.GetPluginFeatures(typeof(DocumentHandlerProviderFeature)).Any(),
};
public DetailsResult DeviceDetails { get; set; }
+4
View File
@@ -3,9 +3,12 @@ using Disco.Models.Services.Job;
using Disco.Models.Services.Jobs.JobLists;
using Disco.Models.Services.Plugins.Details;
using Disco.Models.UI.Job;
using Disco.Services.Plugins;
using Disco.Services.Plugins.Features.DocumentHandlerProvider;
using Disco.Web.Models.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Disco.Web.Models.Job
{
@@ -22,6 +25,7 @@ namespace Disco.Web.Models.Job
Target = Job,
Templates = AvailableDocumentTemplates,
TemplatePackages = AvailableDocumentTemplatePackages,
HandlersPresent = Plugins.GetPluginFeatures(typeof(DocumentHandlerProviderFeature)).Any(),
};
public List<Disco.Models.Repository.JobSubType> UpdatableJobSubTypes { get; set; }
@@ -1,6 +1,5 @@
using Disco.Models.Repository;
using Disco.Models.Services.Documents;
using Disco.Services.Plugins.Features.DocumentHandlerProvider;
using System.Collections.Generic;
namespace Disco.Web.Models.Shared
@@ -10,5 +9,6 @@ namespace Disco.Web.Models.Shared
public IAttachmentTarget Target { get; set; }
public List<DocumentTemplate> Templates { get; set; }
public List<DocumentTemplatePackage> TemplatePackages { get; set; }
public bool HandlersPresent { get; set; }
}
}
+3
View File
@@ -4,6 +4,8 @@ using Disco.Models.Services.Documents;
using Disco.Models.Services.Jobs.JobLists;
using Disco.Models.Services.Plugins.Details;
using Disco.Models.UI.User;
using Disco.Services.Plugins;
using Disco.Services.Plugins.Features.DocumentHandlerProvider;
using Disco.Web.Models.Shared;
using System.Collections.Generic;
using System.Linq;
@@ -21,6 +23,7 @@ namespace Disco.Web.Models.User
Target = User,
Templates = DocumentTemplates,
TemplatePackages = DocumentTemplatePackages,
HandlersPresent = Plugins.GetPluginFeatures(typeof(DocumentHandlerProviderFeature)).Any(),
};
public List<UserFlag> AvailableUserFlags { get; set; }