mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Simplifying the advisory message
--HG-- branch : dev
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
using System.Web.Mvc;
|
||||
using Orchard.Themes;
|
||||
|
||||
namespace Orchard.Core.Dashboard.Controllers {
|
||||
[Themed(false)]
|
||||
public class HelperController : Controller {
|
||||
|
||||
public ActionResult Index() {
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
@@ -26,21 +26,6 @@ namespace Orchard.Core.Dashboard {
|
||||
{"area", "Dashboard"}
|
||||
},
|
||||
new MvcRouteHandler())
|
||||
},
|
||||
new RouteDescriptor {
|
||||
Priority = -5,
|
||||
Route = new Route(
|
||||
"Admin/DashboardProxy",
|
||||
new RouteValueDictionary {
|
||||
{"area", "Dashboard"},
|
||||
{"controller", "Helper"},
|
||||
{"action", "Index"}
|
||||
},
|
||||
new RouteValueDictionary(),
|
||||
new RouteValueDictionary {
|
||||
{"area", "Dashboard"}
|
||||
},
|
||||
new MvcRouteHandler())
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -1,23 +1,10 @@
|
||||
@model dynamic
|
||||
@using Orchard.Utility.Extensions;
|
||||
|
||||
<script type="text/javascript">
|
||||
// Resize iframe to full height
|
||||
function resizeIframe(height) {
|
||||
// resize if there is content
|
||||
if (10 < parseInt(height)) {
|
||||
var advisory = document.getElementById('advisory') || frames['advisory'];
|
||||
advisory.height = 60 + parseInt(height) ; // add a small gap to handle browsers differences
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<iframe id="advisory" src="http://www.orchardproject.net/advisory?url=@Server.UrlEncode(Url.AbsoluteAction("Index", "Helper", new { area = "Dashboard" }))" frameborder="0" height="0" width="100%" >
|
||||
<p>Your browser does not support iframes.</p>
|
||||
</iframe>
|
||||
|
||||
<h1>@Html.TitleForPage(T("Welcome to Orchard").ToString())</h1>
|
||||
<p>@T("This is the place where you can manage your web site, its appearance and its contents. Please take a moment to explore the different menu items on the left of the screen to familiarize yourself with the features of the application. For example, try to change the theme through the “Manage Themes” menu entry. You can also create new pages and manage existing ones through the “Manage Pages” menu entry or create blogs through “Manage Blogs”.")</p>
|
||||
<p>@T("Have fun!")<br />@T("The Orchard Team")</p>
|
||||
|
||||
<iframe id="advisory" src="http://www.orchardproject.net/advisory" frameborder="0" height="64" width="100%" >
|
||||
<p>@T("Your browser does not support iframes. You can't see advisory messages.")</p>
|
||||
</iframe>
|
||||
|
||||
|
@@ -1,16 +0,0 @@
|
||||
<html>
|
||||
<!-- This page is on the same domain as the parent, so can
|
||||
communicate with it to order the iframe window resizing
|
||||
to fit the content -->
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
// Tell the parent iframe what height the iframe needs to be
|
||||
function resizeFrame() {
|
||||
var height = window.location.hash.substr(1);
|
||||
parent.parent.resizeIframe(height);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="resizeFrame()">
|
||||
</body>
|
||||
</html>
|
@@ -91,7 +91,6 @@
|
||||
<Compile Include="Contents\Settings\ContentPartSettings.cs" />
|
||||
<Compile Include="Contents\Shapes.cs" />
|
||||
<Compile Include="Contents\ViewModels\PublishContentViewModel.cs" />
|
||||
<Compile Include="Dashboard\Controllers\HelperController.cs" />
|
||||
<Compile Include="Localization\ResourceManifest.cs" />
|
||||
<Compile Include="Localization\ViewModels\EditLocalizationViewModel.cs" />
|
||||
<Compile Include="Messaging\Migrations.cs" />
|
||||
@@ -375,7 +374,6 @@
|
||||
<Content Include="Shapes\Views\Menu.cshtml" />
|
||||
<Content Include="Shapes\Views\MenuItem.cshtml" />
|
||||
<Content Include="Shapes\Views\Web.config" />
|
||||
<Content Include="Dashboard\Views\Helper\Index.cshtml" />
|
||||
<None Include="Common\Placement.info" />
|
||||
<Content Include="Common\Views\Parts\Common.Metadata.Summary.cshtml" />
|
||||
<None Include="Contents\Placement.info" />
|
||||
|
@@ -8,6 +8,22 @@ namespace Orchard.Mvc.Extensions {
|
||||
return urlHelper.MakeAbsolute(urlAction());
|
||||
}
|
||||
|
||||
public static string AbsoluteAction(this UrlHelper urlHelper, string actionName) {
|
||||
return urlHelper.MakeAbsolute(urlHelper.Action(actionName));
|
||||
}
|
||||
|
||||
public static string AbsoluteAction(this UrlHelper urlHelper, string actionName, object routeValues) {
|
||||
return urlHelper.MakeAbsolute(urlHelper.Action(actionName, routeValues));
|
||||
}
|
||||
|
||||
public static string AbsoluteAction(this UrlHelper urlHelper, string actionName, string controller) {
|
||||
return urlHelper.MakeAbsolute(urlHelper.Action(actionName, controller));
|
||||
}
|
||||
|
||||
public static string AbsoluteAction(this UrlHelper urlHelper, string actionName, string controller, object routeValues) {
|
||||
return urlHelper.MakeAbsolute(urlHelper.Action(actionName, controller, routeValues));
|
||||
}
|
||||
|
||||
private static string MakeAbsolute(this UrlHelper urlHelper, string url) {
|
||||
var siteUrl = urlHelper.RequestContext.HttpContext.Request.ToRootUrlString();
|
||||
return siteUrl + url;
|
||||
|
Reference in New Issue
Block a user