Update: Plugin UI Extensions

Add additional Results; Implemented UI Extensions on Device, Job and
User Controllers
This commit is contained in:
Gary Sharp
2013-02-28 17:13:15 +11:00
parent 15e2c2a501
commit 989f08a24d
43 changed files with 1108 additions and 705 deletions
+10 -2
View File
@@ -96,11 +96,15 @@ namespace Disco.Services.Plugins
return ViewPage.DiscoPluginResourceUrl(Resource, false, manifest);
}
public static HtmlString DiscoPluginResourceUrl<T>(this WebViewPage<T> ViewPage, string Resource, bool Download, PluginManifest manifest)
{
return ViewPage.ViewContext.RequestContext.DiscoPluginResourceUrl(Resource, Download, manifest);
}
public static HtmlString DiscoPluginResourceUrl(this RequestContext RequestContext, string Resource, bool Download, PluginManifest manifest)
{
var resourcePath = manifest.WebResourcePath(Resource);
var routeValues = new RouteValueDictionary(new { PluginId = manifest.Id, res = Resource });
string pluginActionUrl = UrlHelper.GenerateUrl("Plugin_Resources", null, null, routeValues, RouteTable.Routes, ViewPage.ViewContext.RequestContext, false);
string pluginActionUrl = UrlHelper.GenerateUrl("Plugin_Resources", null, null, routeValues, RouteTable.Routes, RequestContext, false);
pluginActionUrl += string.Format("?v={0}", resourcePath.Item2);
@@ -122,9 +126,13 @@ namespace Disco.Services.Plugins
return ViewPage.DiscoPluginActionUrl(PluginAction, manifest);
}
public static HtmlString DiscoPluginActionUrl<T>(this WebViewPage<T> ViewPage, string PluginAction, PluginManifest manifest)
{
return ViewPage.ViewContext.RequestContext.DiscoPluginActionUrl(PluginAction, manifest);
}
public static HtmlString DiscoPluginActionUrl(this RequestContext RequestContext, string PluginAction, PluginManifest manifest)
{
var routeValues = new RouteValueDictionary(new { PluginId = manifest.Id, PluginAction = PluginAction });
string pluginActionUrl = UrlHelper.GenerateUrl("Plugin", null, null, routeValues, RouteTable.Routes, ViewPage.ViewContext.RequestContext, false);
string pluginActionUrl = UrlHelper.GenerateUrl("Plugin", null, null, routeValues, RouteTable.Routes, RequestContext, false);
return new HtmlString(pluginActionUrl);
}
public static HtmlString DiscoPluginConfigureUrl<T>(this WebViewPage<T> ViewPage)