mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-23 04:43:35 +08:00
Correcting another class location preparing for admin story
AdminThemeSelector moving to Orchard.UI.Admin --HG-- branch : dev
This commit is contained in:
@@ -131,7 +131,6 @@
|
||||
<Compile Include="Settings\Permissions.cs" />
|
||||
<Compile Include="Themes\Preview\IPreviewTheme.cs" />
|
||||
<Compile Include="Themes\Preview\PreviewThemeFilter.cs" />
|
||||
<Compile Include="Themes\Services\AdminThemeSelector.cs" />
|
||||
<Compile Include="Themes\Preview\PreviewTheme.cs" />
|
||||
<Compile Include="Themes\Services\SafeModeThemeSelector.cs" />
|
||||
<Compile Include="Settings\AdminMenu.cs" />
|
||||
|
@@ -1,24 +0,0 @@
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Web.Routing;
|
||||
using Orchard.Settings;
|
||||
using Orchard.Themes;
|
||||
|
||||
namespace Orchard.Core.Themes.Services {
|
||||
public class AdminThemeSelector : IThemeSelector {
|
||||
private readonly ISiteService _siteService;
|
||||
|
||||
public AdminThemeSelector(ISiteService siteService) {
|
||||
_siteService = siteService;
|
||||
}
|
||||
|
||||
public ThemeSelectorResult GetTheme(RequestContext context) {
|
||||
var siteUrl = _siteService.GetSiteSettings().SiteUrl;
|
||||
//todo: (heskew) get at the admin path in a less hacky way
|
||||
if (!context.HttpContext.Request.Path.StartsWith(Path.Combine(siteUrl, "admin").Replace("\\", "/"), true, CultureInfo.InvariantCulture))
|
||||
return null;
|
||||
|
||||
return new ThemeSelectorResult { Priority = 100, ThemeName = "TheAdmin" };
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user