Starting work on Setup, a new core package

--HG--
branch : dev
This commit is contained in:
Suha Can
2010-02-04 12:24:18 -08:00
parent 7dadc87129
commit 1b014f577e
8 changed files with 88 additions and 5 deletions

View File

@@ -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>

View File

@@ -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;

View 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();
}
}
}

View File

@@ -0,0 +1 @@
name: Setup

View File

@@ -0,0 +1,4 @@
namespace Orchard.Core.Setup.Services {
public interface ISetupService : IDependency {
}
}

View 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; }
}
}

View 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>

View File

@@ -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;