Update: Plugin UI Extensions

Add additional Results; Implemented UI Extensions on Device, Job and
User Controllers
This commit is contained in:
Gary Sharp
2013-02-28 17:13:15 +11:00
parent 15e2c2a501
commit 989f08a24d
43 changed files with 1108 additions and 705 deletions
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0221.1820")] [assembly: AssemblyVersion("1.2.0225.1951")]
[assembly: AssemblyFileVersion("1.2.0221.1820")] [assembly: AssemblyFileVersion("1.2.0225.1951")]
Binary file not shown.
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0221.1820")] [assembly: AssemblyVersion("1.2.0225.1950")]
[assembly: AssemblyFileVersion("1.2.0221.1820")] [assembly: AssemblyFileVersion("1.2.0225.1950")]
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0221.1820")] [assembly: AssemblyVersion("1.2.0225.1950")]
[assembly: AssemblyFileVersion("1.2.0221.1820")] [assembly: AssemblyFileVersion("1.2.0225.1950")]
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0221.1820")] [assembly: AssemblyVersion("1.2.0225.1951")]
[assembly: AssemblyFileVersion("1.2.0221.1820")] [assembly: AssemblyFileVersion("1.2.0225.1951")]
+8 -1
View File
@@ -97,7 +97,14 @@
<Compile Include="Repository\User\UserAttachment.cs" /> <Compile Include="Repository\User\UserAttachment.cs" />
<Compile Include="Repository\User\UserDetail.cs" /> <Compile Include="Repository\User\UserDetail.cs" />
<Compile Include="UI\BaseUIModel.cs" /> <Compile Include="UI\BaseUIModel.cs" />
<Compile Include="UI\Device\DeviceIndexModel.cs" />
<Compile Include="UI\Device\DeviceShowModel.cs" />
<Compile Include="UI\Job\JobCreateModel.cs" />
<Compile Include="UI\Job\JobIndexModel.cs" />
<Compile Include="UI\Job\JobListModel.cs" />
<Compile Include="UI\Job\JobShowModel.cs" /> <Compile Include="UI\Job\JobShowModel.cs" />
<Compile Include="UI\User\UserIndexModel.cs" />
<Compile Include="UI\User\UserShowModel.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="App.config" /> <None Include="App.config" />
@@ -105,7 +112,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>
<UserProperties BuildVersion_StartDate="2001/1/1" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="True" BuildVersion_BuildAction="ReBuild" /> <UserProperties BuildVersion_BuildAction="ReBuild" BuildVersion_UseGlobalSettings="True" BuildVersion_DetectChanges="False" BuildVersion_StartDate="2001/1/1" />
</VisualStudio> </VisualStudio>
</ProjectExtensions> </ProjectExtensions>
<PropertyGroup> <PropertyGroup>
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0221.1820")] [assembly: AssemblyVersion("1.2.0225.1951")]
[assembly: AssemblyFileVersion("1.2.0221.1820")] [assembly: AssemblyFileVersion("1.2.0225.1951")]
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.UI.Device
{
public interface DeviceIndexModel : BaseUIModel
{
}
}
+22
View File
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.UI.Device
{
public interface DeviceShowModel : BaseUIModel
{
Disco.Models.Repository.Device Device { get; set; }
List<Disco.Models.Repository.DeviceProfile> DeviceProfiles { get; set; }
List<Disco.Models.Repository.DeviceBatch> DeviceBatches { get; set; }
Disco.Models.BI.Job.JobTableModel Jobs { get; set; }
List<Disco.Models.Repository.DeviceCertificate> Certificates { get; set; }
List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
}
}
+33
View File
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.UI.Job
{
public interface JobCreateModel : BaseUIModel
{
string DeviceSerialNumber { get; set; }
string UserId { get; set; }
string Type { get; set; }
List<string> SubTypes { get; set; }
string Comments { get; set; }
bool? DeviceHeld { get; set; }
string QuickLogDestinationUrl { get; set; }
bool? QuickLog { get; set; }
int? QuickLogTaskTimeMinutes { get; set; }
int? QuickLogTaskTimeMinutesOther { get; set; }
Disco.Models.Repository.Device Device { get; set; }
Disco.Models.Repository.User User { get; set; }
List<Disco.Models.Repository.JobType> JobTypes { get; set; }
List<Disco.Models.Repository.JobSubType> JobSubTypes { get; set; }
}
}
+15
View File
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Disco.Models.BI.Job;
namespace Disco.Models.UI.Job
{
public interface JobIndexModel : BaseUIModel
{
JobTableModel OpenJobs { get; set; }
JobTableModel LongRunningJobs { get; set; }
}
}
+14
View File
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.UI.Job
{
public interface JobListModel : BaseUIModel
{
string Title { get; set; }
Disco.Models.BI.Job.JobTableModel JobTable { get; set; }
}
}
+12
View File
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.UI.User
{
public interface UserIndexModel : BaseUIModel
{
}
}
+15
View File
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.UI.User
{
public interface UserShowModel : BaseUIModel
{
Disco.Models.Repository.User User { get; set; }
Disco.Models.BI.Job.JobTableModel Jobs { get; set; }
List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
}
}
+4 -1
View File
@@ -102,7 +102,10 @@
<Compile Include="Logging\Utilities.cs" /> <Compile Include="Logging\Utilities.cs" />
<Compile Include="Plugins\CommunityInterop\PluginLibraryUpdateTask.cs" /> <Compile Include="Plugins\CommunityInterop\PluginLibraryUpdateTask.cs" />
<Compile Include="Plugins\Features\UIExtension\Results\LiteralResult.cs" /> <Compile Include="Plugins\Features\UIExtension\Results\LiteralResult.cs" />
<Compile Include="Plugins\Features\UIExtension\Results\MultipleResult.cs" />
<Compile Include="Plugins\Features\UIExtension\Results\PluginResourceCssResult.cs" />
<Compile Include="Plugins\Features\UIExtension\Results\PluginResourceScriptResult.cs" /> <Compile Include="Plugins\Features\UIExtension\Results\PluginResourceScriptResult.cs" />
<Compile Include="Plugins\Features\UIExtension\Results\PrecompiledPartialViewResult.cs" />
<Compile Include="Plugins\Features\UIExtension\UIExtensionResult.cs" /> <Compile Include="Plugins\Features\UIExtension\UIExtensionResult.cs" />
<Compile Include="Plugins\Features\UIExtension\UIExtensionFeature.cs" /> <Compile Include="Plugins\Features\UIExtension\UIExtensionFeature.cs" />
<Compile Include="Plugins\UpdatePluginsAfterDiscoUpdateTask.cs" /> <Compile Include="Plugins\UpdatePluginsAfterDiscoUpdateTask.cs" />
@@ -137,7 +140,7 @@
<Compile Include="Tasks\ScheduledTaskStatus.cs" /> <Compile Include="Tasks\ScheduledTaskStatus.cs" />
<Compile Include="Tasks\ScheduledTasksLiveStatusService.cs" /> <Compile Include="Tasks\ScheduledTasksLiveStatusService.cs" />
<Compile Include="Tasks\ScheduledTaskStatusLive.cs" /> <Compile Include="Tasks\ScheduledTaskStatusLive.cs" />
<Compile Include="UIExtensions\UIExtensions.cs" /> <Compile Include="Plugins\Features\UIExtension\UIExtensions.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Disco.Data\Disco.Data.csproj"> <ProjectReference Include="..\Disco.Data\Disco.Data.csproj">
@@ -12,13 +12,15 @@ namespace Disco.Services.Plugins.Features.UIExtension.Results
{ {
private string _content; private string _content;
public LiteralResult(PluginFeatureManifest Source, string Content) : base(Source) public LiteralResult(PluginFeatureManifest Source, string Content)
: base(Source)
{ {
this._content = Content; this._content = Content;
} }
public override void ExecuteResult<T>(WebViewPage<T> page) public override void ExecuteResult<T>(WebViewPage<T> page)
{ {
if (!string.IsNullOrEmpty(_content))
page.Write(new HtmlString(_content)); page.Write(new HtmlString(_content));
} }
} }
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Services.Plugins.Features.UIExtension.Results
{
public class MultipleResult : UIExtensionResult
{
private IEnumerable<UIExtensionResult> results;
public MultipleResult(PluginFeatureManifest Source, params UIExtensionResult[] Results) : base(Source)
{
if (Results == null || Results.Length == 0)
throw new ArgumentException("At least one result is required", "Results");
this.results = Results;
}
public override void ExecuteResult<T>(System.Web.Mvc.WebViewPage<T> page)
{
foreach (var result in this.results)
{
result.ExecuteResult(page);
page.WriteLiteral("\n");
}
}
}
}
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
namespace Disco.Services.Plugins.Features.UIExtension.Results
{
public class PluginResourceCssResult : UIExtensionResult
{
private string _resource;
private HtmlString _resourceUrl;
public PluginResourceCssResult(PluginFeatureManifest Source, string Resource)
: base(Source)
{
this._resource = Resource;
this._resourceUrl = HttpContext.Current.Request.RequestContext.DiscoPluginResourceUrl(Resource, false, Source.PluginManifest);
var deferredBundles = HttpContext.Current.Items["Bundles.UIExtensionCss"] as List<HtmlString>;
if (deferredBundles == null)
{
deferredBundles = new List<HtmlString>();
HttpContext.Current.Items["Bundles.UIExtensionCss"] = deferredBundles;
}
if (!deferredBundles.Contains(this._resourceUrl))
deferredBundles.Add(this._resourceUrl);
}
public override void ExecuteResult<T>(System.Web.Mvc.WebViewPage<T> page)
{
// Nothing Done
}
}
}
@@ -3,23 +3,44 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web;
namespace Disco.Services.Plugins.Features.UIExtension.Results namespace Disco.Services.Plugins.Features.UIExtension.Results
{ {
public class PluginResourceScriptResult : UIExtensionResult public class PluginResourceScriptResult : UIExtensionResult
{ {
private string _resource; private string _resource;
private HtmlString _resourceUrl;
private bool _placeInPageHead;
public PluginResourceScriptResult(PluginFeatureManifest Source, string Resource) : base(Source) public PluginResourceScriptResult(PluginFeatureManifest Source, string Resource, bool PlaceInPageHead)
: base(Source)
{ {
this._resource = Resource; this._resource = Resource;
this._resourceUrl = HttpContext.Current.Request.RequestContext.DiscoPluginResourceUrl(Resource, false, Source.PluginManifest);
this._placeInPageHead = PlaceInPageHead;
if (this._placeInPageHead)
{
var deferredBundles = HttpContext.Current.Items["Bundles.UIExtensionScripts"] as List<HtmlString>;
if (deferredBundles == null)
{
deferredBundles = new List<HtmlString>();
HttpContext.Current.Items["Bundles.UIExtensionScripts"] = deferredBundles;
}
if (!deferredBundles.Contains(this._resourceUrl))
deferredBundles.Add(this._resourceUrl);
}
} }
public override void ExecuteResult<T>(System.Web.Mvc.WebViewPage<T> page) public override void ExecuteResult<T>(System.Web.Mvc.WebViewPage<T> page)
{
if (!this._placeInPageHead)
{ {
page.WriteLiteral("<script src=\""); page.WriteLiteral("<script src=\"");
page.WriteLiteral(page.DiscoPluginResourceUrl(_resource, false, this.Source.PluginManifest)); page.WriteLiteral(_resourceUrl);
page.WriteLiteral("\" type=\"text/javascript\"></script>"); page.WriteLiteral("\" type=\"text/javascript\"></script>");
} }
} }
}
} }
@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using System.Web.WebPages;
namespace Disco.Services.Plugins.Features.UIExtension.Results
{
public class PrecompiledPartialViewResult : UIExtensionResult
{
private Type viewType;
private object model;
public PrecompiledPartialViewResult(PluginFeatureManifest Source, Type ViewType, object Model = null)
: base(Source)
{
if (!typeof(WebViewPage).IsAssignableFrom(ViewType))
throw new ArgumentException("The View Type must inherit from WebViewPage", "ViewType");
this.viewType = ViewType;
this.model = Model;
}
public override void ExecuteResult<T>(System.Web.Mvc.WebViewPage<T> page)
{
WebViewPage partialView = Activator.CreateInstance(viewType) as WebViewPage;
if (partialView == null)
throw new InvalidOperationException("Invalid View Type");
partialView.ViewContext = page.ViewContext;
partialView.ViewData = new ViewDataDictionary(this.model);
partialView.InitHelpers();
partialView.ExecutePageHierarchy(new WebPageContext(page.ViewContext.HttpContext, null, model), page.ViewContext.Writer, null);
}
}
}
@@ -20,9 +20,25 @@ namespace Disco.Services.Plugins.Features.UIExtension
{ {
return new LiteralResult(this.Manifest, Content); return new LiteralResult(this.Manifest, Content);
} }
protected PluginResourceScriptResult ScriptResource(string Resource) protected LiteralResult Nothing()
{ {
return new PluginResourceScriptResult(this.Manifest, Resource); return new LiteralResult(this.Manifest, null);
}
protected PluginResourceScriptResult ScriptResource(string Resource, bool PlaceInPageHead)
{
return new PluginResourceScriptResult(this.Manifest, Resource, PlaceInPageHead);
}
protected PluginResourceCssResult CssResource(string Resource)
{
return new PluginResourceCssResult(this.Manifest, Resource);
}
protected MultipleResult Multiple(params UIExtensionResult[] Results)
{
return new MultipleResult(this.Manifest, Results);
}
protected PrecompiledPartialViewResult Partial(Type PartialViewType, object Model = null)
{
return new PrecompiledPartialViewResult(this.Manifest, PartialViewType, Model);
} }
#endregion #endregion
@@ -30,17 +46,17 @@ namespace Disco.Services.Plugins.Features.UIExtension
#region Registration #region Registration
public bool Register() public bool Register()
{ {
return UIExtensions.UIExtensions.RegisterExtension(this); return UIExtensions.RegisterExtension(this);
} }
public bool Unregister() public bool Unregister()
{ {
return UIExtensions.UIExtensions.UnregisterExtension(this); return UIExtensions.UnregisterExtension(this);
} }
public bool IsRegistered public bool IsRegistered
{ {
get get
{ {
return UIExtensions.UIExtensions.ExtensionRegistered(this); return UIExtensions.ExtensionRegistered(this);
} }
} }
#endregion #endregion
@@ -11,7 +11,7 @@ using Disco.Models.UI;
using Disco.Services.Plugins; using Disco.Services.Plugins;
using Disco.Services.Plugins.Features.UIExtension; using Disco.Services.Plugins.Features.UIExtension;
namespace Disco.Services.UIExtensions namespace Disco.Services.Plugins.Features.UIExtension
{ {
public static class UIExtensions public static class UIExtensions
{ {
+10 -2
View File
@@ -96,11 +96,15 @@ namespace Disco.Services.Plugins
return ViewPage.DiscoPluginResourceUrl(Resource, false, manifest); return ViewPage.DiscoPluginResourceUrl(Resource, false, manifest);
} }
public static HtmlString DiscoPluginResourceUrl<T>(this WebViewPage<T> ViewPage, string Resource, bool Download, PluginManifest manifest) public static HtmlString DiscoPluginResourceUrl<T>(this WebViewPage<T> ViewPage, string Resource, bool Download, PluginManifest manifest)
{
return ViewPage.ViewContext.RequestContext.DiscoPluginResourceUrl(Resource, Download, manifest);
}
public static HtmlString DiscoPluginResourceUrl(this RequestContext RequestContext, string Resource, bool Download, PluginManifest manifest)
{ {
var resourcePath = manifest.WebResourcePath(Resource); var resourcePath = manifest.WebResourcePath(Resource);
var routeValues = new RouteValueDictionary(new { PluginId = manifest.Id, res = Resource }); var routeValues = new RouteValueDictionary(new { PluginId = manifest.Id, res = Resource });
string pluginActionUrl = UrlHelper.GenerateUrl("Plugin_Resources", null, null, routeValues, RouteTable.Routes, ViewPage.ViewContext.RequestContext, false); string pluginActionUrl = UrlHelper.GenerateUrl("Plugin_Resources", null, null, routeValues, RouteTable.Routes, RequestContext, false);
pluginActionUrl += string.Format("?v={0}", resourcePath.Item2); pluginActionUrl += string.Format("?v={0}", resourcePath.Item2);
@@ -122,9 +126,13 @@ namespace Disco.Services.Plugins
return ViewPage.DiscoPluginActionUrl(PluginAction, manifest); return ViewPage.DiscoPluginActionUrl(PluginAction, manifest);
} }
public static HtmlString DiscoPluginActionUrl<T>(this WebViewPage<T> ViewPage, string PluginAction, PluginManifest manifest) public static HtmlString DiscoPluginActionUrl<T>(this WebViewPage<T> ViewPage, string PluginAction, PluginManifest manifest)
{
return ViewPage.ViewContext.RequestContext.DiscoPluginActionUrl(PluginAction, manifest);
}
public static HtmlString DiscoPluginActionUrl(this RequestContext RequestContext, string PluginAction, PluginManifest manifest)
{ {
var routeValues = new RouteValueDictionary(new { PluginId = manifest.Id, PluginAction = PluginAction }); var routeValues = new RouteValueDictionary(new { PluginId = manifest.Id, PluginAction = PluginAction });
string pluginActionUrl = UrlHelper.GenerateUrl("Plugin", null, null, routeValues, RouteTable.Routes, ViewPage.ViewContext.RequestContext, false); string pluginActionUrl = UrlHelper.GenerateUrl("Plugin", null, null, routeValues, RouteTable.Routes, RequestContext, false);
return new HtmlString(pluginActionUrl); return new HtmlString(pluginActionUrl);
} }
public static HtmlString DiscoPluginConfigureUrl<T>(this WebViewPage<T> ViewPage) public static HtmlString DiscoPluginConfigureUrl<T>(this WebViewPage<T> ViewPage)
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0221.1820")] [assembly: AssemblyVersion("1.2.0225.1951")]
[assembly: AssemblyFileVersion("1.2.0221.1820")] [assembly: AssemblyFileVersion("1.2.0225.1951")]
@@ -15,8 +15,7 @@ namespace Disco.Web.Extensions
// Ensure 'App-Relative' Url: // Ensure 'App-Relative' Url:
BundleUrl = BundleUrl.StartsWith("~/") ? BundleUrl : (BundleUrl.StartsWith("/") ? string.Concat("~", BundleUrl) : string.Concat("~/", BundleUrl)); BundleUrl = BundleUrl.StartsWith("~/") ? BundleUrl : (BundleUrl.StartsWith("/") ? string.Concat("~", BundleUrl) : string.Concat("~/", BundleUrl));
var deferredBundles = default(List<string>); var deferredBundles = htmlHelper.ViewContext.HttpContext.Items["Bundles.Deferred"] as List<string>;
deferredBundles = htmlHelper.ViewContext.HttpContext.Items["Bundles.Deferred"] as List<string>;
if (deferredBundles == null) if (deferredBundles == null)
{ {
deferredBundles = new List<string>(); deferredBundles = new List<string>();
@@ -27,17 +26,34 @@ namespace Disco.Web.Extensions
} }
public static HtmlString BundleRenderDeferred(this HtmlHelper htmlHelper) public static HtmlString BundleRenderDeferred(this HtmlHelper htmlHelper)
{ {
var deferredBundles = default(List<string>); var deferredBundles = htmlHelper.ViewContext.HttpContext.Items["Bundles.Deferred"] as List<string>;
deferredBundles = htmlHelper.ViewContext.HttpContext.Items["Bundles.Deferred"] as List<string>;
var uiExtensionScripts = htmlHelper.ViewContext.HttpContext.Items["Bundles.UIExtensionScripts"] as List<HtmlString>;
var uiExtensionCss = htmlHelper.ViewContext.HttpContext.Items["Bundles.UIExtensionCss"] as List<HtmlString>;
if (deferredBundles != null || uiExtensionScripts != null || uiExtensionCss != null)
{
StringBuilder bundleUrls = new StringBuilder();
if (deferredBundles != null) if (deferredBundles != null)
{ {
StringBuilder bundleUrls = new StringBuilder();
deferredBundles.Reverse(); deferredBundles.Reverse();
foreach (string bundleUrl in deferredBundles) foreach (string bundleUrl in deferredBundles)
{ {
bundleUrls.AppendLine(BundleTable.ResolveBundleHtmlElement(bundleUrl)); bundleUrls.AppendLine(BundleTable.ResolveBundleHtmlElement(bundleUrl));
} }
}
if (uiExtensionCss != null)
{
foreach (HtmlString extensionUrl in uiExtensionCss)
bundleUrls.Append("<link href=\"").Append(extensionUrl).AppendLine("\" rel=\"stylesheet\" type=\"text/css\" />");
}
if (uiExtensionScripts != null)
{
foreach (HtmlString extensionUrl in uiExtensionScripts)
bundleUrls.Append("<script src=\"").Append(extensionUrl).AppendLine("\" type=\"text/javascript\"></script>");
}
return new HtmlString(bundleUrls.ToString()); return new HtmlString(bundleUrls.ToString());
} }
else else
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0221.1820")] [assembly: AssemblyVersion("1.2.0225.1951")]
[assembly: AssemblyFileVersion("1.2.0221.1820")] [assembly: AssemblyFileVersion("1.2.0225.1951")]
+11 -1
View File
@@ -9,6 +9,8 @@ using Disco.Data.Repository;
using Disco.Models.Repository; using Disco.Models.Repository;
using System.Data.Objects.SqlClient; using System.Data.Objects.SqlClient;
using Disco.Web.Extensions; using Disco.Web.Extensions;
using Disco.Services.Plugins.Features.UIExtension;
using Disco.Models.UI.Device;
namespace Disco.Web.Controllers namespace Disco.Web.Controllers
@@ -18,6 +20,11 @@ namespace Disco.Web.Controllers
#region Index #region Index
public virtual ActionResult Index() public virtual ActionResult Index()
{ {
Models.Device.IndexModel m = new Models.Device.IndexModel();
// UI Extensions
UIExtensions.ExecuteExtensions<DeviceIndexModel>(this.ControllerContext, m);
return View(); return View();
} }
#endregion #endregion
@@ -97,7 +104,7 @@ namespace Disco.Web.Controllers
m.DeviceProfiles = dbContext.DeviceProfiles.ToList(); m.DeviceProfiles = dbContext.DeviceProfiles.ToList();
m.DeviceBatches = dbContext.DeviceBatches.ToSelectListItems(m.Device.DeviceBatchId); m.DeviceBatches = dbContext.DeviceBatches.ToList();
m.Jobs = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true, ShowDevice = false, IsSmallTable = true, HideClosedJobs = true }; 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.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.DeviceSerialNumber == m.Device.SerialNumber));
@@ -107,6 +114,9 @@ namespace Disco.Web.Controllers
//m.AttachmentTypes = dbContext.AttachmentTypes.Where(at => at.Scope == AttachmentType.AttachmentTypeScopes.Device).ToList(); //m.AttachmentTypes = dbContext.AttachmentTypes.Where(at => at.Scope == AttachmentType.AttachmentTypeScopes.Device).ToList();
m.DocumentTemplates = m.Device.AvailableDocumentTemplates(dbContext, DiscoApplication.CurrentUser, DateTime.Now); m.DocumentTemplates = m.Device.AvailableDocumentTemplates(dbContext, DiscoApplication.CurrentUser, DateTime.Now);
// UI Extensions
UIExtensions.ExecuteExtensions<DeviceShowModel>(this.ControllerContext, m);
return View(m); return View(m);
} }
#endregion #endregion
+54 -1
View File
@@ -10,8 +10,8 @@ using Disco.Models.Repository;
using System.Web.Script.Serialization; using System.Web.Script.Serialization;
using Disco.Services.Plugins.Features.WarrantyProvider; using Disco.Services.Plugins.Features.WarrantyProvider;
using Disco.Services.Plugins; using Disco.Services.Plugins;
using Disco.Services.UIExtensions;
using Disco.Models.UI.Job; using Disco.Models.UI.Job;
using Disco.Services.Plugins.Features.UIExtension;
namespace Disco.Web.Controllers namespace Disco.Web.Controllers
{ {
@@ -64,6 +64,10 @@ namespace Disco.Web.Controllers
// closedThreshold = closedThreshold.AddDays(-1); // closedThreshold = closedThreshold.AddDays(-1);
//m.RecentlyClosedJobs = new Disco.Models.BI.Job.JobTableModel(); //m.RecentlyClosedJobs = new Disco.Models.BI.Job.JobTableModel();
//m.RecentlyClosedJobs.Fill(BI.JobTableModelBI.BuildQuery(dbContext).Where(j => j.ClosedDate > closedThreshold)); //m.RecentlyClosedJobs.Fill(BI.JobTableModelBI.BuildQuery(dbContext).Where(j => j.ClosedDate > closedThreshold));
// UI Extensions
UIExtensions.ExecuteExtensions<JobIndexModel>(this.ControllerContext, m);
return View(m); return View(m);
} }
#endregion #endregion
@@ -75,6 +79,10 @@ namespace Disco.Web.Controllers
var m = new Models.Job.ListModel() { Title = "All Open Jobs" }; var m = new Models.Job.ListModel() { Title = "All Open Jobs" };
m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true }; m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true };
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null).OrderBy(j => j.Id)); m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null).OrderBy(j => j.Id));
// UI Extensions
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
return View(Views.List, m); return View(Views.List, m);
} }
public virtual ActionResult DevicesReadyForReturn() public virtual ActionResult DevicesReadyForReturn()
@@ -86,6 +94,10 @@ namespace Disco.Web.Controllers
&& j.DeviceHeld != null && j.DeviceReturnedDate == null && j.DeviceReadyForReturn != null && && j.DeviceHeld != null && j.DeviceReturnedDate == null && j.DeviceReadyForReturn != null &&
((!j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue && !j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue) || j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue) ((!j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue && !j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue) || j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue)
&& j.ClosedDate == null).OrderBy(j => j.Id)); && j.ClosedDate == null).OrderBy(j => j.Id));
// UI Extensions
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
return View(Views.List, m); return View(Views.List, m);
} }
public virtual ActionResult DevicesAwaitingRepair() public virtual ActionResult DevicesAwaitingRepair()
@@ -98,6 +110,10 @@ namespace Disco.Web.Controllers
(j.JobMetaNonWarranty.RepairerLoggedDate != null && j.JobMetaNonWarranty.RepairerCompletedDate == null) || (j.JobMetaNonWarranty.RepairerLoggedDate != null && j.JobMetaNonWarranty.RepairerCompletedDate == null) ||
(j.JobMetaWarranty.ExternalLoggedDate != null && j.JobMetaWarranty.ExternalCompletedDate == null) (j.JobMetaWarranty.ExternalLoggedDate != null && j.JobMetaWarranty.ExternalCompletedDate == null)
)).OrderBy(j => j.Id)); )).OrderBy(j => j.Id));
// UI Extensions
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
return View(Views.List, m); return View(Views.List, m);
} }
@@ -114,6 +130,10 @@ namespace Disco.Web.Controllers
(j.JobTypeId == JobType.JobTypeIds.HNWar && (!j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue || !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue)) || (j.JobTypeId == JobType.JobTypeIds.HNWar && (!j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue || !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue)) ||
(j.JobTypeId == JobType.JobTypeIds.UMgmt && (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement == (j.Flags & (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement)) (j.JobTypeId == JobType.JobTypeIds.UMgmt && (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement == (j.Flags & (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement))
))); )));
// UI Extensions
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
return View(Views.List, m); return View(Views.List, m);
} }
@@ -126,6 +146,9 @@ namespace Disco.Web.Controllers
(j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue && (!j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue && !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue))) (j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue && (!j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue && !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue)))
).OrderBy(j => j.Id)); ).OrderBy(j => j.Id));
// UI Extensions
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
return View(Views.List, m); return View(Views.List, m);
} }
public virtual ActionResult AwaitingFinancePayment() public virtual ActionResult AwaitingFinancePayment()
@@ -136,6 +159,10 @@ namespace Disco.Web.Controllers
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null && m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null &&
(j.JobTypeId == JobType.JobTypeIds.HNWar && (!j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue || !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue)) (j.JobTypeId == JobType.JobTypeIds.HNWar && (!j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue || !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue))
).OrderBy(j => j.Id)); ).OrderBy(j => j.Id));
// UI Extensions
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
return View(Views.List, m); return View(Views.List, m);
} }
public virtual ActionResult AwaitingFinanceInsuranceProcessing() public virtual ActionResult AwaitingFinanceInsuranceProcessing()
@@ -146,6 +173,10 @@ namespace Disco.Web.Controllers
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null && m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null &&
(j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.IsInsuranceClaim && !j.JobMetaInsurance.ClaimFormSentDate.HasValue)) (j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.IsInsuranceClaim && !j.JobMetaInsurance.ClaimFormSentDate.HasValue))
).OrderBy(j => j.Id)); ).OrderBy(j => j.Id));
// UI Extensions
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
return View(Views.List, m); return View(Views.List, m);
} }
public virtual ActionResult AwaitingFinanceAgreementBreach() public virtual ActionResult AwaitingFinanceAgreementBreach()
@@ -156,6 +187,10 @@ namespace Disco.Web.Controllers
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null && m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null &&
(j.JobTypeId == JobType.JobTypeIds.UMgmt && (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement == (j.Flags & (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement)) (j.JobTypeId == JobType.JobTypeIds.UMgmt && (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement == (j.Flags & (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement))
).OrderBy(j => j.Id)); ).OrderBy(j => j.Id));
// UI Extensions
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
return View(Views.List, m); return View(Views.List, m);
} }
@@ -168,6 +203,10 @@ namespace Disco.Web.Controllers
m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true }; m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true };
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => (j.WaitingForUserAction.HasValue || (j.JobMetaNonWarranty.AccountingChargeAddedDate != null && j.JobMetaNonWarranty.AccountingChargePaidDate == null)) m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => (j.WaitingForUserAction.HasValue || (j.JobMetaNonWarranty.AccountingChargeAddedDate != null && j.JobMetaNonWarranty.AccountingChargePaidDate == null))
&& j.ClosedDate == null).OrderBy(j => j.Id)); && j.ClosedDate == null).OrderBy(j => j.Id));
// UI Extensions
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
return View(Views.List, m); return View(Views.List, m);
} }
public virtual ActionResult RecentlyClosed() public virtual ActionResult RecentlyClosed()
@@ -183,6 +222,10 @@ namespace Disco.Web.Controllers
if (dateTimeNow.DayOfWeek == DayOfWeek.Tuesday) if (dateTimeNow.DayOfWeek == DayOfWeek.Tuesday)
closedThreshold = closedThreshold.AddDays(-1); closedThreshold = closedThreshold.AddDays(-1);
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate > closedThreshold).OrderBy(j => j.Id)); m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate > closedThreshold).OrderBy(j => j.Id));
// UI Extensions
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
return View(Views.List, m); return View(Views.List, m);
} }
public virtual ActionResult Locations() public virtual ActionResult Locations()
@@ -191,6 +234,10 @@ namespace Disco.Web.Controllers
var m = new Models.Job.ListModel() { Title = "Held Device Locations" }; var m = new Models.Job.ListModel() { Title = "Held Device Locations" };
m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true, ShowLocation = true, ShowTechnician = false, ShowType = false }; m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true, ShowLocation = true, ShowTechnician = false, ShowType = false };
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null && j.DeviceHeld.HasValue && !j.DeviceReturnedDate.HasValue).OrderBy(j => j.DeviceHeldLocation)); m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null && j.DeviceHeld.HasValue && !j.DeviceReturnedDate.HasValue).OrderBy(j => j.DeviceHeldLocation));
// UI Extensions
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
return View(Views.List, m); return View(Views.List, m);
} }
@@ -232,6 +279,9 @@ namespace Disco.Web.Controllers
}; };
m.UpdateModel(dbContext); m.UpdateModel(dbContext);
// UI Extensions
UIExtensions.ExecuteExtensions<JobCreateModel>(this.ControllerContext, m);
return View(m); return View(m);
} }
[HttpPost] [HttpPost]
@@ -241,6 +291,9 @@ namespace Disco.Web.Controllers
if (!ModelState.IsValid) if (!ModelState.IsValid)
{ {
// UI Extensions
UIExtensions.ExecuteExtensions<JobCreateModel>(this.ControllerContext, m);
return View(m); return View(m);
} }
else else
+10
View File
@@ -5,6 +5,8 @@ using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
using Disco.Models.Repository; using Disco.Models.Repository;
using Disco.BI.Extensions; using Disco.BI.Extensions;
using Disco.Services.Plugins.Features.UIExtension;
using Disco.Models.UI.User;
namespace Disco.Web.Controllers namespace Disco.Web.Controllers
{ {
@@ -13,6 +15,11 @@ namespace Disco.Web.Controllers
#region Index #region Index
public virtual ActionResult Index() public virtual ActionResult Index()
{ {
var m = new Models.User.IndexModel();
// UI Extensions
UIExtensions.ExecuteExtensions<UserIndexModel>(this.ControllerContext, m);
return View(); return View();
} }
#endregion #endregion
@@ -43,6 +50,9 @@ namespace Disco.Web.Controllers
m.DocumentTemplates = m.User.AvailableDocumentTemplates(dbContext, DiscoApplication.CurrentUser, DateTime.Now); m.DocumentTemplates = m.User.AvailableDocumentTemplates(dbContext, DiscoApplication.CurrentUser, DateTime.Now);
// UI Extensions
UIExtensions.ExecuteExtensions<UserShowModel>(this.ControllerContext, m);
return View(m); return View(m);
} }
#endregion #endregion
+3 -1
View File
@@ -466,6 +466,7 @@
<DependentUpon>Global.asax</DependentUpon> <DependentUpon>Global.asax</DependentUpon>
</Compile> </Compile>
<Compile Include="Models\Device\AddOfflineModel.cs" /> <Compile Include="Models\Device\AddOfflineModel.cs" />
<Compile Include="Models\Device\IndexModel.cs" />
<Compile Include="Models\Device\ShowModel.cs" /> <Compile Include="Models\Device\ShowModel.cs" />
<Compile Include="Models\InitialConfig\CompleteModel.cs" /> <Compile Include="Models\InitialConfig\CompleteModel.cs" />
<Compile Include="Models\InitialConfig\DatabaseModel.cs" /> <Compile Include="Models\InitialConfig\DatabaseModel.cs" />
@@ -480,6 +481,7 @@
<Compile Include="Models\Job\WarrantyProviderJobDetailsModel.cs" /> <Compile Include="Models\Job\WarrantyProviderJobDetailsModel.cs" />
<Compile Include="Models\Search\QueryModel.cs" /> <Compile Include="Models\Search\QueryModel.cs" />
<Compile Include="Models\Update\IndexModel.cs" /> <Compile Include="Models\Update\IndexModel.cs" />
<Compile Include="Models\User\IndexModel.cs" />
<Compile Include="Models\User\ShowModel.cs" /> <Compile Include="Models\User\ShowModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="T4MVC.cs"> <Compile Include="T4MVC.cs">
@@ -1835,7 +1837,7 @@
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties> </WebProjectProperties>
</FlavorProperties> </FlavorProperties>
<UserProperties BuildVersion_StartDate="2001/1/1" BuildVersion_BuildAction="ReBuild" BuildVersion_UseGlobalSettings="True" BuildVersion_DetectChanges="False" /> <UserProperties BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="True" BuildVersion_BuildAction="ReBuild" BuildVersion_StartDate="2001/1/1" />
</VisualStudio> </VisualStudio>
</ProjectExtensions> </ProjectExtensions>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" /> <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
+12
View File
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Models.UI.Device;
namespace Disco.Web.Models.Device
{
public class IndexModel : DeviceIndexModel
{
}
}
+3 -3
View File
@@ -5,17 +5,17 @@ using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
using Disco.BI; using Disco.BI;
using Disco.BI.Extensions; using Disco.BI.Extensions;
using Disco.Models.UI.Device;
using Disco.Web.Extensions; using Disco.Web.Extensions;
namespace Disco.Web.Models.Device namespace Disco.Web.Models.Device
{ {
public class ShowModel public class ShowModel : DeviceShowModel
{ {
public Disco.Models.Repository.Device Device { get; set; } public Disco.Models.Repository.Device Device { get; set; }
public List<Disco.Models.Repository.DeviceProfile> DeviceProfiles { get; set; } public List<Disco.Models.Repository.DeviceProfile> DeviceProfiles { get; set; }
public List<SelectListItem> DeviceBatches { get; set; } public List<Disco.Models.Repository.DeviceBatch> DeviceBatches { get; set; }
public Disco.Models.BI.Job.JobTableModel Jobs { get; set; } public Disco.Models.BI.Job.JobTableModel Jobs { get; set; }
public List<Disco.Models.Repository.DeviceCertificate> Certificates { get; set; } public List<Disco.Models.Repository.DeviceCertificate> Certificates { get; set; }
+2 -4
View File
@@ -4,11 +4,12 @@ using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using System.Web; using System.Web;
using Disco.Data.Repository; using Disco.Data.Repository;
using Disco.Models.UI.Job;
namespace Disco.Web.Models.Job namespace Disco.Web.Models.Job
{ {
[CustomValidation(typeof(CreateModel), "ValidateCreateModel")] [CustomValidation(typeof(CreateModel), "ValidateCreateModel")]
public class CreateModel public class CreateModel : JobCreateModel
{ {
public string DeviceSerialNumber { get; set; } public string DeviceSerialNumber { get; set; }
public string UserId { get; set; } public string UserId { get; set; }
@@ -21,9 +22,6 @@ namespace Disco.Web.Models.Job
[DataType(System.ComponentModel.DataAnnotations.DataType.MultilineText)] [DataType(System.ComponentModel.DataAnnotations.DataType.MultilineText)]
public string Comments { get; set; } public string Comments { get; set; }
//public string AssignedUserId { get; set; }
//public DateTime? AssignedUserTargetCompletionDate { get; set; }
[Required(ErrorMessage = "Please specify whether the device is held or not")] [Required(ErrorMessage = "Please specify whether the device is held or not")]
public bool? DeviceHeld { get; set; } public bool? DeviceHeld { get; set; }
+2 -1
View File
@@ -2,10 +2,11 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Web; using System.Web;
using Disco.Models.UI.Job;
namespace Disco.Web.Models.Job namespace Disco.Web.Models.Job
{ {
public class IndexModel public class IndexModel : JobIndexModel
{ {
public Disco.Models.BI.Job.JobTableModel OpenJobs { get; set; } public Disco.Models.BI.Job.JobTableModel OpenJobs { get; set; }
public Disco.Models.BI.Job.JobTableModel LongRunningJobs { get; set; } public Disco.Models.BI.Job.JobTableModel LongRunningJobs { get; set; }
+2 -1
View File
@@ -2,10 +2,11 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Web; using System.Web;
using Disco.Models.UI.Job;
namespace Disco.Web.Models.Job namespace Disco.Web.Models.Job
{ {
public class ListModel public class ListModel : JobListModel
{ {
public string Title { get; set; } public string Title { get; set; }
public Disco.Models.BI.Job.JobTableModel JobTable { get; set; } public Disco.Models.BI.Job.JobTableModel JobTable { get; set; }
+12
View File
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Models.UI.User;
namespace Disco.Web.Models.User
{
public class IndexModel : UserIndexModel
{
}
}
+2 -1
View File
@@ -6,11 +6,12 @@ using System.Web.Mvc;
using Disco.BI; using Disco.BI;
using Disco.BI.Extensions; using Disco.BI.Extensions;
using Disco.Models.Interop.ActiveDirectory; using Disco.Models.Interop.ActiveDirectory;
using Disco.Models.UI.User;
using Disco.Web.Extensions; using Disco.Web.Extensions;
namespace Disco.Web.Models.User namespace Disco.Web.Models.User
{ {
public class ShowModel public class ShowModel : UserShowModel
{ {
public Disco.Models.Repository.User User { get; set; } public Disco.Models.Repository.User User { get; set; }
public Disco.Models.BI.Job.JobTableModel Jobs { get; set; } public Disco.Models.BI.Job.JobTableModel Jobs { get; set; }
+2 -2
View File
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// //
// You can specify all the values or you can default the Revision and Build Numbers // You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
[assembly: AssemblyVersion("1.2.0221.1820")] [assembly: AssemblyVersion("1.2.0225.1951")]
[assembly: AssemblyFileVersion("1.2.0221.1820")] [assembly: AssemblyFileVersion("1.2.0225.1951")]
+1 -1
View File
@@ -103,7 +103,7 @@
Batch: Batch:
</th> </th>
<td class="value"> <td class="value">
@Html.DropDownListFor(m => m.Device.DeviceBatchId, Model.DeviceBatches) @Html.DropDownListFor(m => m.Device.DeviceBatchId, Model.DeviceBatches.ToSelectListItems(Model.Device.DeviceBatchId))
@AjaxHelpers.AjaxLoader() <span id="deviceBatchDetails" class="icon16" title="Batch Details"></span> @AjaxHelpers.AjaxLoader() <span id="deviceBatchDetails" class="icon16" title="Batch Details"></span>
<script type="text/javascript"> <script type="text/javascript">
$(function () { $(function () {
+21 -21
View File
@@ -31,9 +31,9 @@ namespace Disco.Web.Views.Device
using Disco.Web; using Disco.Web;
using Disco.Web.Extensions; using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.4.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/Show.cshtml")] [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/Show.cshtml")]
public class Show : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ShowModel> public partial class Show : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ShowModel>
{ {
public Show() public Show()
{ {
@@ -300,7 +300,7 @@ WriteLiteral(" ");
#line 106 "..\..\Views\Device\Show.cshtml" #line 106 "..\..\Views\Device\Show.cshtml"
Write(Html.DropDownListFor(m => m.Device.DeviceBatchId, Model.DeviceBatches)); Write(Html.DropDownListFor(m => m.Device.DeviceBatchId, Model.DeviceBatches.ToSelectListItems(Model.Device.DeviceBatchId)));
#line default #line default
@@ -662,14 +662,14 @@ WriteLiteral(" <a");
WriteLiteral(" class=\"unlocked16\""); WriteLiteral(" class=\"unlocked16\"");
WriteAttribute("href", Tuple.Create(" href=\"", 15388), Tuple.Create("\"", 15496) WriteAttribute("href", Tuple.Create(" href=\"", 15434), Tuple.Create("\"", 15542)
#line 261 "..\..\Views\Device\Show.cshtml" #line 261 "..\..\Views\Device\Show.cshtml"
, Tuple.Create(Tuple.Create("", 15395), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, "false", true)) , Tuple.Create(Tuple.Create("", 15441), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, "false", true))
#line default #line default
#line hidden #line hidden
, 15395), false) , 15441), false)
); );
WriteLiteral(" title=\"Unauthenticated Enrolment is Allowed\""); WriteLiteral(" title=\"Unauthenticated Enrolment is Allowed\"");
@@ -689,14 +689,14 @@ WriteLiteral(" <a");
WriteLiteral(" class=\"locked16\""); WriteLiteral(" class=\"locked16\"");
WriteAttribute("href", Tuple.Create(" href=\"", 15721), Tuple.Create("\"", 15828) WriteAttribute("href", Tuple.Create(" href=\"", 15767), Tuple.Create("\"", 15874)
#line 266 "..\..\Views\Device\Show.cshtml" #line 266 "..\..\Views\Device\Show.cshtml"
, Tuple.Create(Tuple.Create("", 15728), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, "true", true)) , Tuple.Create(Tuple.Create("", 15774), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, "true", true))
#line default #line default
#line hidden #line hidden
, 15728), false) , 15774), false)
); );
WriteLiteral(" title=\"Unauthenticated Enrolment is Blocked\""); WriteLiteral(" title=\"Unauthenticated Enrolment is Blocked\"");
@@ -1040,14 +1040,14 @@ WriteLiteral(" <tr");
WriteLiteral(" id=\"Device_AssignedUser_History_Host\""); WriteLiteral(" id=\"Device_AssignedUser_History_Host\"");
WriteAttribute("style", Tuple.Create(" style=\"", 25515), Tuple.Create("\"", 25589) WriteAttribute("style", Tuple.Create(" style=\"", 25561), Tuple.Create("\"", 25635)
#line 424 "..\..\Views\Device\Show.cshtml" #line 424 "..\..\Views\Device\Show.cshtml"
, Tuple.Create(Tuple.Create("", 25523), Tuple.Create<System.Object, System.Int32>(Model.Device.DecommissionedDate.HasValue ? "" : "display: none" , Tuple.Create(Tuple.Create("", 25569), Tuple.Create<System.Object, System.Int32>(Model.Device.DecommissionedDate.HasValue ? "" : "display: none"
#line default #line default
#line hidden #line hidden
, 25523), false) , 25569), false)
); );
WriteLiteral(">\r\n <td"); WriteLiteral(">\r\n <td");
@@ -1058,14 +1058,14 @@ WriteLiteral(">\r\n <div");
WriteLiteral(" id=\"Device_AssignedUser_History\""); WriteLiteral(" id=\"Device_AssignedUser_History\"");
WriteAttribute("style", Tuple.Create(" style=\"", 25692), Tuple.Create("\"", 25766) WriteAttribute("style", Tuple.Create(" style=\"", 25738), Tuple.Create("\"", 25812)
#line 426 "..\..\Views\Device\Show.cshtml" #line 426 "..\..\Views\Device\Show.cshtml"
, Tuple.Create(Tuple.Create("", 25700), Tuple.Create<System.Object, System.Int32>(Model.Device.DecommissionedDate.HasValue ? "" : "display: none" , Tuple.Create(Tuple.Create("", 25746), Tuple.Create<System.Object, System.Int32>(Model.Device.DecommissionedDate.HasValue ? "" : "display: none"
#line default #line default
#line hidden #line hidden
, 25700), false) , 25746), false)
); );
WriteLiteral(">\r\n <h2>\r\n Assigned Use" + WriteLiteral(">\r\n <h2>\r\n Assigned Use" +
@@ -1144,26 +1144,26 @@ WriteLiteral(">\r\n <img");
WriteLiteral(" alt=\"Model Image\""); WriteLiteral(" alt=\"Model Image\"");
WriteAttribute("src", Tuple.Create(" src=\"", 27421), Tuple.Create("\"", 27531) WriteAttribute("src", Tuple.Create(" src=\"", 27467), Tuple.Create("\"", 27577)
#line 460 "..\..\Views\Device\Show.cshtml" #line 460 "..\..\Views\Device\Show.cshtml"
, Tuple.Create(Tuple.Create("", 27427), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash())) , Tuple.Create(Tuple.Create("", 27473), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))
#line default #line default
#line hidden #line hidden
, 27427), false) , 27473), false)
); );
WriteLiteral(" />\r\n <h2>\r\n <a"); WriteLiteral(" />\r\n <h2>\r\n <a");
WriteAttribute("href", Tuple.Create(" href=\"", 27597), Tuple.Create("\"", 27675) WriteAttribute("href", Tuple.Create(" href=\"", 27643), Tuple.Create("\"", 27721)
#line 462 "..\..\Views\Device\Show.cshtml" #line 462 "..\..\Views\Device\Show.cshtml"
, Tuple.Create(Tuple.Create("", 27604), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.DeviceModel.Index(Model.Device.DeviceModelId)) , Tuple.Create(Tuple.Create("", 27650), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.DeviceModel.Index(Model.Device.DeviceModelId))
#line default #line default
#line hidden #line hidden
, 27604), false) , 27650), false)
); );
WriteLiteral(">"); WriteLiteral(">");
+1 -1
View File
@@ -104,6 +104,6 @@
href="http://discoict.com.au/" target="_blank">discoict.com.au</a> | @Html.ActionLink("Credits", MVC.Public.Public.Credits()) | @Html.ActionLink("Licence", MVC.Public.Public.Licence()) href="http://discoict.com.au/" target="_blank">discoict.com.au</a> | @Html.ActionLink("Credits", MVC.Public.Public.Credits()) | @Html.ActionLink("Licence", MVC.Public.Public.Licence())
</footer> </footer>
</div> </div>
@{ Disco.Services.UIExtensions.UIExtensions.ExecuteExtensionResult(this); } @{ Disco.Services.Plugins.Features.UIExtension.UIExtensions.ExecuteExtensionResult(this); }
</body> </body>
</html> </html>
+3 -3
View File
@@ -31,9 +31,9 @@ namespace Disco.Web.Views.Shared
using Disco.Web; using Disco.Web;
using Disco.Web.Extensions; using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.4.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_Layout.cshtml")] [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_Layout.cshtml")]
public class Layout : System.Web.Mvc.WebViewPage<dynamic> public partial class Layout : System.Web.Mvc.WebViewPage<dynamic>
{ {
public Layout() public Layout()
{ {
@@ -488,7 +488,7 @@ WriteLiteral("\r\n </footer>\r\n </div>\r\n");
#line hidden #line hidden
#line 107 "..\..\Views\Shared\_Layout.cshtml" #line 107 "..\..\Views\Shared\_Layout.cshtml"
Disco.Services.UIExtensions.UIExtensions.ExecuteExtensionResult(this); Disco.Services.Plugins.Features.UIExtension.UIExtensions.ExecuteExtensionResult(this);
#line default #line default
#line hidden #line hidden
+6 -6
View File
@@ -121,12 +121,12 @@ Global
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
BuildVersion_UseGlobalSettings = False
BuildVersion_DetectChanges = False
BuildVersion_UpdateFileVersion = False
BuildVersion_UpdateAssemblyVersion = False
BuildVersion_BuildVersioningStyle = None.None.None.None
BuildVersion_StartDate = 2001/1/1
BuildVersion_BuildAction = ReBuild BuildVersion_BuildAction = ReBuild
BuildVersion_StartDate = 2001/1/1
BuildVersion_BuildVersioningStyle = None.None.None.None
BuildVersion_UpdateAssemblyVersion = False
BuildVersion_UpdateFileVersion = False
BuildVersion_DetectChanges = False
BuildVersion_UseGlobalSettings = False
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal