Feature: Plugin UI Extensions

Initially available for 'Job Show' action
This commit is contained in:
Gary Sharp
2013-02-21 18:28:24 +11:00
parent e8e141c9af
commit 69c61a9b7d
23 changed files with 1847 additions and 1537 deletions
+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
{
public interface 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.Job
{
public interface JobShowModel : BaseUIModel
{
Repository.Job Job { get; set; }
List<Repository.DocumentTemplate> AvailableDocumentTemplates { get; set; }
List<Repository.JobSubType> UpdatableJobSubTypes { get; set; }
}
}
+6 -1
View File
@@ -101,6 +101,10 @@
<Compile Include="Logging\Targets\LogPersistContext.cs" /> <Compile Include="Logging\Targets\LogPersistContext.cs" />
<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\PluginResourceScriptResult.cs" />
<Compile Include="Plugins\Features\UIExtension\UIExtensionResult.cs" />
<Compile Include="Plugins\Features\UIExtension\UIExtensionFeature.cs" />
<Compile Include="Plugins\UpdatePluginsAfterDiscoUpdateTask.cs" /> <Compile Include="Plugins\UpdatePluginsAfterDiscoUpdateTask.cs" />
<Compile Include="Plugins\UpdatePluginTask.cs" /> <Compile Include="Plugins\UpdatePluginTask.cs" />
<Compile Include="Plugins\InstallPluginTask.cs" /> <Compile Include="Plugins\InstallPluginTask.cs" />
@@ -133,6 +137,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" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Disco.Data\Disco.Data.csproj"> <ProjectReference Include="..\Disco.Data\Disco.Data.csproj">
@@ -152,7 +157,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>
<UserProperties BuildVersion_StartDate="2001/1/1" BuildVersion_BuildAction="ReBuild" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="True" /> <UserProperties BuildVersion_UseGlobalSettings="True" BuildVersion_DetectChanges="False" BuildVersion_BuildAction="ReBuild" BuildVersion_StartDate="2001/1/1" />
</VisualStudio> </VisualStudio>
</ProjectExtensions> </ProjectExtensions>
<PropertyGroup> <PropertyGroup>
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
namespace Disco.Services.Plugins.Features.UIExtension.Results
{
public class LiteralResult : UIExtensionResult
{
private string _content;
public LiteralResult(PluginFeatureManifest Source, string Content) : base(Source)
{
this._content = Content;
}
public override void ExecuteResult<T>(WebViewPage<T> page)
{
page.Write(new HtmlString(_content));
}
}
}
@@ -0,0 +1,25 @@
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 PluginResourceScriptResult : UIExtensionResult
{
private string _resource;
public PluginResourceScriptResult(PluginFeatureManifest Source, string Resource) : base(Source)
{
this._resource = Resource;
}
public override void ExecuteResult<T>(System.Web.Mvc.WebViewPage<T> page)
{
page.WriteLiteral("<script src=\"");
page.WriteLiteral(page.DiscoPluginResourceUrl(_resource, false, this.Source.PluginManifest));
page.WriteLiteral("\" type=\"text/javascript\"></script>");
}
}
}
@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;
using Disco.Models.UI;
using Disco.Services.Plugins.Features.UIExtension.Results;
namespace Disco.Services.Plugins.Features.UIExtension
{
[PluginFeatureCategory(DisplayName = "User Interface Extensions")]
public abstract class UIExtensionFeature<UIModel> : PluginFeature where UIModel : BaseUIModel
{
public abstract UIExtensionResult ExecuteAction(ControllerContext context, UIModel model);
#region ActionResults
protected LiteralResult Literal(string Content)
{
return new LiteralResult(this.Manifest, Content);
}
protected PluginResourceScriptResult ScriptResource(string Resource)
{
return new PluginResourceScriptResult(this.Manifest, Resource);
}
#endregion
#region Registration
public bool Register()
{
return UIExtensions.UIExtensions.RegisterExtension(this);
}
public bool Unregister()
{
return UIExtensions.UIExtensions.UnregisterExtension(this);
}
public bool IsRegistered
{
get
{
return UIExtensions.UIExtensions.ExtensionRegistered(this);
}
}
#endregion
}
}
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
namespace Disco.Services.Plugins.Features.UIExtension
{
public abstract class UIExtensionResult
{
public PluginFeatureManifest Source { get; private set; }
public UIExtensionResult(PluginFeatureManifest Source)
{
this.Source = Source;
}
public abstract void ExecuteResult<T>(WebViewPage<T> page);
}
}
+202 -190
View File
@@ -1,190 +1,202 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using Disco.Data.Repository; using Disco.Data.Repository;
using System.IO; using System.IO;
using System.Web.Mvc; using System.Web.Mvc;
using System.Web.Routing; using System.Web.Routing;
using System.Web; using System.Web;
using System.Web.Mvc.Html; using System.Web.Mvc.Html;
using System.Globalization; using System.Globalization;
namespace Disco.Services.Plugins namespace Disco.Services.Plugins
{ {
public static class PluginExtensions public static class PluginExtensions
{ {
#region Model Binding from Controller #region Model Binding from Controller
public static bool TryUpdateModel<TModel>(this Controller controller, TModel model) where TModel : class public static bool TryUpdateModel<TModel>(this Controller controller, TModel model) where TModel : class
{ {
return controller.TryUpdateModel<TModel>(model, null, controller.ValueProvider); return controller.TryUpdateModel<TModel>(model, null, controller.ValueProvider);
} }
public static bool TryUpdateModel<TModel>(this Controller controller, TModel model, IValueProvider valueProvider) where TModel : class public static bool TryUpdateModel<TModel>(this Controller controller, TModel model, IValueProvider valueProvider) where TModel : class
{ {
return controller.TryUpdateModel<TModel>(model, null, valueProvider); return controller.TryUpdateModel<TModel>(model, null, valueProvider);
} }
public static bool TryUpdateModel<TModel>(this Controller controller, TModel model, string prefix) where TModel : class public static bool TryUpdateModel<TModel>(this Controller controller, TModel model, string prefix) where TModel : class
{ {
return controller.TryUpdateModel<TModel>(model, prefix, controller.ValueProvider); return controller.TryUpdateModel<TModel>(model, prefix, controller.ValueProvider);
} }
public static bool TryUpdateModel<TModel>(this Controller controller, TModel model, string prefix, IValueProvider valueProvider) where TModel : class public static bool TryUpdateModel<TModel>(this Controller controller, TModel model, string prefix, IValueProvider valueProvider) where TModel : class
{ {
if (model == null) if (model == null)
throw new ArgumentNullException("model"); throw new ArgumentNullException("model");
if (valueProvider == null) if (valueProvider == null)
throw new ArgumentNullException("valueProvider"); throw new ArgumentNullException("valueProvider");
Predicate<string> predicate = propertyName => true; Predicate<string> predicate = propertyName => true;
IModelBinder binder = ModelBinders.Binders.GetBinder(typeof(TModel)); IModelBinder binder = ModelBinders.Binders.GetBinder(typeof(TModel));
ModelBindingContext context2 = new ModelBindingContext ModelBindingContext context2 = new ModelBindingContext
{ {
ModelMetadata = ModelMetadataProviders.Current.GetMetadataForType(() => model, typeof(TModel)), ModelMetadata = ModelMetadataProviders.Current.GetMetadataForType(() => model, typeof(TModel)),
ModelName = prefix, ModelName = prefix,
ModelState = controller.ModelState, ModelState = controller.ModelState,
PropertyFilter = predicate, PropertyFilter = predicate,
ValueProvider = valueProvider ValueProvider = valueProvider
}; };
ModelBindingContext bindingContext = context2; ModelBindingContext bindingContext = context2;
binder.BindModel(controller.ControllerContext, bindingContext); binder.BindModel(controller.ControllerContext, bindingContext);
return controller.ModelState.IsValid; return controller.ModelState.IsValid;
} }
#endregion #endregion
#region Virtual Directories #region Virtual Directories
//public static string WebHandlerResource(this PluginManifest pluginManifest, string resourcePath, RequestContext requestContext) //public static string WebHandlerResource(this PluginManifest pluginManifest, string resourcePath, RequestContext requestContext)
//{ //{
// var rootPath = WebHandlerRootUrl(pluginManifest, requestContext); // var rootPath = WebHandlerRootUrl(pluginManifest, requestContext);
// return string.Concat(rootPath, resourcePath); // return string.Concat(rootPath, resourcePath);
//} //}
//public static string WebHandlerRootUrl(this PluginManifest pluginManifest, RequestContext requestContext) //public static string WebHandlerRootUrl(this PluginManifest pluginManifest, RequestContext requestContext)
//{ //{
// var tempPath = pluginManifest.WebHandlerActionUrl(requestContext, "_"); // var tempPath = pluginManifest.WebHandlerActionUrl(requestContext, "_");
// return tempPath.Substring(0, tempPath.LastIndexOf(@"/") + 1); // return tempPath.Substring(0, tempPath.LastIndexOf(@"/") + 1);
//} //}
//public static string WebHandlerActionUrl(this PluginManifest pluginManifest, RequestContext requestContext, string PluginAction) //public static string WebHandlerActionUrl(this PluginManifest pluginManifest, RequestContext requestContext, string PluginAction)
//{ //{
// var routeValues = new RouteValueDictionary(new { PluginId = pluginManifest.Id, PluginAction = PluginAction }); // var routeValues = new RouteValueDictionary(new { PluginId = pluginManifest.Id, PluginAction = PluginAction });
// return UrlHelper.GenerateUrl("Plugin", "PluginWebHandler", "Index", routeValues, RouteTable.Routes, requestContext, true); // return UrlHelper.GenerateUrl("Plugin", "PluginWebHandler", "Index", routeValues, RouteTable.Routes, requestContext, true);
//} //}
//public static string WebHandlerResourceUrl(this PluginManifest pluginManifest, RequestContext requestContext, string PluginAction) //public static string WebHandlerResourceUrl(this PluginManifest pluginManifest, RequestContext requestContext, string PluginAction)
//{ //{
// var routeValues = new RouteValueDictionary(new { PluginId = pluginManifest.Id, PluginAction = PluginAction }); // var routeValues = new RouteValueDictionary(new { PluginId = pluginManifest.Id, PluginAction = PluginAction });
// return UrlHelper.GenerateUrl("Plugin", "PluginWebHandler", "Index", routeValues, RouteTable.Routes, requestContext, true); // return UrlHelper.GenerateUrl("Plugin", "PluginWebHandler", "Index", routeValues, RouteTable.Routes, requestContext, true);
//} //}
public static HtmlString DiscoPluginResourceUrl<T>(this WebViewPage<T> ViewPage, string Resource) public static HtmlString DiscoPluginResourceUrl<T>(this WebViewPage<T> ViewPage, string Resource)
{ {
return ViewPage.DiscoPluginResourceUrl(Resource, false); return ViewPage.DiscoPluginResourceUrl(Resource, false);
} }
public static HtmlString DiscoPluginResourceUrl<T>(this WebViewPage<T> ViewPage, string Resource, bool Download) public static HtmlString DiscoPluginResourceUrl<T>(this WebViewPage<T> ViewPage, string Resource, bool Download)
{ {
if (string.IsNullOrEmpty(Resource)) if (string.IsNullOrEmpty(Resource))
throw new ArgumentNullException("Resource"); throw new ArgumentNullException("Resource");
// Find Plugin // Find Plugin
var pageType = ViewPage.GetType(); var pageType = ViewPage.GetType();
var pageAssembly = pageType.Assembly; var pageAssembly = pageType.Assembly;
var manifest = Plugins.GetPlugin(pageAssembly); var manifest = Plugins.GetPlugin(pageAssembly);
var resourcePath = manifest.WebResourcePath(Resource); return ViewPage.DiscoPluginResourceUrl(Resource, false, manifest);
}
var routeValues = new RouteValueDictionary(new { PluginId = manifest.Id, res = Resource }); public static HtmlString DiscoPluginResourceUrl<T>(this WebViewPage<T> ViewPage, string Resource, bool Download, PluginManifest manifest)
string pluginActionUrl = UrlHelper.GenerateUrl("Plugin_Resources", null, null, routeValues, RouteTable.Routes, ViewPage.ViewContext.RequestContext, false); {
var resourcePath = manifest.WebResourcePath(Resource);
pluginActionUrl += string.Format("?v={0}", resourcePath.Item2);
var routeValues = new RouteValueDictionary(new { PluginId = manifest.Id, res = Resource });
if (Download) string pluginActionUrl = UrlHelper.GenerateUrl("Plugin_Resources", null, null, routeValues, RouteTable.Routes, ViewPage.ViewContext.RequestContext, false);
pluginActionUrl += "&Download=true";
pluginActionUrl += string.Format("?v={0}", resourcePath.Item2);
return new HtmlString(pluginActionUrl);
} if (Download)
public static HtmlString DiscoPluginActionUrl<T>(this WebViewPage<T> ViewPage, string PluginAction) pluginActionUrl += "&Download=true";
{
if (string.IsNullOrEmpty(PluginAction)) return new HtmlString(pluginActionUrl);
throw new ArgumentNullException("PluginAction"); }
public static HtmlString DiscoPluginActionUrl<T>(this WebViewPage<T> ViewPage, string PluginAction)
// Find Plugin {
var pageType = ViewPage.GetType(); if (string.IsNullOrEmpty(PluginAction))
var pageAssembly = pageType.Assembly; throw new ArgumentNullException("PluginAction");
var manifest = Plugins.GetPlugin(pageAssembly);
// Find Plugin
var routeValues = new RouteValueDictionary(new { PluginId = manifest.Id, PluginAction = PluginAction }); var pageType = ViewPage.GetType();
string pluginActionUrl = UrlHelper.GenerateUrl("Plugin", null, null, routeValues, RouteTable.Routes, ViewPage.ViewContext.RequestContext, false); var pageAssembly = pageType.Assembly;
return new HtmlString(pluginActionUrl); var manifest = Plugins.GetPlugin(pageAssembly);
}
public static HtmlString DiscoPluginConfigureUrl<T>(this WebViewPage<T> ViewPage) return ViewPage.DiscoPluginActionUrl(PluginAction, manifest);
{ }
// Find Plugin public static HtmlString DiscoPluginActionUrl<T>(this WebViewPage<T> ViewPage, string PluginAction, PluginManifest manifest)
var pageType = ViewPage.GetType(); {
var pageAssembly = pageType.Assembly; var routeValues = new RouteValueDictionary(new { PluginId = manifest.Id, PluginAction = PluginAction });
var manifest = Plugins.GetPlugin(pageAssembly); string pluginActionUrl = UrlHelper.GenerateUrl("Plugin", null, null, routeValues, RouteTable.Routes, ViewPage.ViewContext.RequestContext, false);
return new HtmlString(pluginActionUrl);
var routeValues = new RouteValueDictionary(new { PluginId = manifest.Id }); }
string pluginActionUrl = UrlHelper.GenerateUrl("Config_Plugins_Configure", null, null, routeValues, RouteTable.Routes, ViewPage.ViewContext.RequestContext, false); public static HtmlString DiscoPluginConfigureUrl<T>(this WebViewPage<T> ViewPage)
return new HtmlString(pluginActionUrl); {
} // Find Plugin
public static MvcForm DiscoPluginActionBeginForm<T>(this WebViewPage<T> ViewPage, string PluginAction, FormMethod method, IDictionary<string, object> htmlAttributes) var pageType = ViewPage.GetType();
{ var pageAssembly = pageType.Assembly;
if (string.IsNullOrEmpty(PluginAction)) var manifest = Plugins.GetPlugin(pageAssembly);
throw new ArgumentNullException("PluginAction");
return ViewPage.DiscoPluginConfigureUrl(manifest);
// Find Plugin }
var pageType = ViewPage.GetType(); public static HtmlString DiscoPluginConfigureUrl<T>(this WebViewPage<T> ViewPage, PluginManifest manifest)
var pageAssembly = pageType.Assembly; {
var manifest = Plugins.GetPlugin(pageAssembly); var routeValues = new RouteValueDictionary(new { PluginId = manifest.Id });
string pluginActionUrl = UrlHelper.GenerateUrl("Config_Plugins_Configure", null, null, routeValues, RouteTable.Routes, ViewPage.ViewContext.RequestContext, false);
var routeValues = new RouteValueDictionary(new { PluginId = manifest.Id, PluginAction = PluginAction }); return new HtmlString(pluginActionUrl);
string pluginActionUrl = UrlHelper.GenerateUrl("Plugin", null, null, routeValues, RouteTable.Routes, ViewPage.ViewContext.RequestContext, false); }
public static MvcForm DiscoPluginActionBeginForm<T>(this WebViewPage<T> ViewPage, string PluginAction, FormMethod method, IDictionary<string, object> htmlAttributes)
return ViewPage.FormHelper(pluginActionUrl, method, htmlAttributes); {
} if (string.IsNullOrEmpty(PluginAction))
public static MvcForm DiscoPluginActionBeginForm<T>(this WebViewPage<T> ViewPage, string PluginAction, FormMethod method) throw new ArgumentNullException("PluginAction");
{
return ViewPage.DiscoPluginActionBeginForm(PluginAction, method, null); // Find Plugin
} var pageType = ViewPage.GetType();
public static MvcForm DiscoPluginActionBeginForm<T>(this WebViewPage<T> ViewPage, string PluginAction, IDictionary<string, object> htmlAttributes) var pageAssembly = pageType.Assembly;
{ var manifest = Plugins.GetPlugin(pageAssembly);
return ViewPage.DiscoPluginActionBeginForm(PluginAction, FormMethod.Post, htmlAttributes);
} var routeValues = new RouteValueDictionary(new { PluginId = manifest.Id, PluginAction = PluginAction });
public static MvcForm DiscoPluginActionBeginForm<T>(this WebViewPage<T> ViewPage, string PluginAction) string pluginActionUrl = UrlHelper.GenerateUrl("Plugin", null, null, routeValues, RouteTable.Routes, ViewPage.ViewContext.RequestContext, false);
{
return ViewPage.DiscoPluginActionBeginForm(PluginAction, FormMethod.Post, null); return ViewPage.FormHelper(pluginActionUrl, method, htmlAttributes);
} }
public static MvcForm DiscoPluginActionBeginForm<T>(this WebViewPage<T> ViewPage, string PluginAction, FormMethod method)
private static MvcForm FormHelper<T>(this WebViewPage<T> ViewPage, string formAction, FormMethod method, IDictionary<string, object> htmlAttributes) {
{ return ViewPage.DiscoPluginActionBeginForm(PluginAction, method, null);
TagBuilder builder = new TagBuilder("form"); }
builder.MergeAttributes<string, object>(htmlAttributes); public static MvcForm DiscoPluginActionBeginForm<T>(this WebViewPage<T> ViewPage, string PluginAction, IDictionary<string, object> htmlAttributes)
builder.MergeAttribute("action", formAction); {
builder.MergeAttribute("method", HtmlHelper.GetFormMethodString(method), true); return ViewPage.DiscoPluginActionBeginForm(PluginAction, FormMethod.Post, htmlAttributes);
bool flag = ViewPage.ViewContext.ClientValidationEnabled && !ViewPage.ViewContext.UnobtrusiveJavaScriptEnabled; }
if (flag) public static MvcForm DiscoPluginActionBeginForm<T>(this WebViewPage<T> ViewPage, string PluginAction)
{ {
object obj2 = ViewPage.ViewContext.HttpContext.Items["DiscoPluginLastFormNum"]; return ViewPage.DiscoPluginActionBeginForm(PluginAction, FormMethod.Post, null);
int num = (obj2 != null) ? (((int)obj2) + 1) : 1000; }
ViewPage.ViewContext.HttpContext.Items["DiscoPluginLastFormNum"] = num;
private static MvcForm FormHelper<T>(this WebViewPage<T> ViewPage, string formAction, FormMethod method, IDictionary<string, object> htmlAttributes)
builder.GenerateId(string.Format(CultureInfo.InvariantCulture, "form{0}", new object[] { num })); {
} TagBuilder builder = new TagBuilder("form");
ViewPage.ViewContext.Writer.Write(builder.ToString(TagRenderMode.StartTag)); builder.MergeAttributes<string, object>(htmlAttributes);
MvcForm form = new MvcForm(ViewPage.ViewContext); builder.MergeAttribute("action", formAction);
if (flag) builder.MergeAttribute("method", HtmlHelper.GetFormMethodString(method), true);
{ bool flag = ViewPage.ViewContext.ClientValidationEnabled && !ViewPage.ViewContext.UnobtrusiveJavaScriptEnabled;
ViewPage.ViewContext.FormContext.FormId = builder.Attributes["id"]; if (flag)
} {
return form; object obj2 = ViewPage.ViewContext.HttpContext.Items["DiscoPluginLastFormNum"];
} int num = (obj2 != null) ? (((int)obj2) + 1) : 1000;
ViewPage.ViewContext.HttpContext.Items["DiscoPluginLastFormNum"] = num;
builder.GenerateId(string.Format(CultureInfo.InvariantCulture, "form{0}", new object[] { num }));
}
#endregion ViewPage.ViewContext.Writer.Write(builder.ToString(TagRenderMode.StartTag));
} MvcForm form = new MvcForm(ViewPage.ViewContext);
} if (flag)
{
ViewPage.ViewContext.FormContext.FormId = builder.Attributes["id"];
}
return form;
}
#endregion
}
}
+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.0219.1854")] [assembly: AssemblyVersion("1.2.0221.1820")]
[assembly: AssemblyFileVersion("1.2.0219.1854")] [assembly: AssemblyFileVersion("1.2.0221.1820")]
+115
View File
@@ -0,0 +1,115 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using Disco.Models.UI;
using Disco.Services.Plugins;
using Disco.Services.Plugins.Features.UIExtension;
namespace Disco.Services.UIExtensions
{
public static class UIExtensions
{
private const string ViewDataKey = "___DiscoUIExtensionResults";
// Warning: No type-safety, validate types before updating
private static Dictionary<Type, List<PluginFeatureManifest>> _registrations = new Dictionary<Type, List<PluginFeatureManifest>>();
private static List<PluginFeatureManifest> GetUIModelRegistrations<UIModel>() where UIModel : BaseUIModel
{
Type uiModelType = typeof(UIModel);
List<PluginFeatureManifest> modelRegistrations;
if (!_registrations.TryGetValue(uiModelType, out modelRegistrations))
{
lock (_registrations)
{
if (!_registrations.TryGetValue(uiModelType, out modelRegistrations))
{
modelRegistrations = new List<PluginFeatureManifest>();
_registrations.Add(uiModelType, modelRegistrations);
}
}
}
return modelRegistrations;
}
public static void ExecuteExtensions<UIModel>(ControllerContext context, UIModel model) where UIModel : BaseUIModel
{
var uiExts = UIExtensions.GetRegisteredExtensions<UIModel>();
Queue<UIExtensionResult> uiExtResults = new Queue<UIExtensionResult>();
foreach (var uiExt in uiExts)
{
using (var uiExtInstance = uiExt.CreateInstance<UIExtensionFeature<UIModel>>())
{
uiExtResults.Enqueue(uiExtInstance.ExecuteAction(context, model));
}
}
context.Controller.ViewData[ViewDataKey] = uiExtResults;
}
public static void ExecuteExtensionResult<UIModel>(WebViewPage<UIModel> page)
{
Queue<UIExtensionResult> uiExtResults = page.ViewData[ViewDataKey] as Queue<UIExtensionResult>;
if (uiExtResults != null && uiExtResults.Count > 0)
{
page.WriteLiteral("<!-- BEGIN: Disco UI Extensions -->");
page.WriteLiteral("\n<div id=\"layout_uiExtensions\">");
foreach (var uiExtResult in uiExtResults)
{
string extensionDescription = HttpUtility.HtmlEncode(string.Format("{0} @ {1} v{2}", uiExtResult.Source.Id, uiExtResult.Source.PluginManifest.Id, uiExtResult.Source.PluginManifest.Version.ToString(4)));
page.WriteLiteral(string.Format("\n<!-- BEGIN UI EXTENSION: {0} -->\n", extensionDescription));
uiExtResult.ExecuteResult(page);
page.WriteLiteral(string.Format("\n<!-- END UI EXTENSION: {0} -->", extensionDescription));
}
page.WriteLiteral("\n</div>");
page.WriteLiteral("\n<!-- END: Disco UI Extensions -->");
}
}
public static ReadOnlyCollection<PluginFeatureManifest> GetRegisteredExtensions<UIModel>() where UIModel : BaseUIModel
{
List<PluginFeatureManifest> modelRegistrations = GetUIModelRegistrations<UIModel>();
return new ReadOnlyCollection<PluginFeatureManifest>(modelRegistrations);
}
internal static bool ExtensionRegistered<UIModel>(UIExtensionFeature<UIModel> Extension) where UIModel : BaseUIModel
{
List<PluginFeatureManifest> modelRegistrations = GetUIModelRegistrations<UIModel>();
return modelRegistrations.Contains(Extension.Manifest);
}
internal static bool RegisterExtension<UIModel>(UIExtensionFeature<UIModel> Extension) where UIModel : BaseUIModel
{
List<PluginFeatureManifest> modelRegistrations = GetUIModelRegistrations<UIModel>();
lock (modelRegistrations)
{
if (!modelRegistrations.Contains(Extension.Manifest))
{
modelRegistrations.Add(Extension.Manifest);
return true;
}
}
return false;
}
internal static bool UnregisterExtension<UIModel>(UIExtensionFeature<UIModel> Extension) where UIModel : BaseUIModel
{
List<PluginFeatureManifest> modelRegistrations = GetUIModelRegistrations<UIModel>();
lock (modelRegistrations)
{
if (modelRegistrations.Contains(Extension.Manifest))
{
modelRegistrations.Remove(Extension.Manifest);
return true;
}
}
return false;
}
}
}
@@ -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.0219.1854")] [assembly: AssemblyVersion("1.2.0221.1820")]
[assembly: AssemblyFileVersion("1.2.0219.1854")] [assembly: AssemblyFileVersion("1.2.0221.1820")]
@@ -1448,6 +1448,9 @@ header .watermark,
-webkit-border-radius: 0 0 6px 6px; -webkit-border-radius: 0 0 6px 6px;
border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px;
} }
#layout_uiExtensions {
display: none;
}
footer, footer,
#footer { #footer {
color: #777; color: #777;
File diff suppressed because one or more lines are too long
+3
View File
@@ -270,6 +270,9 @@ header .watermark,
-webkit-border-radius: 0 0 6px 6px; -webkit-border-radius: 0 0 6px 6px;
border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px;
} }
#layout_uiExtensions {
display: none;
}
footer, footer,
#footer { #footer {
color: #777; color: #777;
+4
View File
@@ -238,6 +238,10 @@ header, #header
.border-radius4(0, 0, 6px, 6px); .border-radius4(0, 0, 6px, 6px);
} }
#layout_uiExtensions {
display: none;
}
footer, #footer footer, #footer
{ {
color: #777; color: #777;
File diff suppressed because one or more lines are too long
+473 -468
View File
@@ -1,468 +1,473 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Web; using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
using Disco.Data.Repository; using Disco.Data.Repository;
using Disco.BI; using Disco.BI;
using Disco.BI.Extensions; using Disco.BI.Extensions;
using Disco.Models.Repository; 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;
namespace Disco.Web.Controllers using Disco.Models.UI.Job;
{
public partial class JobController : dbAdminController namespace Disco.Web.Controllers
{ {
public partial class JobController : dbAdminController
#region Index {
public virtual ActionResult Index()
{ #region Index
var m = new Models.Job.IndexModel(); public virtual ActionResult Index()
{
//m.MyJobs = JobBI.SelectJobSearchResultItem((from j in dbContext.Jobs var m = new Models.Job.IndexModel();
// where j.OpenedTechUserId == DiscoApplication.CurrentUser.Id && j.ClosedDate == null && (j.DeviceHeld == null || j.DeviceReturnedDate != null || j.DeviceReadyForReturn == null)
// select j)); //m.MyJobs = JobBI.SelectJobSearchResultItem((from j in dbContext.Jobs
//m.OpenJobs = JobBI.SelectJobSearchResultItem((from j in dbContext.Jobs // where j.OpenedTechUserId == DiscoApplication.CurrentUser.Id && j.ClosedDate == null && (j.DeviceHeld == null || j.DeviceReturnedDate != null || j.DeviceReadyForReturn == null)
// where j.OpenedTechUserId != DiscoApplication.CurrentUser.Id && j.ClosedDate == null && (j.DeviceHeld == null || j.DeviceReturnedDate != null || j.DeviceReadyForReturn == null) // select j));
// select j)); //m.OpenJobs = JobBI.SelectJobSearchResultItem((from j in dbContext.Jobs
// where j.OpenedTechUserId != DiscoApplication.CurrentUser.Id && j.ClosedDate == null && (j.DeviceHeld == null || j.DeviceReturnedDate != null || j.DeviceReadyForReturn == null)
dbContext.Configuration.LazyLoadingEnabled = true; // select j));
m.OpenJobs = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true }; dbContext.Configuration.LazyLoadingEnabled = true;
m.OpenJobs.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null
&& !j.WaitingForUserAction.HasValue m.OpenJobs = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true };
&& !(j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.RepairerLoggedDate.HasValue && j.JobMetaNonWarranty.IsInsuranceClaim && !j.JobMetaInsurance.ClaimFormSentDate.HasValue)) m.OpenJobs.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null
&& !(j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.RepairerLoggedDate.HasValue && !j.JobMetaNonWarranty.RepairerCompletedDate.HasValue)) && !j.WaitingForUserAction.HasValue
&& !(j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue && !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue)) && !(j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.RepairerLoggedDate.HasValue && j.JobMetaNonWarranty.IsInsuranceClaim && !j.JobMetaInsurance.ClaimFormSentDate.HasValue))
&& !(j.JobTypeId == JobType.JobTypeIds.HWar && (j.JobMetaWarranty.ExternalLoggedDate.HasValue && !j.JobMetaWarranty.ExternalCompletedDate.HasValue)) && !(j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.RepairerLoggedDate.HasValue && !j.JobMetaNonWarranty.RepairerCompletedDate.HasValue))
&& (j.DeviceHeld == null || j.DeviceReturnedDate != null || j.DeviceReadyForReturn == null)).OrderBy(j => j.Id)); && !(j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue && !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue))
&& !(j.JobTypeId == JobType.JobTypeIds.HWar && (j.JobMetaWarranty.ExternalLoggedDate.HasValue && !j.JobMetaWarranty.ExternalCompletedDate.HasValue))
var longRunningThreshold = DateTime.Now.AddDays(-7); && (j.DeviceHeld == null || j.DeviceReturnedDate != null || j.DeviceReadyForReturn == null)).OrderBy(j => j.Id));
m.LongRunningJobs = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true };
m.LongRunningJobs.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null var longRunningThreshold = DateTime.Now.AddDays(-7);
&& j.OpenedDate < longRunningThreshold).OrderBy(j => j.Id)); m.LongRunningJobs = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true };
m.LongRunningJobs.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null
//m.WaitingForUserActionJobs = new Disco.Models.BI.Job.JobTableModel(); && j.OpenedDate < longRunningThreshold).OrderBy(j => j.Id));
//m.WaitingForUserActionJobs.Fill(Disco.BI.JobTableModelBI.BuildQuery(dbContext).Where(j => j.WaitingForUserAction.HasValue
// && j.ClosedDate == null)); //m.WaitingForUserActionJobs = new Disco.Models.BI.Job.JobTableModel();
//m.WaitingForUserActionJobs.Fill(Disco.BI.JobTableModelBI.BuildQuery(dbContext).Where(j => j.WaitingForUserAction.HasValue
//m.ReadyForReturnJobs = new Disco.Models.BI.Job.JobTableModel(); // && j.ClosedDate == null));
//m.ReadyForReturnJobs.Fill(BI.JobTableModelBI.BuildQuery(dbContext).Where(j => !j.WaitingForUserAction.HasValue
// && j.DeviceHeld != null && j.DeviceReturnedDate == null && j.DeviceReadyForReturn != null //m.ReadyForReturnJobs = new Disco.Models.BI.Job.JobTableModel();
// && j.ClosedDate == null)); //m.ReadyForReturnJobs.Fill(BI.JobTableModelBI.BuildQuery(dbContext).Where(j => !j.WaitingForUserAction.HasValue
// && j.DeviceHeld != null && j.DeviceReturnedDate == null && j.DeviceReadyForReturn != null
//// 2 Days ago - Ignore Weekend // && j.ClosedDate == null));
//var dateTimeNow = DateTime.Now;
//var closedThreshold = dateTimeNow.AddDays(-2); //// 2 Days ago - Ignore Weekend
//if (dateTimeNow.DayOfWeek == DayOfWeek.Monday) //var dateTimeNow = DateTime.Now;
// closedThreshold = closedThreshold.AddDays(-2); //var closedThreshold = dateTimeNow.AddDays(-2);
//if (dateTimeNow.DayOfWeek == DayOfWeek.Tuesday) //if (dateTimeNow.DayOfWeek == DayOfWeek.Monday)
// closedThreshold = closedThreshold.AddDays(-1); // closedThreshold = closedThreshold.AddDays(-2);
//m.RecentlyClosedJobs = new Disco.Models.BI.Job.JobTableModel(); //if (dateTimeNow.DayOfWeek == DayOfWeek.Tuesday)
//m.RecentlyClosedJobs.Fill(BI.JobTableModelBI.BuildQuery(dbContext).Where(j => j.ClosedDate > closedThreshold)); // closedThreshold = closedThreshold.AddDays(-1);
return View(m); //m.RecentlyClosedJobs = new Disco.Models.BI.Job.JobTableModel();
} //m.RecentlyClosedJobs.Fill(BI.JobTableModelBI.BuildQuery(dbContext).Where(j => j.ClosedDate > closedThreshold));
#endregion return View(m);
}
#region Lists #endregion
public virtual ActionResult AllOpen()
{ #region Lists
dbContext.Configuration.LazyLoadingEnabled = true; public virtual ActionResult AllOpen()
var m = new Models.Job.ListModel() { Title = "All Open Jobs" }; {
m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true }; dbContext.Configuration.LazyLoadingEnabled = true;
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null).OrderBy(j => j.Id)); var m = new Models.Job.ListModel() { Title = "All Open Jobs" };
return View(Views.List, m); 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));
public virtual ActionResult DevicesReadyForReturn() return View(Views.List, m);
{ }
dbContext.Configuration.LazyLoadingEnabled = true; public virtual ActionResult DevicesReadyForReturn()
var m = new Models.Job.ListModel() { Title = "Jobs with Devices Ready for Return" }; {
m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true }; dbContext.Configuration.LazyLoadingEnabled = true;
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => !j.WaitingForUserAction.HasValue var m = new Models.Job.ListModel() { Title = "Jobs with Devices Ready for Return" };
&& j.DeviceHeld != null && j.DeviceReturnedDate == null && j.DeviceReadyForReturn != null && m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true };
((!j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue && !j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue) || j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue) m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => !j.WaitingForUserAction.HasValue
&& j.ClosedDate == null).OrderBy(j => j.Id)); && j.DeviceHeld != null && j.DeviceReturnedDate == null && j.DeviceReadyForReturn != null &&
return View(Views.List, m); ((!j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue && !j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue) || j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue)
} && j.ClosedDate == null).OrderBy(j => j.Id));
public virtual ActionResult DevicesAwaitingRepair() return View(Views.List, m);
{ }
dbContext.Configuration.LazyLoadingEnabled = true; public virtual ActionResult DevicesAwaitingRepair()
var m = new Models.Job.ListModel() { Title = "Jobs with Devices Awaiting Repair" }; {
m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true }; dbContext.Configuration.LazyLoadingEnabled = true;
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null && var m = new Models.Job.ListModel() { Title = "Jobs with Devices Awaiting Repair" };
( m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true };
(j.JobMetaNonWarranty.RepairerLoggedDate != null && j.JobMetaNonWarranty.RepairerCompletedDate == null) || m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null &&
(j.JobMetaWarranty.ExternalLoggedDate != null && j.JobMetaWarranty.ExternalCompletedDate == null) (
)).OrderBy(j => j.Id)); (j.JobMetaNonWarranty.RepairerLoggedDate != null && j.JobMetaNonWarranty.RepairerCompletedDate == null) ||
return View(Views.List, m); (j.JobMetaWarranty.ExternalLoggedDate != null && j.JobMetaWarranty.ExternalCompletedDate == null)
} )).OrderBy(j => j.Id));
return View(Views.List, m);
#region "Finance Lists" }
public virtual ActionResult AwaitingFinance()
{ #region "Finance Lists"
dbContext.Configuration.LazyLoadingEnabled = true; public virtual ActionResult AwaitingFinance()
var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance" }; {
m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true }; dbContext.Configuration.LazyLoadingEnabled = true;
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null && var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance" };
( m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true };
(j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.IsInsuranceClaim && !j.JobMetaInsurance.ClaimFormSentDate.HasValue)) || m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null &&
(j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue && (!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.HNWar && (j.JobMetaNonWarranty.IsInsuranceClaim && !j.JobMetaInsurance.ClaimFormSentDate.HasValue)) ||
(j.JobTypeId == JobType.JobTypeIds.UMgmt && (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement == (j.Flags & (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement)) (j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue && (!j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue && !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue))) ||
))); (j.JobTypeId == JobType.JobTypeIds.HNWar && (!j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue || !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue)) ||
return View(Views.List, m); (j.JobTypeId == JobType.JobTypeIds.UMgmt && (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement == (j.Flags & (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement))
} )));
return View(Views.List, m);
public virtual ActionResult AwaitingFinanceCharge() }
{
dbContext.Configuration.LazyLoadingEnabled = true; public virtual ActionResult AwaitingFinanceCharge()
var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance - Accounting Charge" }; {
m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true }; dbContext.Configuration.LazyLoadingEnabled = true;
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null && var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance - Accounting Charge" };
(j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue && (!j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue && !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue))) m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true };
).OrderBy(j => j.Id)); m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null &&
(j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue && (!j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue && !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue)))
return View(Views.List, m); ).OrderBy(j => j.Id));
}
public virtual ActionResult AwaitingFinancePayment() return View(Views.List, m);
{ }
dbContext.Configuration.LazyLoadingEnabled = true; public virtual ActionResult AwaitingFinancePayment()
var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance - Accounting Payment" }; {
m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true }; dbContext.Configuration.LazyLoadingEnabled = true;
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null && var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance - Accounting Payment" };
(j.JobTypeId == JobType.JobTypeIds.HNWar && (!j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue || !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue)) m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true };
).OrderBy(j => j.Id)); m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null &&
return View(Views.List, m); (j.JobTypeId == JobType.JobTypeIds.HNWar && (!j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue || !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue))
} ).OrderBy(j => j.Id));
public virtual ActionResult AwaitingFinanceInsuranceProcessing() return View(Views.List, m);
{ }
dbContext.Configuration.LazyLoadingEnabled = true; public virtual ActionResult AwaitingFinanceInsuranceProcessing()
var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance - Insurance Processing" }; {
m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true }; dbContext.Configuration.LazyLoadingEnabled = true;
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null && var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance - Insurance Processing" };
(j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.IsInsuranceClaim && !j.JobMetaInsurance.ClaimFormSentDate.HasValue)) m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true };
).OrderBy(j => j.Id)); m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null &&
return View(Views.List, m); (j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty.IsInsuranceClaim && !j.JobMetaInsurance.ClaimFormSentDate.HasValue))
} ).OrderBy(j => j.Id));
public virtual ActionResult AwaitingFinanceAgreementBreach() return View(Views.List, m);
{ }
dbContext.Configuration.LazyLoadingEnabled = true; public virtual ActionResult AwaitingFinanceAgreementBreach()
var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance - Agreement Breach" }; {
m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true }; dbContext.Configuration.LazyLoadingEnabled = true;
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null && var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance - Agreement Breach" };
(j.JobTypeId == JobType.JobTypeIds.UMgmt && (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement == (j.Flags & (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement)) m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true };
).OrderBy(j => j.Id)); m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null &&
return View(Views.List, m); (j.JobTypeId == JobType.JobTypeIds.UMgmt && (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement == (j.Flags & (long)Job.UserManagementFlags.Infringement_BreachFinancialAgreement))
} ).OrderBy(j => j.Id));
return View(Views.List, m);
#endregion }
public virtual ActionResult AwaitingUserAction() #endregion
{
dbContext.Configuration.LazyLoadingEnabled = true; public virtual ActionResult AwaitingUserAction()
var m = new Models.Job.ListModel() { Title = "Jobs Awaiting User Action" }; {
m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true }; dbContext.Configuration.LazyLoadingEnabled = true;
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => (j.WaitingForUserAction.HasValue || (j.JobMetaNonWarranty.AccountingChargeAddedDate != null && j.JobMetaNonWarranty.AccountingChargePaidDate == null)) var m = new Models.Job.ListModel() { Title = "Jobs Awaiting User Action" };
&& j.ClosedDate == null).OrderBy(j => j.Id)); m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true };
return View(Views.List, m); 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));
public virtual ActionResult RecentlyClosed() return View(Views.List, m);
{ }
dbContext.Configuration.LazyLoadingEnabled = true; public virtual ActionResult RecentlyClosed()
var m = new Models.Job.ListModel() { Title = "Recently Closed Jobs" }; {
m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true }; dbContext.Configuration.LazyLoadingEnabled = true;
var m = new Models.Job.ListModel() { Title = "Recently Closed Jobs" };
var dateTimeNow = DateTime.Now; m.JobTable = new Disco.Models.BI.Job.JobTableModel() { ShowStatus = true };
var closedThreshold = dateTimeNow.AddDays(-2);
if (dateTimeNow.DayOfWeek == DayOfWeek.Monday) var dateTimeNow = DateTime.Now;
closedThreshold = closedThreshold.AddDays(-2); var closedThreshold = dateTimeNow.AddDays(-2);
if (dateTimeNow.DayOfWeek == DayOfWeek.Tuesday) if (dateTimeNow.DayOfWeek == DayOfWeek.Monday)
closedThreshold = closedThreshold.AddDays(-1); closedThreshold = closedThreshold.AddDays(-2);
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate > closedThreshold).OrderBy(j => j.Id)); if (dateTimeNow.DayOfWeek == DayOfWeek.Tuesday)
return View(Views.List, m); closedThreshold = closedThreshold.AddDays(-1);
} m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate > closedThreshold).OrderBy(j => j.Id));
public virtual ActionResult Locations() return View(Views.List, m);
{ }
dbContext.Configuration.LazyLoadingEnabled = true; public virtual ActionResult 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 }; dbContext.Configuration.LazyLoadingEnabled = true;
m.JobTable.Fill(dbContext, BI.JobBI.Searching.BuildJobTableModel(dbContext).Where(j => j.ClosedDate == null && j.DeviceHeld.HasValue && !j.DeviceReturnedDate.HasValue).OrderBy(j => j.DeviceHeldLocation)); var m = new Models.Job.ListModel() { Title = "Held Device Locations" };
return View(Views.List, m); 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));
return View(Views.List, m);
#endregion }
#region Show #endregion
public virtual ActionResult Show(int? id)
{ #region Show
if (!id.HasValue) public virtual ActionResult Show(int? id)
return RedirectToAction(MVC.Job.Index()); {
if (!id.HasValue)
dbContext.Configuration.LazyLoadingEnabled = true; return RedirectToAction(MVC.Job.Index());
var m = new Models.Job.ShowModel(); dbContext.Configuration.LazyLoadingEnabled = true;
m.Job = (from j in dbContext.Jobs.Include("Device.DeviceModel").Include("Device.DeviceBatch").Include("DeviceHeldTechUser").Include("DeviceReadyForReturnTechUser").Include("DeviceReturnedTechUser") var m = new Models.Job.ShowModel();
.Include("OpenedTechUser").Include("ClosedTechUser").Include("JobType").Include("JobSubTypes").Include("User").Include("JobLogs.TechUser")
where (j.Id == id.Value) m.Job = (from j in dbContext.Jobs.Include("Device.DeviceModel").Include("Device.DeviceBatch").Include("DeviceHeldTechUser").Include("DeviceReadyForReturnTechUser").Include("DeviceReturnedTechUser")
select j).FirstOrDefault(); .Include("OpenedTechUser").Include("ClosedTechUser").Include("JobType").Include("JobSubTypes").Include("User").Include("JobLogs.TechUser")
where (j.Id == id.Value)
m.UpdatableJobSubTypes = m.Job.JobType.JobSubTypes.OrderBy(jst => jst.Description).ToList(); select j).FirstOrDefault();
m.DocumentTemplates = m.Job.AvailableDocumentTemplates(dbContext, DiscoApplication.CurrentUser, DateTime.Now); m.UpdatableJobSubTypes = m.Job.JobType.JobSubTypes.OrderBy(jst => jst.Description).ToList();
return View(m); m.AvailableDocumentTemplates = m.Job.AvailableDocumentTemplates(dbContext, DiscoApplication.CurrentUser, DateTime.Now);
}
#endregion // UI Extensions
UIExtensions.ExecuteExtensions<JobShowModel>(this.ControllerContext, m);
#region Create
public virtual ActionResult Create(string DeviceSerialNumber, string UserId) return View(m);
{ }
var m = new Models.Job.CreateModel() #endregion
{
DeviceSerialNumber = DeviceSerialNumber, #region Create
UserId = UserId public virtual ActionResult Create(string DeviceSerialNumber, string UserId)
}; {
m.UpdateModel(dbContext); var m = new Models.Job.CreateModel()
{
return View(m); DeviceSerialNumber = DeviceSerialNumber,
} UserId = UserId
[HttpPost] };
public virtual ActionResult Create(Models.Job.CreateModel m) m.UpdateModel(dbContext);
{
m.UpdateModel(dbContext); return View(m);
}
if (!ModelState.IsValid) [HttpPost]
{ public virtual ActionResult Create(Models.Job.CreateModel m)
return View(m); {
} m.UpdateModel(dbContext);
else
{ if (!ModelState.IsValid)
// Create New Job {
var currentUser = dbContext.Users.Find(DiscoApplication.CurrentUser.Id); return View(m);
var j = BI.JobBI.Utilities.Create(dbContext, m.Device, m.User, m.GetJobType, m.GetJobSubTypes, currentUser); }
else
if (m.DeviceHeld.Value) {
{ // Create New Job
j.OnDeviceHeld(currentUser); var currentUser = dbContext.Users.Find(DiscoApplication.CurrentUser.Id);
m.QuickLog = false; var j = BI.JobBI.Utilities.Create(dbContext, m.Device, m.User, m.GetJobType, m.GetJobSubTypes, currentUser);
}
else if (m.DeviceHeld.Value)
{ {
if (m.QuickLog.HasValue && m.QuickLog.Value && m.QuickLogTaskTimeMinutes.HasValue && m.QuickLogTaskTimeMinutes.Value > 0) j.OnDeviceHeld(currentUser);
{ m.QuickLog = false;
// Quick Log }
// Set Opened Date in the past else
j.OpenedDate = DateTime.Now.AddMinutes(-1 * m.QuickLogTaskTimeMinutes.Value); {
// Close Job if (m.QuickLog.HasValue && m.QuickLog.Value && m.QuickLogTaskTimeMinutes.HasValue && m.QuickLogTaskTimeMinutes.Value > 0)
j.OnClose(currentUser); {
} // Quick Log
else // Set Opened Date in the past
{ j.OpenedDate = DateTime.Now.AddMinutes(-1 * m.QuickLogTaskTimeMinutes.Value);
m.QuickLog = false; // Close Job
} j.OnClose(currentUser);
} }
else
// Add Comments {
if (!string.IsNullOrWhiteSpace(m.Comments)) m.QuickLog = false;
{ }
var jl = new Disco.Models.Repository.JobLog() }
{
Job = j, // Add Comments
TechUser = currentUser, if (!string.IsNullOrWhiteSpace(m.Comments))
Timestamp = DateTime.Now, {
Comments = m.Comments var jl = new Disco.Models.Repository.JobLog()
}; {
dbContext.JobLogs.Add(jl); Job = j,
} TechUser = currentUser,
Timestamp = DateTime.Now,
dbContext.SaveChanges(); Comments = m.Comments
};
// Return Dialog Redirect dbContext.JobLogs.Add(jl);
var redirectModel = new Models.Job.CreateRedirectModel(); }
if (m.QuickLog.HasValue && m.QuickLog.Value && !string.IsNullOrWhiteSpace(m.QuickLogDestinationUrl))
redirectModel.RedirectLink = m.QuickLogDestinationUrl; dbContext.SaveChanges();
else
redirectModel.RedirectLink = Url.Action(MVC.Job.Show(j.Id)); // Return Dialog Redirect
var redirectModel = new Models.Job.CreateRedirectModel();
return View(Views.Create_Redirect, redirectModel); if (m.QuickLog.HasValue && m.QuickLog.Value && !string.IsNullOrWhiteSpace(m.QuickLogDestinationUrl))
} redirectModel.RedirectLink = m.QuickLogDestinationUrl;
} else
#endregion redirectModel.RedirectLink = Url.Action(MVC.Job.Show(j.Id));
// Decommissioned 2012-11-28 G# - Moved to new infrastructure return View(Views.Create_Redirect, redirectModel);
#region Create - Old }
//public virtual ActionResult Create(string DeviceSerialNumber, string UserId) }
//{ #endregion
// var m = new Models.Job.CreateModel()
// { // Decommissioned 2012-11-28 G# - Moved to new infrastructure
// DeviceSerialNumber = DeviceSerialNumber, #region Create - Old
// UserId = UserId //public virtual ActionResult Create(string DeviceSerialNumber, string UserId)
// }; //{
// m.UpdateModel(dbContext); // var m = new Models.Job.CreateModel()
// {
// return View(m); // DeviceSerialNumber = DeviceSerialNumber,
//} // UserId = UserId
//[HttpPost] // };
//public virtual ActionResult Create(Models.Job.CreateModel m) // m.UpdateModel(dbContext);
//{
// m.UpdateModel(dbContext); // return View(m);
//}
// if (!ModelState.IsValid) //[HttpPost]
// { //public virtual ActionResult Create(Models.Job.CreateModel m)
// return View(m); //{
// } // m.UpdateModel(dbContext);
// else
// { // if (!ModelState.IsValid)
// // Create New Job // {
// var currentUser = dbContext.Users.Find(DiscoApplication.CurrentUser.Id); // return View(m);
// var j = BI.JobBI.Utilities.Create(dbContext, m.Device, m.User, m.GetJobType, m.GetJobSubTypes, currentUser); // }
// dbContext.SaveChanges(); // else
// return RedirectToAction(MVC.Job.Show(j.Id)); // {
// } // // Create New Job
//} // var currentUser = dbContext.Users.Find(DiscoApplication.CurrentUser.Id);
#endregion // var j = BI.JobBI.Utilities.Create(dbContext, m.Device, m.User, m.GetJobType, m.GetJobSubTypes, currentUser);
// End Decommissioned 2012-11-28 G# // dbContext.SaveChanges();
// return RedirectToAction(MVC.Job.Show(j.Id));
#region Log Warranty // }
public virtual ActionResult LogWarranty(int id, string WarrantyProviderId, int? OrganisationAddressId) //}
{ #endregion
var m = new Models.Job.LogWarrantyModel() { JobId = id, WarrantyProviderId = WarrantyProviderId, OrganisationAddressId = OrganisationAddressId }; // End Decommissioned 2012-11-28 G#
m.UpdateModel(dbContext, false);
m.FaultDescription = m.Job.GenerateFaultDescription(dbContext); #region Log Warranty
public virtual ActionResult LogWarranty(int id, string WarrantyProviderId, int? OrganisationAddressId)
if (m.WarrantyProvider != null) {
{ var m = new Models.Job.LogWarrantyModel() { JobId = id, WarrantyProviderId = WarrantyProviderId, OrganisationAddressId = OrganisationAddressId };
using (var wp = m.WarrantyProvider.CreateInstance<WarrantyProviderFeature>()) m.UpdateModel(dbContext, false);
{ m.FaultDescription = m.Job.GenerateFaultDescription(dbContext);
if (wp.SubmitJobViewType != null)
{ if (m.WarrantyProvider != null)
m.WarrantyProviderSubmitJobViewType = wp.SubmitJobViewType; {
m.WarrantyProviderSubmitJobModel = wp.SubmitJobViewModel(dbContext, this, m.Job, m.OrganisationAddress, m.TechUser); using (var wp = m.WarrantyProvider.CreateInstance<WarrantyProviderFeature>())
} {
} if (wp.SubmitJobViewType != null)
} {
m.WarrantyProviderSubmitJobViewType = wp.SubmitJobViewType;
return View(m); m.WarrantyProviderSubmitJobModel = wp.SubmitJobViewModel(dbContext, this, m.Job, m.OrganisationAddress, m.TechUser);
} }
[HttpPost] }
public virtual ActionResult LogWarranty(Models.Job.LogWarrantyModel m, FormCollection form) }
{
m.UpdateModel(dbContext, true); return View(m);
}
if (ModelState.IsValid) [HttpPost]
{ public virtual ActionResult LogWarranty(Models.Job.LogWarrantyModel m, FormCollection form)
switch (m.WarrantyAction) {
{ m.UpdateModel(dbContext, true);
case "Disclose":
using (var p = m.WarrantyProvider.CreateInstance<WarrantyProviderFeature>()) if (ModelState.IsValid)
{ {
Dictionary<string, string> warrantyProviderProperties; switch (m.WarrantyAction)
try {
{ case "Disclose":
warrantyProviderProperties = p.SubmitJobParseProperties(dbContext, form, this, m.Job, m.OrganisationAddress, m.TechUser, m.FaultDescription); using (var p = m.WarrantyProvider.CreateInstance<WarrantyProviderFeature>())
} {
catch (Exception ex) Dictionary<string, string> warrantyProviderProperties;
{ try
m.Error = ex; {
return View(Views.LogWarrantyError, m); warrantyProviderProperties = p.SubmitJobParseProperties(dbContext, form, this, m.Job, m.OrganisationAddress, m.TechUser, m.FaultDescription);
} }
if (!ModelState.IsValid) catch (Exception ex)
return View(Views.LogWarranty, m); {
m.Error = ex;
if (warrantyProviderProperties != null) return View(Views.LogWarrantyError, m);
{ }
JavaScriptSerializer j = new JavaScriptSerializer(); if (!ModelState.IsValid)
m.WarrantyProviderPropertiesJson = j.Serialize(warrantyProviderProperties); return View(Views.LogWarranty, m);
}
m.DiscloseProperties = p.SubmitJobDiscloseInfo(dbContext, m.Job, m.OrganisationAddress, m.TechUser, m.FaultDescription, warrantyProviderProperties); if (warrantyProviderProperties != null)
return View(Views.LogWarrantyDisclose, m); {
} JavaScriptSerializer j = new JavaScriptSerializer();
case "Submit": m.WarrantyProviderPropertiesJson = j.Serialize(warrantyProviderProperties);
try }
{ m.DiscloseProperties = p.SubmitJobDiscloseInfo(dbContext, m.Job, m.OrganisationAddress, m.TechUser, m.FaultDescription, warrantyProviderProperties);
m.Job.OnLogWarranty(dbContext, m.FaultDescription, m.WarrantyProvider, m.OrganisationAddress, m.TechUser, m.WarrantyProviderProperties()); return View(Views.LogWarrantyDisclose, m);
dbContext.SaveChanges(); }
return RedirectToAction(MVC.Job.Show(m.JobId)); case "Submit":
} try
catch (Exception ex) {
{ m.Job.OnLogWarranty(dbContext, m.FaultDescription, m.WarrantyProvider, m.OrganisationAddress, m.TechUser, m.WarrantyProviderProperties());
m.Error = ex; dbContext.SaveChanges();
return View(Views.LogWarrantyError, m); return RedirectToAction(MVC.Job.Show(m.JobId));
throw; }
} catch (Exception ex)
default: {
return RedirectToAction(MVC.Job.Show(m.JobId)); m.Error = ex;
} return View(Views.LogWarrantyError, m);
throw;
} }
else default:
{ return RedirectToAction(MVC.Job.Show(m.JobId));
return View(Views.LogWarranty, m); }
}
} }
else
public virtual ActionResult WarrantyProviderJobDetails(int id) {
{ return View(Views.LogWarranty, m);
Models.Job.WarrantyProviderJobDetailsModel model = new Models.Job.WarrantyProviderJobDetailsModel(); }
}
Job job = dbContext.Jobs.Include("Device.DeviceModel").Include("JobMetaWarranty").Include("JobSubTypes").Where(j => j.Id == id).FirstOrDefault();
if (job != null) public virtual ActionResult WarrantyProviderJobDetails(int id)
{ {
if (job.JobMetaWarranty != null && !string.IsNullOrEmpty(job.JobMetaWarranty.ExternalName)) Models.Job.WarrantyProviderJobDetailsModel model = new Models.Job.WarrantyProviderJobDetailsModel();
{
var providerDef = WarrantyProviderFeature.FindPluginFeature(job.JobMetaWarranty.ExternalName); Job job = dbContext.Jobs.Include("Device.DeviceModel").Include("JobMetaWarranty").Include("JobSubTypes").Where(j => j.Id == id).FirstOrDefault();
if (job != null)
if (providerDef != null) {
{ if (job.JobMetaWarranty != null && !string.IsNullOrEmpty(job.JobMetaWarranty.ExternalName))
using (WarrantyProviderFeature providerInstance = providerDef.CreateInstance<WarrantyProviderFeature>()) {
{ var providerDef = WarrantyProviderFeature.FindPluginFeature(job.JobMetaWarranty.ExternalName);
if (providerInstance.JobDetailsSupported)
{ if (providerDef != null)
try {
{ using (WarrantyProviderFeature providerInstance = providerDef.CreateInstance<WarrantyProviderFeature>())
object providerModel = providerInstance.JobDetailsViewModel(dbContext, this, job); {
if (providerInstance.JobDetailsSupported)
model.JobDetailsSupported = true; {
model.ViewType = providerInstance.JobDetailsViewType; try
model.ViewModel = providerModel; {
return View(model); object providerModel = providerInstance.JobDetailsViewModel(dbContext, this, job);
}
catch (Exception ex) model.JobDetailsSupported = true;
{ model.ViewType = providerInstance.JobDetailsViewType;
model.JobDetailsSupported = false; model.ViewModel = providerModel;
model.JobDetailsException = ex; return View(model);
return View(model); }
} catch (Exception ex)
} {
else model.JobDetailsSupported = false;
{ model.JobDetailsException = ex;
model.JobDetailsSupported = false; return View(model);
model.JobDetailsNotSupportedMessage = string.Format("Plugin '{0} ({1})' (Warranty Provider for '{2}') doesn't support Job Details", providerInstance.Manifest.Name, providerInstance.Manifest.Id, providerInstance.WarrantyProviderId); }
return View(model); }
} else
} {
} model.JobDetailsSupported = false;
model.JobDetailsNotSupportedMessage = string.Format("Plugin '{0} ({1})' (Warranty Provider for '{2}') doesn't support Job Details", providerInstance.Manifest.Name, providerInstance.Manifest.Id, providerInstance.WarrantyProviderId);
model.JobDetailsSupported = false; return View(model);
model.JobDetailsNotSupportedMessage = string.Format("Warranty Provider '{0}' is not integrated with Disco", job.JobMetaWarranty.ExternalName); }
return View(model); }
} }
else
{ model.JobDetailsSupported = false;
model.JobDetailsSupported = false; model.JobDetailsNotSupportedMessage = string.Format("Warranty Provider '{0}' is not integrated with Disco", job.JobMetaWarranty.ExternalName);
model.JobDetailsNotSupportedMessage = "Job not in the correct state"; return View(model);
return View(model); }
} else
} {
else model.JobDetailsSupported = false;
{ model.JobDetailsNotSupportedMessage = "Job not in the correct state";
return HttpNotFound("Invalid Job Id"); return View(model);
} }
} }
#endregion else
{
} return HttpNotFound("Invalid Job Id");
} }
}
#endregion
}
}
+29 -28
View File
@@ -1,29 +1,30 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Web; using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
using Disco.BI.Extensions; using Disco.BI.Extensions;
using Disco.Web.Extensions; using Disco.Models.UI.Job;
using Disco.Web.Extensions;
namespace Disco.Web.Models.Job
{ namespace Disco.Web.Models.Job
public class ShowModel {
{ public class ShowModel : JobShowModel
public Disco.Models.Repository.Job Job { get; set; } {
public Disco.Models.Repository.Job Job { get; set; }
public List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
public List<Disco.Models.Repository.JobSubType> UpdatableJobSubTypes { get; set; } public List<Disco.Models.Repository.DocumentTemplate> AvailableDocumentTemplates { get; set; }
public List<Disco.Models.Repository.JobSubType> UpdatableJobSubTypes { get; set; }
public List<SelectListItem> DocumentTemplatesSelectListItems
{ public List<SelectListItem> DocumentTemplatesSelectListItems
get {
{ get
var list = new List<SelectListItem>(); {
list.Add(new SelectListItem() { Selected = true, Value = string.Empty, Text = "Generate Document" }); var list = new List<SelectListItem>();
list.AddRange(this.DocumentTemplates.ToSelectListItems()); list.Add(new SelectListItem() { Selected = true, Value = string.Empty, Text = "Generate Document" });
return list; list.AddRange(this.AvailableDocumentTemplates.ToSelectListItems());
} return list;
} }
} }
}
} }
+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.0219.1854")] [assembly: AssemblyVersion("1.2.0221.1820")]
[assembly: AssemblyFileVersion("1.2.0219.1854")] [assembly: AssemblyFileVersion("1.2.0221.1820")]
+56 -56
View File
@@ -1,56 +1,56 @@
@model Disco.Web.Models.Job.ShowModel @model Disco.Web.Models.Job.ShowModel
@{ @{
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id.ToString())); ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id.ToString()));
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight"); Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker"); Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker");
} }
<div id="Job_Show"> <div id="Job_Show">
<div id="Job_Show_Status"> <div id="Job_Show_Status">
@{ var jobStatusInfo = Model.Job.Status();} @{ var jobStatusInfo = Model.Job.Status();}
<span class="icon JobStatus@(jobStatusInfo.Item1)"></span>@jobStatusInfo.Item2 <span class="icon JobStatus@(jobStatusInfo.Item1)"></span>@jobStatusInfo.Item2
<script type="text/javascript"> <script type="text/javascript">
$(function () { $(function () {
$('#Job_Show_Status').appendTo('#layout_PageHeading') $('#Job_Show_Status').appendTo('#layout_PageHeading')
}); });
</script> </script>
</div> </div>
@Html.Partial(MVC.Job.Views.JobParts._Subject, Model) @Html.Partial(MVC.Job.Views.JobParts._Subject, Model)
<script type="text/javascript"> <script type="text/javascript">
$(function () { $(function () {
var $tabs = $('#jobDetailTabs'); var $tabs = $('#jobDetailTabs');
$tabs.tabs({ $tabs.tabs({
activate: function (event, ui) { activate: function (event, ui) {
window.setTimeout(function () { window.setTimeout(function () {
var $window = $(window); var $window = $(window);
var tabHeight = $tabs.height(); var tabHeight = $tabs.height();
var tabOffset = $tabs.offset(); var tabOffset = $tabs.offset();
var windowScrollTop = $window.scrollTop(); var windowScrollTop = $window.scrollTop();
var windowHeight = $window.height(); var windowHeight = $window.height();
var tabTopNotShown = windowScrollTop - tabOffset.top; var tabTopNotShown = windowScrollTop - tabOffset.top;
if (tabTopNotShown > 0) { if (tabTopNotShown > 0) {
$('html').animate({ scrollTop: tabOffset.top }, 125); $('html').animate({ scrollTop: tabOffset.top }, 125);
} else { } else {
var tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)) * -1; var tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)) * -1;
if (tabBottomNotShown > 0) { if (tabBottomNotShown > 0) {
if (tabHeight > windowHeight) if (tabHeight > windowHeight)
$('html').animate({ scrollTop: tabOffset.top }, 125); $('html').animate({ scrollTop: tabOffset.top }, 125);
else else
$('html').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125); $('html').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);
} }
} }
}, 1); }, 1);
} }
}); });
}); });
</script> </script>
<div id="jobDetailTabs"> <div id="jobDetailTabs">
<ul id="jobDetailTabItems"> <ul id="jobDetailTabItems">
<li><a href="#jobDetailTab-Resources">Log and Attachments</a></li> <li><a href="#jobDetailTab-Resources">Log and Attachments</a></li>
</ul> </ul>
<div id="jobDetailTab-Resources" class="jobPart"> <div id="jobDetailTab-Resources" class="jobPart">
@Html.Partial(MVC.Job.Views.JobParts.Resources, Model) @Html.Partial(MVC.Job.Views.JobParts.Resources, Model)
</div> </div>
@Html.Partial(MVC.Job.Views.JobParts.JobMetaAdditions, Model) @Html.Partial(MVC.Job.Views.JobParts.JobMetaAdditions, Model)
</div> </div>
</div> </div>
+192 -192
View File
@@ -1,192 +1,192 @@
#pragma warning disable 1591 #pragma warning disable 1591
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.17929 // Runtime Version:4.0.30319.17929
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace Disco.Web.Views.Job namespace Disco.Web.Views.Job
{ {
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Text; using System.Text;
using System.Web; using System.Web;
using System.Web.Helpers; using System.Web.Helpers;
using System.Web.Mvc; using System.Web.Mvc;
using System.Web.Mvc.Ajax; using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html; using System.Web.Mvc.Html;
using System.Web.Routing; using System.Web.Routing;
using System.Web.Security; using System.Web.Security;
using System.Web.UI; using System.Web.UI;
using System.Web.WebPages; using System.Web.WebPages;
using Disco.BI.Extensions; using Disco.BI.Extensions;
using Disco.Models.Repository; using Disco.Models.Repository;
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.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/Show.cshtml")] [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/Show.cshtml")]
public class Show : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel> public class Show : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
{ {
public Show() public Show()
{ {
} }
public override void Execute() public override void Execute()
{ {
#line 2 "..\..\Views\Job\Show.cshtml" #line 2 "..\..\Views\Job\Show.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id.ToString())); ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id.ToString()));
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight"); Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker"); Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker");
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n<div"); WriteLiteral("\r\n<div");
WriteLiteral(" id=\"Job_Show\""); WriteLiteral(" id=\"Job_Show\"");
WriteLiteral(">\r\n <div"); WriteLiteral(">\r\n <div");
WriteLiteral(" id=\"Job_Show_Status\""); WriteLiteral(" id=\"Job_Show_Status\"");
WriteLiteral(">\r\n"); WriteLiteral(">\r\n");
#line 9 "..\..\Views\Job\Show.cshtml" #line 9 "..\..\Views\Job\Show.cshtml"
#line default #line default
#line hidden #line hidden
#line 9 "..\..\Views\Job\Show.cshtml" #line 9 "..\..\Views\Job\Show.cshtml"
var jobStatusInfo = Model.Job.Status(); var jobStatusInfo = Model.Job.Status();
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n <span"); WriteLiteral("\r\n <span");
WriteAttribute("class", Tuple.Create(" class=\"", 420), Tuple.Create("\"", 464) WriteAttribute("class", Tuple.Create(" class=\"", 420), Tuple.Create("\"", 464)
, Tuple.Create(Tuple.Create("", 428), Tuple.Create("icon", 428), true) , Tuple.Create(Tuple.Create("", 428), Tuple.Create("icon", 428), true)
, Tuple.Create(Tuple.Create(" ", 432), Tuple.Create("JobStatus", 433), true) , Tuple.Create(Tuple.Create(" ", 432), Tuple.Create("JobStatus", 433), true)
#line 10 "..\..\Views\Job\Show.cshtml" #line 10 "..\..\Views\Job\Show.cshtml"
, Tuple.Create(Tuple.Create("", 442), Tuple.Create<System.Object, System.Int32>(jobStatusInfo.Item1 , Tuple.Create(Tuple.Create("", 442), Tuple.Create<System.Object, System.Int32>(jobStatusInfo.Item1
#line default #line default
#line hidden #line hidden
, 442), false) , 442), false)
); );
WriteLiteral("></span>"); WriteLiteral("></span>");
#line 10 "..\..\Views\Job\Show.cshtml" #line 10 "..\..\Views\Job\Show.cshtml"
Write(jobStatusInfo.Item2); Write(jobStatusInfo.Item2);
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n <script"); WriteLiteral("\r\n <script");
WriteLiteral(" type=\"text/javascript\""); WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n $(\'#Job_Show_Status\').appendTo(\'#" + WriteLiteral(">\r\n $(function () {\r\n $(\'#Job_Show_Status\').appendTo(\'#" +
"layout_PageHeading\')\r\n });\r\n </script>\r\n </div>\r\n"); "layout_PageHeading\')\r\n });\r\n </script>\r\n </div>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 17 "..\..\Views\Job\Show.cshtml" #line 17 "..\..\Views\Job\Show.cshtml"
Write(Html.Partial(MVC.Job.Views.JobParts._Subject, Model)); Write(Html.Partial(MVC.Job.Views.JobParts._Subject, Model));
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n <script"); WriteLiteral("\r\n <script");
WriteLiteral(" type=\"text/javascript\""); WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@"> WriteLiteral(@">
$(function () { $(function () {
var $tabs = $('#jobDetailTabs'); var $tabs = $('#jobDetailTabs');
$tabs.tabs({ $tabs.tabs({
activate: function (event, ui) { activate: function (event, ui) {
window.setTimeout(function () { window.setTimeout(function () {
var $window = $(window); var $window = $(window);
var tabHeight = $tabs.height(); var tabHeight = $tabs.height();
var tabOffset = $tabs.offset(); var tabOffset = $tabs.offset();
var windowScrollTop = $window.scrollTop(); var windowScrollTop = $window.scrollTop();
var windowHeight = $window.height(); var windowHeight = $window.height();
var tabTopNotShown = windowScrollTop - tabOffset.top; var tabTopNotShown = windowScrollTop - tabOffset.top;
if (tabTopNotShown > 0) { if (tabTopNotShown > 0) {
$('html').animate({ scrollTop: tabOffset.top }, 125); $('html').animate({ scrollTop: tabOffset.top }, 125);
} else { } else {
var tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)) * -1; var tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)) * -1;
if (tabBottomNotShown > 0) { if (tabBottomNotShown > 0) {
if (tabHeight > windowHeight) if (tabHeight > windowHeight)
$('html').animate({ scrollTop: tabOffset.top }, 125); $('html').animate({ scrollTop: tabOffset.top }, 125);
else else
$('html').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125); $('html').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);
} }
} }
}, 1); }, 1);
} }
}); });
}); });
</script> </script>
<div"); <div");
WriteLiteral(" id=\"jobDetailTabs\""); WriteLiteral(" id=\"jobDetailTabs\"");
WriteLiteral(">\r\n <ul"); WriteLiteral(">\r\n <ul");
WriteLiteral(" id=\"jobDetailTabItems\""); WriteLiteral(" id=\"jobDetailTabItems\"");
WriteLiteral(">\r\n <li><a"); WriteLiteral(">\r\n <li><a");
WriteLiteral(" href=\"#jobDetailTab-Resources\""); WriteLiteral(" href=\"#jobDetailTab-Resources\"");
WriteLiteral(">Log and Attachments</a></li>\r\n </ul>\r\n <div"); WriteLiteral(">Log and Attachments</a></li>\r\n </ul>\r\n <div");
WriteLiteral(" id=\"jobDetailTab-Resources\""); WriteLiteral(" id=\"jobDetailTab-Resources\"");
WriteLiteral(" class=\"jobPart\""); WriteLiteral(" class=\"jobPart\"");
WriteLiteral(">\r\n"); WriteLiteral(">\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 52 "..\..\Views\Job\Show.cshtml" #line 52 "..\..\Views\Job\Show.cshtml"
Write(Html.Partial(MVC.Job.Views.JobParts.Resources, Model)); Write(Html.Partial(MVC.Job.Views.JobParts.Resources, Model));
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n </div>\r\n"); WriteLiteral("\r\n </div>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 54 "..\..\Views\Job\Show.cshtml" #line 54 "..\..\Views\Job\Show.cshtml"
Write(Html.Partial(MVC.Job.Views.JobParts.JobMetaAdditions, Model)); Write(Html.Partial(MVC.Job.Views.JobParts.JobMetaAdditions, Model));
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n </div>\r\n</div>\r\n"); WriteLiteral("\r\n </div>\r\n</div>");
} }
} }
} }
#pragma warning restore 1591 #pragma warning restore 1591
+109 -108
View File
@@ -1,108 +1,109 @@
@{ @{
Html.BundleDeferred("~/Style/Site"); Html.BundleDeferred("~/Style/Site");
Html.BundleDeferred("~/ClientScripts/Core"); Html.BundleDeferred("~/ClientScripts/Core");
} }
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<title>Disco - @CommonHelpers.BreadcrumbsTitle(ViewBag.Title)</title> <title>Disco - @CommonHelpers.BreadcrumbsTitle(ViewBag.Title)</title>
<link rel="shortcut icon" href="/favicon.ico" /> <link rel="shortcut icon" href="/favicon.ico" />
<meta name="application-name" content="Disco" /> <meta name="application-name" content="Disco" />
<meta name="msapplication-starturl" content="/" /> <meta name="msapplication-starturl" content="/" />
<meta name="msapplication-tooltip" content="Open Disco" /> <meta name="msapplication-tooltip" content="Open Disco" />
@Html.BundleRenderDeferred() @Html.BundleRenderDeferred()
@RenderSection("head", false) @RenderSection("head", false)
</head> </head>
<body class="layout"> <body class="layout">
<div class="page"> <div class="page">
<header> <header>
<div class="clearfix"> <div class="clearfix">
<div id="heading"> <div id="heading">
<a href="@Url.Action(MVC.Job.Index())"> <a href="@Url.Action(MVC.Job.Index())">
<img src="@Links.ClientSource.Style.Images.Heading_png" alt="DISCO - ICT Asset Management" /></a> <img src="@Links.ClientSource.Style.Images.Heading_png" alt="DISCO - ICT Asset Management" /></a>
</div> </div>
<div id="headerMenu"> <div id="headerMenu">
<span>Welcome @Html.ActionLink(DiscoApplication.CurrentUser.ToString(), MVC.User.Show(DiscoApplication.CurrentUser.Id))</span> <span>Welcome @Html.ActionLink(DiscoApplication.CurrentUser.ToString(), MVC.User.Show(DiscoApplication.CurrentUser.Id))</span>
@using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get)) @using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
{ {
@Html.TextBox("term", null, new { accesskey = "s" }) @Html.TextBox("term", null, new { accesskey = "s" })
<script type="text/javascript"> <script type="text/javascript">
//<!-- //<!--
$(function () { $(function () {
$('#term').watermark('Search').keypress(function (e) { $('#term').watermark('Search').keypress(function (e) {
if (e.keyCode == 13) { if (e.keyCode == 13) {
$(this).closest('form').submit(); $(this).closest('form').submit();
} }
}).focus(function () { }).focus(function () {
$(this).select(); $(this).select();
}); });
}); });
//--> //-->
</script> </script>
} }
</div> </div>
</div> </div>
<nav> <nav>
<ul id="menu"> <ul id="menu">
<li>@Html.ActionLink("Jobs", MVC.Job.Index(), accesskey: "1") <li>@Html.ActionLink("Jobs", MVC.Job.Index(), accesskey: "1")
<ul> <ul>
<li>@Html.ActionLink("Devices Ready for Return", MVC.Job.DevicesReadyForReturn())</li> <li>@Html.ActionLink("Devices Ready for Return", MVC.Job.DevicesReadyForReturn())</li>
<li>@Html.ActionLink("Device Held Locations", MVC.Job.Locations())</li> <li>@Html.ActionLink("Device Held Locations", MVC.Job.Locations())</li>
<li>@Html.ActionLink("Awaiting User Action", MVC.Job.AwaitingUserAction())</li> <li>@Html.ActionLink("Awaiting User Action", MVC.Job.AwaitingUserAction())</li>
<li>@Html.ActionLink("Awaiting Finance", MVC.Job.AwaitingFinance()) <li>@Html.ActionLink("Awaiting Finance", MVC.Job.AwaitingFinance())
<ul> <ul>
<li>@Html.ActionLink("Accounting Charge", MVC.Job.AwaitingFinanceCharge())</li> <li>@Html.ActionLink("Accounting Charge", MVC.Job.AwaitingFinanceCharge())</li>
<li>@Html.ActionLink("Accounting Payment", MVC.Job.AwaitingFinancePayment())</li> <li>@Html.ActionLink("Accounting Payment", MVC.Job.AwaitingFinancePayment())</li>
<li>@Html.ActionLink("Agreement Breach", MVC.Job.AwaitingFinanceAgreementBreach())</li> <li>@Html.ActionLink("Agreement Breach", MVC.Job.AwaitingFinanceAgreementBreach())</li>
<li>@Html.ActionLink("Insurance Processing", MVC.Job.AwaitingFinanceInsuranceProcessing())</li> <li>@Html.ActionLink("Insurance Processing", MVC.Job.AwaitingFinanceInsuranceProcessing())</li>
</ul> </ul>
</li> </li>
<li>@Html.ActionLink("Awaiting Device Repair", MVC.Job.DevicesAwaitingRepair())</li> <li>@Html.ActionLink("Awaiting Device Repair", MVC.Job.DevicesAwaitingRepair())</li>
<li>@Html.ActionLink("All Open", MVC.Job.AllOpen())</li> <li>@Html.ActionLink("All Open", MVC.Job.AllOpen())</li>
<li>@Html.ActionLink("Recently Closed", MVC.Job.RecentlyClosed())</li> <li>@Html.ActionLink("Recently Closed", MVC.Job.RecentlyClosed())</li>
</ul> </ul>
</li> </li>
<li class="sep"></li> <li class="sep"></li>
<li>@Html.ActionLink("Devices", MVC.Device.Index(), accesskey: "2")</li> <li>@Html.ActionLink("Devices", MVC.Device.Index(), accesskey: "2")</li>
<li class="sep"></li> <li class="sep"></li>
<li>@Html.ActionLink("Users", MVC.User.Index(), accesskey: "3")</li> <li>@Html.ActionLink("Users", MVC.User.Index(), accesskey: "3")</li>
<li class="moveRight">@Html.ActionLink("Public Reports", MVC.Public.Public.Index())</li> <li class="moveRight">@Html.ActionLink("Public Reports", MVC.Public.Public.Index())</li>
<li class="sep"></li> <li class="sep"></li>
<li>@Html.ActionLink("Configuration", MVC.Config.Config.Index(), accesskey: "0")</li> <li>@Html.ActionLink("Configuration", MVC.Config.Config.Index(), accesskey: "0")</li>
</ul> </ul>
<script type="text/javascript"> <script type="text/javascript">
$(function () { $(function () {
var $menu = $('#menu'); var $menu = $('#menu');
$menu.find('li').each(function () { $menu.find('li').each(function () {
var $menuItem = $(this); var $menuItem = $(this);
var $subMenu = $menuItem.children('ul').first(); var $subMenu = $menuItem.children('ul').first();
var subMenuHideToken = null; var subMenuHideToken = null;
if ($subMenu.length > 0) { if ($subMenu.length > 0) {
$menuItem.mouseover(function () { $menuItem.mouseover(function () {
if (subMenuHideToken) if (subMenuHideToken)
window.clearTimeout(subMenuHideToken); window.clearTimeout(subMenuHideToken);
if (!$subMenu.is(':visible')) if (!$subMenu.is(':visible'))
$subMenu.show(); $subMenu.show();
}).mouseout(function () { }).mouseout(function () {
subMenuHideToken = window.setTimeout(function () { subMenuHideToken = window.setTimeout(function () {
$subMenu.hide(); $subMenu.hide();
}, 250); }, 250);
}).addClass('hasSubmenu'); }).addClass('hasSubmenu');
}; };
}); });
}); });
</script> </script>
</nav> </nav>
</header> </header>
<div id="layout_PageHeading">@CommonHelpers.Breadcrumbs(ViewBag.Title)</div> <div id="layout_PageHeading">@CommonHelpers.Breadcrumbs(ViewBag.Title)</div>
<section id="layout_Page"> <section id="layout_Page">
@RenderBody() @RenderBody()
</section> </section>
<footer> <footer>
Disco v@(Disco.Web.DiscoApplication.Version) @@ @(Disco.Web.DiscoApplication.OrganisationName) | <a Disco v@(Disco.Web.DiscoApplication.Version) @@ @(Disco.Web.DiscoApplication.OrganisationName) | <a
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>
</body> @{ Disco.Services.UIExtensions.UIExtensions.ExecuteExtensionResult(this); }
</html> </body>
</html>
+500 -486
View File
@@ -1,486 +1,500 @@
#pragma warning disable 1591 #pragma warning disable 1591
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.17929 // Runtime Version:4.0.30319.17929
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace Disco.Web.Views.Shared namespace Disco.Web.Views.Shared
{ {
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Text; using System.Text;
using System.Web; using System.Web;
using System.Web.Helpers; using System.Web.Helpers;
using System.Web.Mvc; using System.Web.Mvc;
using System.Web.Mvc.Ajax; using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html; using System.Web.Mvc.Html;
using System.Web.Routing; using System.Web.Routing;
using System.Web.Security; using System.Web.Security;
using System.Web.UI; using System.Web.UI;
using System.Web.WebPages; using System.Web.WebPages;
using Disco.BI.Extensions; using Disco.BI.Extensions;
using Disco.Models.Repository; using Disco.Models.Repository;
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.0.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 class Layout : System.Web.Mvc.WebViewPage<dynamic>
{ {
public Layout() public Layout()
{ {
} }
public override void Execute() public override void Execute()
{ {
#line 1 "..\..\Views\Shared\_Layout.cshtml" #line 1 "..\..\Views\Shared\_Layout.cshtml"
Html.BundleDeferred("~/Style/Site"); Html.BundleDeferred("~/Style/Site");
Html.BundleDeferred("~/ClientScripts/Core"); Html.BundleDeferred("~/ClientScripts/Core");
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n<!doctype html>\r\n<html>\r\n<head>\r\n <title>Disco - "); WriteLiteral("\r\n<!doctype html>\r\n<html>\r\n<head>\r\n <title>Disco - ");
#line 8 "..\..\Views\Shared\_Layout.cshtml" #line 8 "..\..\Views\Shared\_Layout.cshtml"
Write(CommonHelpers.BreadcrumbsTitle(ViewBag.Title)); Write(CommonHelpers.BreadcrumbsTitle(ViewBag.Title));
#line default #line default
#line hidden #line hidden
WriteLiteral("</title>\r\n <link"); WriteLiteral("</title>\r\n <link");
WriteLiteral(" rel=\"shortcut icon\""); WriteLiteral(" rel=\"shortcut icon\"");
WriteLiteral(" href=\"/favicon.ico\""); WriteLiteral(" href=\"/favicon.ico\"");
WriteLiteral(" />\r\n <meta"); WriteLiteral(" />\r\n <meta");
WriteLiteral(" name=\"application-name\""); WriteLiteral(" name=\"application-name\"");
WriteLiteral(" content=\"Disco\""); WriteLiteral(" content=\"Disco\"");
WriteLiteral(" />\r\n <meta"); WriteLiteral(" />\r\n <meta");
WriteLiteral(" name=\"msapplication-starturl\""); WriteLiteral(" name=\"msapplication-starturl\"");
WriteLiteral(" content=\"/\""); WriteLiteral(" content=\"/\"");
WriteLiteral(" />\r\n <meta"); WriteLiteral(" />\r\n <meta");
WriteLiteral(" name=\"msapplication-tooltip\""); WriteLiteral(" name=\"msapplication-tooltip\"");
WriteLiteral(" content=\"Open Disco\""); WriteLiteral(" content=\"Open Disco\"");
WriteLiteral(" />\r\n"); WriteLiteral(" />\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 13 "..\..\Views\Shared\_Layout.cshtml" #line 13 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.BundleRenderDeferred()); Write(Html.BundleRenderDeferred());
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n"); WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 14 "..\..\Views\Shared\_Layout.cshtml" #line 14 "..\..\Views\Shared\_Layout.cshtml"
Write(RenderSection("head", false)); Write(RenderSection("head", false));
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n</head>\r\n<body"); WriteLiteral("\r\n</head>\r\n<body");
WriteLiteral(" class=\"layout\""); WriteLiteral(" class=\"layout\"");
WriteLiteral(">\r\n <div"); WriteLiteral(">\r\n <div");
WriteLiteral(" class=\"page\""); WriteLiteral(" class=\"page\"");
WriteLiteral(">\r\n <header>\r\n <div"); WriteLiteral(">\r\n <header>\r\n <div");
WriteLiteral(" class=\"clearfix\""); WriteLiteral(" class=\"clearfix\"");
WriteLiteral(">\r\n <div"); WriteLiteral(">\r\n <div");
WriteLiteral(" id=\"heading\""); WriteLiteral(" id=\"heading\"");
WriteLiteral(">\r\n <a"); WriteLiteral(">\r\n <a");
WriteAttribute("href", Tuple.Create(" href=\"", 672), Tuple.Create("\"", 707) WriteAttribute("href", Tuple.Create(" href=\"", 672), Tuple.Create("\"", 707)
#line 21 "..\..\Views\Shared\_Layout.cshtml" #line 21 "..\..\Views\Shared\_Layout.cshtml"
, Tuple.Create(Tuple.Create("", 679), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Index()) , Tuple.Create(Tuple.Create("", 679), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Index())
#line default #line default
#line hidden #line hidden
, 679), false) , 679), false)
); );
WriteLiteral(">\r\n <img"); WriteLiteral(">\r\n <img");
WriteAttribute("src", Tuple.Create(" src=\"", 739), Tuple.Create("\"", 789) WriteAttribute("src", Tuple.Create(" src=\"", 739), Tuple.Create("\"", 789)
#line 22 "..\..\Views\Shared\_Layout.cshtml" #line 22 "..\..\Views\Shared\_Layout.cshtml"
, Tuple.Create(Tuple.Create("", 745), Tuple.Create<System.Object, System.Int32>(Links.ClientSource.Style.Images.Heading_png , Tuple.Create(Tuple.Create("", 745), Tuple.Create<System.Object, System.Int32>(Links.ClientSource.Style.Images.Heading_png
#line default #line default
#line hidden #line hidden
, 745), false) , 745), false)
); );
WriteLiteral(" alt=\"DISCO - ICT Asset Management\""); WriteLiteral(" alt=\"DISCO - ICT Asset Management\"");
WriteLiteral(" /></a>\r\n </div>\r\n <div"); WriteLiteral(" /></a>\r\n </div>\r\n <div");
WriteLiteral(" id=\"headerMenu\""); WriteLiteral(" id=\"headerMenu\"");
WriteLiteral(">\r\n <span>Welcome "); WriteLiteral(">\r\n <span>Welcome ");
#line 25 "..\..\Views\Shared\_Layout.cshtml" #line 25 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink(DiscoApplication.CurrentUser.ToString(), MVC.User.Show(DiscoApplication.CurrentUser.Id))); Write(Html.ActionLink(DiscoApplication.CurrentUser.ToString(), MVC.User.Show(DiscoApplication.CurrentUser.Id)));
#line default #line default
#line hidden #line hidden
WriteLiteral("</span>\r\n"); WriteLiteral("</span>\r\n");
#line 26 "..\..\Views\Shared\_Layout.cshtml" #line 26 "..\..\Views\Shared\_Layout.cshtml"
#line default #line default
#line hidden #line hidden
#line 26 "..\..\Views\Shared\_Layout.cshtml" #line 26 "..\..\Views\Shared\_Layout.cshtml"
using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get)) using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
{ {
#line default #line default
#line hidden #line hidden
#line 29 "..\..\Views\Shared\_Layout.cshtml" #line 29 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.TextBox("term", null, new { accesskey = "s" })); Write(Html.TextBox("term", null, new { accesskey = "s" }));
#line default #line default
#line hidden #line hidden
#line 29 "..\..\Views\Shared\_Layout.cshtml" #line 29 "..\..\Views\Shared\_Layout.cshtml"
#line default #line default
#line hidden #line hidden
WriteLiteral(" <script"); WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\""); WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@"> WriteLiteral(@">
//<!-- //<!--
$(function () { $(function () {
$('#term').watermark('Search').keypress(function (e) { $('#term').watermark('Search').keypress(function (e) {
if (e.keyCode == 13) { if (e.keyCode == 13) {
$(this).closest('form').submit(); $(this).closest('form').submit();
} }
}).focus(function () { }).focus(function () {
$(this).select(); $(this).select();
}); });
}); });
//--> //-->
</script> </script>
"); ");
#line 43 "..\..\Views\Shared\_Layout.cshtml" #line 43 "..\..\Views\Shared\_Layout.cshtml"
} }
#line default #line default
#line hidden #line hidden
WriteLiteral(" </div>\r\n </div>\r\n <nav>\r\n <u" + WriteLiteral(" </div>\r\n </div>\r\n <nav>\r\n <u" +
"l"); "l");
WriteLiteral(" id=\"menu\""); WriteLiteral(" id=\"menu\"");
WriteLiteral(">\r\n <li>"); WriteLiteral(">\r\n <li>");
#line 48 "..\..\Views\Shared\_Layout.cshtml" #line 48 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Jobs", MVC.Job.Index(), accesskey: "1")); Write(Html.ActionLink("Jobs", MVC.Job.Index(), accesskey: "1"));
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n <ul>\r\n <li>"); WriteLiteral("\r\n <ul>\r\n <li>");
#line 50 "..\..\Views\Shared\_Layout.cshtml" #line 50 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Devices Ready for Return", MVC.Job.DevicesReadyForReturn())); Write(Html.ActionLink("Devices Ready for Return", MVC.Job.DevicesReadyForReturn()));
#line default #line default
#line hidden #line hidden
WriteLiteral("</li>\r\n <li>"); WriteLiteral("</li>\r\n <li>");
#line 51 "..\..\Views\Shared\_Layout.cshtml" #line 51 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Device Held Locations", MVC.Job.Locations())); Write(Html.ActionLink("Device Held Locations", MVC.Job.Locations()));
#line default #line default
#line hidden #line hidden
WriteLiteral("</li>\r\n <li>"); WriteLiteral("</li>\r\n <li>");
#line 52 "..\..\Views\Shared\_Layout.cshtml" #line 52 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Awaiting User Action", MVC.Job.AwaitingUserAction())); Write(Html.ActionLink("Awaiting User Action", MVC.Job.AwaitingUserAction()));
#line default #line default
#line hidden #line hidden
WriteLiteral("</li>\r\n <li>"); WriteLiteral("</li>\r\n <li>");
#line 53 "..\..\Views\Shared\_Layout.cshtml" #line 53 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Awaiting Finance", MVC.Job.AwaitingFinance())); Write(Html.ActionLink("Awaiting Finance", MVC.Job.AwaitingFinance()));
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n <ul>\r\n <li>"); WriteLiteral("\r\n <ul>\r\n <li>");
#line 55 "..\..\Views\Shared\_Layout.cshtml" #line 55 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Accounting Charge", MVC.Job.AwaitingFinanceCharge())); Write(Html.ActionLink("Accounting Charge", MVC.Job.AwaitingFinanceCharge()));
#line default #line default
#line hidden #line hidden
WriteLiteral("</li>\r\n <li>"); WriteLiteral("</li>\r\n <li>");
#line 56 "..\..\Views\Shared\_Layout.cshtml" #line 56 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Accounting Payment", MVC.Job.AwaitingFinancePayment())); Write(Html.ActionLink("Accounting Payment", MVC.Job.AwaitingFinancePayment()));
#line default #line default
#line hidden #line hidden
WriteLiteral("</li>\r\n <li>"); WriteLiteral("</li>\r\n <li>");
#line 57 "..\..\Views\Shared\_Layout.cshtml" #line 57 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Agreement Breach", MVC.Job.AwaitingFinanceAgreementBreach())); Write(Html.ActionLink("Agreement Breach", MVC.Job.AwaitingFinanceAgreementBreach()));
#line default #line default
#line hidden #line hidden
WriteLiteral("</li>\r\n <li>"); WriteLiteral("</li>\r\n <li>");
#line 58 "..\..\Views\Shared\_Layout.cshtml" #line 58 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Insurance Processing", MVC.Job.AwaitingFinanceInsuranceProcessing())); Write(Html.ActionLink("Insurance Processing", MVC.Job.AwaitingFinanceInsuranceProcessing()));
#line default #line default
#line hidden #line hidden
WriteLiteral("</li>\r\n </ul>\r\n </li>\r\n" + WriteLiteral("</li>\r\n </ul>\r\n </li>\r\n" +
" <li>"); " <li>");
#line 61 "..\..\Views\Shared\_Layout.cshtml" #line 61 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Awaiting Device Repair", MVC.Job.DevicesAwaitingRepair())); Write(Html.ActionLink("Awaiting Device Repair", MVC.Job.DevicesAwaitingRepair()));
#line default #line default
#line hidden #line hidden
WriteLiteral("</li>\r\n <li>"); WriteLiteral("</li>\r\n <li>");
#line 62 "..\..\Views\Shared\_Layout.cshtml" #line 62 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("All Open", MVC.Job.AllOpen())); Write(Html.ActionLink("All Open", MVC.Job.AllOpen()));
#line default #line default
#line hidden #line hidden
WriteLiteral("</li>\r\n <li>"); WriteLiteral("</li>\r\n <li>");
#line 63 "..\..\Views\Shared\_Layout.cshtml" #line 63 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Recently Closed", MVC.Job.RecentlyClosed())); Write(Html.ActionLink("Recently Closed", MVC.Job.RecentlyClosed()));
#line default #line default
#line hidden #line hidden
WriteLiteral("</li>\r\n </ul>\r\n </li>\r\n " + WriteLiteral("</li>\r\n </ul>\r\n </li>\r\n " +
" <li"); " <li");
WriteLiteral(" class=\"sep\""); WriteLiteral(" class=\"sep\"");
WriteLiteral("></li>\r\n <li>"); WriteLiteral("></li>\r\n <li>");
#line 67 "..\..\Views\Shared\_Layout.cshtml" #line 67 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Devices", MVC.Device.Index(), accesskey: "2")); Write(Html.ActionLink("Devices", MVC.Device.Index(), accesskey: "2"));
#line default #line default
#line hidden #line hidden
WriteLiteral("</li>\r\n <li"); WriteLiteral("</li>\r\n <li");
WriteLiteral(" class=\"sep\""); WriteLiteral(" class=\"sep\"");
WriteLiteral("></li>\r\n <li>"); WriteLiteral("></li>\r\n <li>");
#line 69 "..\..\Views\Shared\_Layout.cshtml" #line 69 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Users", MVC.User.Index(), accesskey: "3")); Write(Html.ActionLink("Users", MVC.User.Index(), accesskey: "3"));
#line default #line default
#line hidden #line hidden
WriteLiteral("</li>\r\n <li"); WriteLiteral("</li>\r\n <li");
WriteLiteral(" class=\"moveRight\""); WriteLiteral(" class=\"moveRight\"");
WriteLiteral(">"); WriteLiteral(">");
#line 70 "..\..\Views\Shared\_Layout.cshtml" #line 70 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Public Reports", MVC.Public.Public.Index())); Write(Html.ActionLink("Public Reports", MVC.Public.Public.Index()));
#line default #line default
#line hidden #line hidden
WriteLiteral("</li>\r\n <li"); WriteLiteral("</li>\r\n <li");
WriteLiteral(" class=\"sep\""); WriteLiteral(" class=\"sep\"");
WriteLiteral("></li>\r\n <li>"); WriteLiteral("></li>\r\n <li>");
#line 72 "..\..\Views\Shared\_Layout.cshtml" #line 72 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Configuration", MVC.Config.Config.Index(), accesskey: "0")); Write(Html.ActionLink("Configuration", MVC.Config.Config.Index(), accesskey: "0"));
#line default #line default
#line hidden #line hidden
WriteLiteral("</li>\r\n </ul>\r\n <script"); WriteLiteral("</li>\r\n </ul>\r\n <script");
WriteLiteral(" type=\"text/javascript\""); WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@"> WriteLiteral(@">
$(function () { $(function () {
var $menu = $('#menu'); var $menu = $('#menu');
$menu.find('li').each(function () { $menu.find('li').each(function () {
var $menuItem = $(this); var $menuItem = $(this);
var $subMenu = $menuItem.children('ul').first(); var $subMenu = $menuItem.children('ul').first();
var subMenuHideToken = null; var subMenuHideToken = null;
if ($subMenu.length > 0) { if ($subMenu.length > 0) {
$menuItem.mouseover(function () { $menuItem.mouseover(function () {
if (subMenuHideToken) if (subMenuHideToken)
window.clearTimeout(subMenuHideToken); window.clearTimeout(subMenuHideToken);
if (!$subMenu.is(':visible')) if (!$subMenu.is(':visible'))
$subMenu.show(); $subMenu.show();
}).mouseout(function () { }).mouseout(function () {
subMenuHideToken = window.setTimeout(function () { subMenuHideToken = window.setTimeout(function () {
$subMenu.hide(); $subMenu.hide();
}, 250); }, 250);
}).addClass('hasSubmenu'); }).addClass('hasSubmenu');
}; };
}); });
}); });
</script> </script>
</nav> </nav>
</header> </header>
<div"); <div");
WriteLiteral(" id=\"layout_PageHeading\""); WriteLiteral(" id=\"layout_PageHeading\"");
WriteLiteral(">"); WriteLiteral(">");
#line 98 "..\..\Views\Shared\_Layout.cshtml" #line 98 "..\..\Views\Shared\_Layout.cshtml"
Write(CommonHelpers.Breadcrumbs(ViewBag.Title)); Write(CommonHelpers.Breadcrumbs(ViewBag.Title));
#line default #line default
#line hidden #line hidden
WriteLiteral("</div>\r\n <section"); WriteLiteral("</div>\r\n <section");
WriteLiteral(" id=\"layout_Page\""); WriteLiteral(" id=\"layout_Page\"");
WriteLiteral(">\r\n"); WriteLiteral(">\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 100 "..\..\Views\Shared\_Layout.cshtml" #line 100 "..\..\Views\Shared\_Layout.cshtml"
Write(RenderBody()); Write(RenderBody());
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n </section>\r\n <footer>\r\n Disco v"); WriteLiteral("\r\n </section>\r\n <footer>\r\n Disco v");
#line 103 "..\..\Views\Shared\_Layout.cshtml" #line 103 "..\..\Views\Shared\_Layout.cshtml"
Write(Disco.Web.DiscoApplication.Version); Write(Disco.Web.DiscoApplication.Version);
#line default #line default
#line hidden #line hidden
WriteLiteral(" "); WriteLiteral(" ");
WriteLiteral("@ "); WriteLiteral("@ ");
#line 103 "..\..\Views\Shared\_Layout.cshtml" #line 103 "..\..\Views\Shared\_Layout.cshtml"
Write(Disco.Web.DiscoApplication.OrganisationName); Write(Disco.Web.DiscoApplication.OrganisationName);
#line default #line default
#line hidden #line hidden
WriteLiteral(" | <a\r\n href=\"http://discoict.com.au/\" target=\"_blank\">discoict.co" + WriteLiteral(" | <a\r\n href=\"http://discoict.com.au/\" target=\"_blank\">discoict.co" +
"m.au</a> | "); "m.au</a> | ");
#line 104 "..\..\Views\Shared\_Layout.cshtml" #line 104 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Credits", MVC.Public.Public.Credits())); Write(Html.ActionLink("Credits", MVC.Public.Public.Credits()));
#line default #line default
#line hidden #line hidden
WriteLiteral(" | "); WriteLiteral(" | ");
#line 104 "..\..\Views\Shared\_Layout.cshtml" #line 104 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Licence", MVC.Public.Public.Licence())); Write(Html.ActionLink("Licence", MVC.Public.Public.Licence()));
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n </footer>\r\n </div>\r\n</body>\r\n</html>\r\n"); WriteLiteral("\r\n </footer>\r\n </div>\r\n");
}
} #line 107 "..\..\Views\Shared\_Layout.cshtml"
}
#pragma warning restore 1591
#line default
#line hidden
#line 107 "..\..\Views\Shared\_Layout.cshtml"
Disco.Services.UIExtensions.UIExtensions.ExecuteExtensionResult(this);
#line default
#line hidden
WriteLiteral("\r\n</body>\r\n</html>\r\n");
}
}
}
#pragma warning restore 1591