Update: New Device UI

This commit is contained in:
Gary Sharp
2013-06-18 17:18:19 +10:00
parent d6be58b5c7
commit b7dc05dd65
63 changed files with 5068 additions and 2626 deletions
+17 -2
View File
@@ -11,6 +11,7 @@ using System.Data.Objects.SqlClient;
using Disco.Web.Extensions;
using Disco.Services.Plugins.Features.UIExtension;
using Disco.Models.UI.Device;
using Disco.Services.Plugins;
namespace Disco.Web.Controllers
@@ -109,14 +110,28 @@ namespace Disco.Web.Controllers
m.DeviceBatches = dbContext.DeviceBatches.ToList();
m.Jobs = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true, ShowDevice = false, IsSmallTable = true, HideClosedJobs = true };
m.Jobs.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.DeviceSerialNumber == m.Device.SerialNumber));
m.Jobs = new Disco.Models.BI.Job.JobTableModel()
{
ShowStatus = true,
ShowDevice = false,
IsSmallTable = false,
HideClosedJobs = true,
EnablePaging = false
};
m.Jobs.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.DeviceSerialNumber == m.Device.SerialNumber).OrderByDescending(j => j.Id));
m.Certificates = dbContext.DeviceCertificates.Where(c => c.DeviceSerialNumber == m.Device.SerialNumber).ToList();
//m.AttachmentTypes = dbContext.AttachmentTypes.Where(at => at.Scope == AttachmentType.AttachmentTypeScopes.Device).ToList();
m.DocumentTemplates = m.Device.AvailableDocumentTemplates(dbContext, DiscoApplication.CurrentUser, DateTime.Now);
m.DeviceProfileDefaultOrganisationAddress = m.Device.DeviceProfile.DefaultOrganisationAddressDetails(dbContext);
PluginFeatureManifest deviceProfileCertificateProvider;
if (Disco.Services.Plugins.Plugins.TryGetPluginFeature(m.Device.DeviceProfile.CertificateProviderId, out deviceProfileCertificateProvider))
m.DeviceProfileCertificateProvider = deviceProfileCertificateProvider;
// UI Extensions
UIExtensions.ExecuteExtensions<DeviceShowModel>(this.ControllerContext, m);