mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-24 13:33:34 +08:00
Starting work on Setup, a new core package
--HG-- branch : dev
This commit is contained in:
@@ -111,6 +111,9 @@
|
||||
<Compile Include="Scheduling\Models\Task.cs" />
|
||||
<Compile Include="Settings\Controllers\SiteSettingsDriver.cs" />
|
||||
<Compile Include="Settings\Permissions.cs" />
|
||||
<Compile Include="Setup\Controllers\SetupController.cs" />
|
||||
<Compile Include="Setup\Services\ISetupService.cs" />
|
||||
<Compile Include="Setup\Services\SetupService.cs" />
|
||||
<Compile Include="Themes\Preview\IPreviewTheme.cs" />
|
||||
<Compile Include="Themes\Preview\PreviewThemeFilter.cs" />
|
||||
<Compile Include="Themes\Services\AdminThemeSelector.cs" />
|
||||
@@ -182,6 +185,7 @@
|
||||
<Content Include="Feeds\Package.txt" />
|
||||
<Content Include="Scheduling\Package.txt" />
|
||||
<Content Include="Settings\Views\EditorTemplates\Items\Settings.Site.ascx" />
|
||||
<Content Include="Setup\Package.txt" />
|
||||
<Content Include="Themes\Scripts\jquery-1.4.1.js" />
|
||||
<Content Include="Themes\Scripts\jquery-1.4.1.min.js" />
|
||||
<Content Include="Themes\Styles\images\icons.png" />
|
||||
@@ -200,6 +204,9 @@
|
||||
<Content Include="Themes\Views\Menu.ascx" />
|
||||
<Content Include="Themes\Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Setup\Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Scheduling\Controllers\" />
|
||||
</ItemGroup>
|
||||
|
@@ -3,8 +3,6 @@ using Orchard.Core.Settings.Models;
|
||||
using Orchard.Core.Settings.ViewModels;
|
||||
using Orchard.Localization;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Security;
|
||||
using Orchard.Security.Permissions;
|
||||
using Orchard.Settings;
|
||||
using Orchard.UI.Notify;
|
||||
|
||||
|
25
src/Orchard.Web/Core/Setup/Controllers/SetupController.cs
Normal file
25
src/Orchard.Web/Core/Setup/Controllers/SetupController.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Web.Mvc;
|
||||
using Orchard.Core.Setup.Services;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Logging;
|
||||
|
||||
namespace Orchard.Core.Setup.Controllers {
|
||||
public class SetupController : Controller {
|
||||
private readonly ISetupService _setupService;
|
||||
|
||||
public SetupController(IOrchardServices services, ISetupService setupService) {
|
||||
_setupService = setupService;
|
||||
Services = services;
|
||||
Logger = NullLogger.Instance;
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
|
||||
public IOrchardServices Services { get; set; }
|
||||
public ILogger Logger { get; set; }
|
||||
private Localizer T { get; set; }
|
||||
|
||||
public ActionResult Index() {
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
1
src/Orchard.Web/Core/Setup/Package.txt
Normal file
1
src/Orchard.Web/Core/Setup/Package.txt
Normal file
@@ -0,0 +1 @@
|
||||
name: Setup
|
4
src/Orchard.Web/Core/Setup/Services/ISetupService.cs
Normal file
4
src/Orchard.Web/Core/Setup/Services/ISetupService.cs
Normal file
@@ -0,0 +1,4 @@
|
||||
namespace Orchard.Core.Setup.Services {
|
||||
public interface ISetupService : IDependency {
|
||||
}
|
||||
}
|
16
src/Orchard.Web/Core/Setup/Services/SetupService.cs
Normal file
16
src/Orchard.Web/Core/Setup/Services/SetupService.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Orchard.Localization;
|
||||
using Orchard.Logging;
|
||||
|
||||
namespace Orchard.Core.Setup.Services {
|
||||
public class SetupService : ISetupService {
|
||||
public SetupService(IOrchardServices services) {
|
||||
Services = services;
|
||||
Logger = NullLogger.Instance;
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
|
||||
public IOrchardServices Services { get; set; }
|
||||
public ILogger Logger { get; set; }
|
||||
private Localizer T { get; set; }
|
||||
}
|
||||
}
|
34
src/Orchard.Web/Core/Setup/Views/Web.config
Normal file
34
src/Orchard.Web/Core/Setup/Views/Web.config
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<add path="*" verb="*"
|
||||
type="System.Web.HttpNotFoundHandler"/>
|
||||
</httpHandlers>
|
||||
|
||||
<!--
|
||||
Enabling request validation in view pages would cause validation to occur
|
||||
after the input has already been processed by the controller. By default
|
||||
MVC performs request validation before a controller processes the input.
|
||||
To change this behavior apply the ValidateInputAttribute to a
|
||||
controller or action.
|
||||
-->
|
||||
<pages
|
||||
validateRequest="false"
|
||||
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<controls>
|
||||
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
|
||||
</controls>
|
||||
</pages>
|
||||
</system.web>
|
||||
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false"/>
|
||||
<handlers>
|
||||
<remove name="BlockViewHandler"/>
|
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/>
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.Localization;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Mvc.Results;
|
||||
using Orchard.Pages.Services;
|
||||
using Orchard.Pages.ViewModels;
|
||||
|
Reference in New Issue
Block a user