mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Ignoring layout phase if not explicitly required
--HG-- branch : dev
This commit is contained in:
@@ -8,10 +8,12 @@ using Orchard.FileSystems.AppData;
|
|||||||
using Orchard.Setup.Services;
|
using Orchard.Setup.Services;
|
||||||
using Orchard.Setup.ViewModels;
|
using Orchard.Setup.ViewModels;
|
||||||
using Orchard.Localization;
|
using Orchard.Localization;
|
||||||
|
using Orchard.Themes;
|
||||||
using Orchard.UI.Notify;
|
using Orchard.UI.Notify;
|
||||||
|
|
||||||
namespace Orchard.Setup.Controllers {
|
namespace Orchard.Setup.Controllers {
|
||||||
[ValidateInput(false)]
|
[ValidateInput(false)]
|
||||||
|
[Themed]
|
||||||
public class SetupController : Controller {
|
public class SetupController : Controller {
|
||||||
private readonly IAppDataFolder _appDataFolder;
|
private readonly IAppDataFolder _appDataFolder;
|
||||||
private readonly INotifier _notifier;
|
private readonly INotifier _notifier;
|
||||||
|
@@ -7,6 +7,7 @@ using System.Web.Security;
|
|||||||
using Orchard.Logging;
|
using Orchard.Logging;
|
||||||
using Orchard.Mvc.Extensions;
|
using Orchard.Mvc.Extensions;
|
||||||
using Orchard.Security;
|
using Orchard.Security;
|
||||||
|
using Orchard.Themes;
|
||||||
using Orchard.Users.Services;
|
using Orchard.Users.Services;
|
||||||
using Orchard.Users.ViewModels;
|
using Orchard.Users.ViewModels;
|
||||||
using Orchard.Settings;
|
using Orchard.Settings;
|
||||||
@@ -17,6 +18,7 @@ using Orchard.Mvc.Results;
|
|||||||
|
|
||||||
namespace Orchard.Users.Controllers {
|
namespace Orchard.Users.Controllers {
|
||||||
[HandleError]
|
[HandleError]
|
||||||
|
[Themed]
|
||||||
public class AccountController : Controller {
|
public class AccountController : Controller {
|
||||||
private readonly IAuthenticationService _authenticationService;
|
private readonly IAuthenticationService _authenticationService;
|
||||||
private readonly IMembershipService _membershipService;
|
private readonly IMembershipService _membershipService;
|
||||||
|
@@ -4,6 +4,8 @@ using System.Web;
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using Orchard.DisplayManagement;
|
using Orchard.DisplayManagement;
|
||||||
using Orchard.Mvc.Spooling;
|
using Orchard.Mvc.Spooling;
|
||||||
|
using Orchard.Themes;
|
||||||
|
using Orchard.UI.Admin;
|
||||||
|
|
||||||
namespace Orchard.Mvc.ViewEngines.ThemeAwareness {
|
namespace Orchard.Mvc.ViewEngines.ThemeAwareness {
|
||||||
public interface ILayoutAwareViewEngine : IDependency, IViewEngine {
|
public interface ILayoutAwareViewEngine : IDependency, IViewEngine {
|
||||||
@@ -34,6 +36,11 @@ namespace Orchard.Mvc.ViewEngines.ThemeAwareness {
|
|||||||
return viewResult;
|
return viewResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't layout the result if it's not an Admin controller and it's disabled
|
||||||
|
if ( !AdminFilter.IsApplied(controllerContext.RequestContext) && !ThemeFilter.IsApplied(controllerContext.RequestContext) ) {
|
||||||
|
return viewResult;
|
||||||
|
}
|
||||||
|
|
||||||
var layoutView = new LayoutView((viewContext, writer, viewDataContainer) => {
|
var layoutView = new LayoutView((viewContext, writer, viewDataContainer) => {
|
||||||
var childContentWriter = new HtmlStringWriter();
|
var childContentWriter = new HtmlStringWriter();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user