mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-18 04:42:10 +08:00
Moving location settings to new "ContentsLocation" module
--HG-- branch : dev rename : src/Orchard.Web/Core/Common/Models/LocationDefinition.cs => src/Orchard.Web/Core/ContentsLocation/Models/LocationDefinition.cs rename : src/Orchard.Web/Core/Common/Models/LocationSettings.cs => src/Orchard.Web/Core/ContentsLocation/Models/LocationSettings.cs rename : src/Orchard.Web/Core/Common/ViewModels/LocationSettingsViewModel.cs => src/Orchard.Web/Core/ContentsLocation/ViewModels/LocationSettingsViewModel.cs rename : src/Orchard.Web/Core/Common/Views/DefinitionTemplates/LocationSettings.ascx => src/Orchard.Web/Core/ContentsLocation/Views/DefinitionTemplates/LocationSettings.ascx
This commit is contained in:
parent
5723255248
commit
21b2bc317f
@ -1,3 +1,3 @@
|
|||||||
setup /SiteName:Profiling /AdminUsername:admin /AdminPassword:profiling-secret /DatabaseProvider:SqlCe /EnabledFeatures:Profiling,Orchard.Framework,Routable,Common,Dashboard,Feeds,PublishLater,HomePage,Contents,Navigation,Reports,Scheduling,Indexing,Settings,Localization,XmlRpc,Orchard.Users,Orchard.Roles,TinyMce,Orchard.Themes,Orchard.MultiTenancy,Orchard.Blogs,Orchard.Comments,Orchard.Modules,Futures.Widgets,Orchard.Media,Orchard.Tags,Orchard.DevTools
|
setup /SiteName:Profiling /AdminUsername:admin /AdminPassword:profiling-secret /DatabaseProvider:SqlCe /EnabledFeatures:Profiling,Orchard.Framework,Routable,Common,Dashboard,Feeds,PublishLater,HomePage,Contents,ContentsLocation,Navigation,Reports,Scheduling,Indexing,Settings,Localization,XmlRpc,Orchard.Users,Orchard.Roles,TinyMce,Orchard.Themes,Orchard.MultiTenancy,Orchard.Blogs,Orchard.Comments,Orchard.Modules,Futures.Widgets,Orchard.Media,Orchard.Tags,Orchard.DevTools
|
||||||
add profiling data
|
add profiling data
|
||||||
feature disable Orchard.DevTools
|
feature disable Orchard.DevTools
|
||||||
|
@ -17,7 +17,7 @@ namespace Orchard.Specs.Bindings {
|
|||||||
|
|
||||||
webApp.GivenIHaveACleanSiteWith(TableData(
|
webApp.GivenIHaveACleanSiteWith(TableData(
|
||||||
new { extension = "module", names = "Orchard.Setup, Orchard.Modules, Orchard.Themes, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.Tags, TinyMce" },
|
new { extension = "module", names = "Orchard.Setup, Orchard.Modules, Orchard.Themes, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.Tags, TinyMce" },
|
||||||
new { extension = "core", names = "Common, Dashboard, Feeds, HomePage, Navigation, Contents, PublishLater, Routable, Scheduling, Settings, XmlRpc" },
|
new { extension = "core", names = "Common, Dashboard, Feeds, HomePage, Navigation, Contents, ContentsLocation, PublishLater, Routable, Scheduling, Settings, XmlRpc" },
|
||||||
new { extension = "theme", names = "SafeMode, Classic" }));
|
new { extension = "theme", names = "SafeMode, Classic" }));
|
||||||
|
|
||||||
webApp.WhenIGoTo("Setup");
|
webApp.WhenIGoTo("Setup");
|
||||||
|
@ -34,7 +34,7 @@ Scenario: Calling setup on a brand new install
|
|||||||
Given I have a clean site with
|
Given I have a clean site with
|
||||||
| extension | names |
|
| extension | names |
|
||||||
| module | Orchard.Setup, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.Themes, TinyMce |
|
| module | Orchard.Setup, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.Themes, TinyMce |
|
||||||
| core | Common, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, PublishLater, Scheduling, Settings, XmlRpc |
|
| core | Common, Contents, ContentsLocation, Dashboard, Feeds, HomePage, Navigation, Routable, PublishLater, Scheduling, Settings, XmlRpc |
|
||||||
| theme | SafeMode, Classic |
|
| theme | SafeMode, Classic |
|
||||||
And I am on "/Setup"
|
And I am on "/Setup"
|
||||||
When I fill in
|
When I fill in
|
||||||
|
4
src/Orchard.Specs/Setup.feature.cs
generated
4
src/Orchard.Specs/Setup.feature.cs
generated
@ -145,8 +145,8 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
"nyMce"});
|
"nyMce"});
|
||||||
table1.AddRow(new string[] {
|
table1.AddRow(new string[] {
|
||||||
"core",
|
"core",
|
||||||
"Common, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, PublishLater," +
|
"Common, Contents, ContentsLocation, Dashboard, Feeds, HomePage, Navigation, Routa" +
|
||||||
" Scheduling, Settings, XmlRpc"});
|
"ble, PublishLater, Scheduling, Settings, XmlRpc"});
|
||||||
table1.AddRow(new string[] {
|
table1.AddRow(new string[] {
|
||||||
"theme",
|
"theme",
|
||||||
"SafeMode, Classic"});
|
"SafeMode, Classic"});
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
using Orchard.ContentManagement;
|
using Orchard.ContentManagement;
|
||||||
using Orchard.ContentManagement.Drivers;
|
using Orchard.ContentManagement.Drivers;
|
||||||
using Orchard.Core.Common.Fields;
|
using Orchard.Core.Common.Fields;
|
||||||
using Orchard.Core.Common.Models;
|
using Orchard.Core.ContentsLocation.Models;
|
||||||
using Orchard.Core.Common.Settings;
|
|
||||||
|
|
||||||
namespace Orchard.Core.Common.Drivers {
|
namespace Orchard.Core.Common.Drivers {
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
|
@ -8,4 +8,5 @@ description: The common module introduces content parts that are going to be use
|
|||||||
features:
|
features:
|
||||||
Common:
|
Common:
|
||||||
Description: Core content parts.
|
Description: Core content parts.
|
||||||
|
Dependencies: ContentsLocation
|
||||||
Category: Core
|
Category: Core
|
||||||
|
@ -5,6 +5,8 @@ using Orchard.ContentManagement.MetaData.Builders;
|
|||||||
using Orchard.ContentManagement.MetaData.Models;
|
using Orchard.ContentManagement.MetaData.Models;
|
||||||
using Orchard.ContentManagement.ViewModels;
|
using Orchard.ContentManagement.ViewModels;
|
||||||
using Orchard.Core.Common.Models;
|
using Orchard.Core.Common.Models;
|
||||||
|
using Orchard.Core.ContentsLocation.Models;
|
||||||
|
using Orchard.Core.ContentsLocation.ViewModels;
|
||||||
using Orchard.Localization;
|
using Orchard.Localization;
|
||||||
|
|
||||||
namespace Orchard.Core.Common.Settings {
|
namespace Orchard.Core.Common.Settings {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Orchard.Localization;
|
using Orchard.Localization;
|
||||||
|
|
||||||
namespace Orchard.Core.Common.Models {
|
namespace Orchard.Core.ContentsLocation.Models {
|
||||||
public class LocationDefinition {
|
public class LocationDefinition {
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public LocalizedString DisplayName { get; set; }
|
public LocalizedString DisplayName { get; set; }
|
@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Orchard.ContentManagement.Drivers;
|
using Orchard.ContentManagement.Drivers;
|
||||||
|
|
||||||
namespace Orchard.Core.Common.Models {
|
namespace Orchard.Core.ContentsLocation.Models {
|
||||||
public class LocationSettings : Dictionary<string, ContentLocation> {
|
public class LocationSettings : Dictionary<string, ContentLocation> {
|
||||||
public LocationSettings() { }
|
public LocationSettings() { }
|
||||||
public LocationSettings(LocationSettings value)
|
public LocationSettings(LocationSettings value)
|
12
src/Orchard.Web/Core/ContentsLocation/Module.txt
Normal file
12
src/Orchard.Web/Core/ContentsLocation/Module.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Name: ContentsLocation
|
||||||
|
antiforgery: enabled
|
||||||
|
author: The Orchard Team
|
||||||
|
website: http://orchardproject.net
|
||||||
|
version: 0.5.0
|
||||||
|
orchardversion: 0.5.0
|
||||||
|
description: The "Contents Location" module introduces settings for part and field to fine tune the location of contents.
|
||||||
|
features:
|
||||||
|
ContentsLocation:
|
||||||
|
Description: Contents location settings management
|
||||||
|
Dependencies: Settings
|
||||||
|
Category: Core
|
@ -1,7 +1,7 @@
|
|||||||
using Orchard.ContentManagement.Drivers;
|
using Orchard.ContentManagement.Drivers;
|
||||||
using Orchard.Core.Common.Models;
|
using Orchard.Core.ContentsLocation.Models;
|
||||||
|
|
||||||
namespace Orchard.Core.Common.Settings {
|
namespace Orchard.Core.ContentsLocation.ViewModels {
|
||||||
public class LocationSettingsViewModel {
|
public class LocationSettingsViewModel {
|
||||||
public LocationDefinition Definition { get; set; }
|
public LocationDefinition Definition { get; set; }
|
||||||
public ContentLocation Location { get; set; }
|
public ContentLocation Location { get; set; }
|
@ -1,4 +1,4 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.Settings.LocationSettingsViewModel>" %>
|
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.ContentsLocation.ViewModels.LocationSettingsViewModel>" %>
|
||||||
<fieldset >
|
<fieldset >
|
||||||
<legend><%:T("{0}", Model.Definition.DisplayName) %></legend>
|
<legend><%:T("{0}", Model.Definition.DisplayName) %></legend>
|
||||||
|
|
34
src/Orchard.Web/Core/ContentsLocation/Views/Web.config
Normal file
34
src/Orchard.Web/Core/ContentsLocation/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>
|
@ -67,13 +67,13 @@
|
|||||||
<Compile Include="Common\Drivers\TextFieldDriver.cs" />
|
<Compile Include="Common\Drivers\TextFieldDriver.cs" />
|
||||||
<Compile Include="Common\Extensions\HtmlHelperExtensions.cs" />
|
<Compile Include="Common\Extensions\HtmlHelperExtensions.cs" />
|
||||||
<Compile Include="Common\Fields\TextField.cs" />
|
<Compile Include="Common\Fields\TextField.cs" />
|
||||||
<Compile Include="Common\Models\LocationDefinition.cs" />
|
<Compile Include="ContentsLocation\Models\LocationDefinition.cs" />
|
||||||
<Compile Include="Common\Services\ICommonService.cs" />
|
<Compile Include="Common\Services\ICommonService.cs" />
|
||||||
<Compile Include="Common\Services\CommonService.cs" />
|
<Compile Include="Common\Services\CommonService.cs" />
|
||||||
<Compile Include="Common\Settings\BodySettings.cs" />
|
<Compile Include="Common\Settings\BodySettings.cs" />
|
||||||
<Compile Include="Common\Models\LocationSettings.cs" />
|
<Compile Include="ContentsLocation\Models\LocationSettings.cs" />
|
||||||
<Compile Include="Common\Settings\LocationSettingsEditorEvents.cs" />
|
<Compile Include="Common\Settings\LocationSettingsEditorEvents.cs" />
|
||||||
<Compile Include="Common\ViewModels\LocationSettingsViewModel.cs" />
|
<Compile Include="ContentsLocation\ViewModels\LocationSettingsViewModel.cs" />
|
||||||
<Compile Include="Common\ViewModels\CommonMetadataViewModel.cs" />
|
<Compile Include="Common\ViewModels\CommonMetadataViewModel.cs" />
|
||||||
<Compile Include="Common\ViewModels\ContainerEditorViewModel.cs" />
|
<Compile Include="Common\ViewModels\ContainerEditorViewModel.cs" />
|
||||||
<Compile Include="Common\ViewModels\TextContentFieldDisplayViewModel.cs" />
|
<Compile Include="Common\ViewModels\TextContentFieldDisplayViewModel.cs" />
|
||||||
@ -228,7 +228,6 @@
|
|||||||
<Content Include="Common\Module.txt" />
|
<Content Include="Common\Module.txt" />
|
||||||
<Content Include="Common\Views\DefinitionTemplates\BodyTypePartSettings.ascx" />
|
<Content Include="Common\Views\DefinitionTemplates\BodyTypePartSettings.ascx" />
|
||||||
<Content Include="Common\Views\DefinitionTemplates\BodyPartSettings.ascx" />
|
<Content Include="Common\Views\DefinitionTemplates\BodyPartSettings.ascx" />
|
||||||
<Content Include="Common\Views\DefinitionTemplates\LocationSettings.ascx" />
|
|
||||||
<Content Include="Common\Views\DisplayTemplates\Fields\Common.TextField.ascx" />
|
<Content Include="Common\Views\DisplayTemplates\Fields\Common.TextField.ascx" />
|
||||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.SummaryAdmin.ascx" />
|
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.SummaryAdmin.ascx" />
|
||||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.Manage.SummaryAdmin.ascx" />
|
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.Manage.SummaryAdmin.ascx" />
|
||||||
@ -236,6 +235,8 @@
|
|||||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPre.SummaryAdmin.ascx" />
|
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPre.SummaryAdmin.ascx" />
|
||||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Metadata.ascx" />
|
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Metadata.ascx" />
|
||||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Metadata.SummaryAdmin.ascx" />
|
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Metadata.SummaryAdmin.ascx" />
|
||||||
|
<Content Include="ContentsLocation\Module.txt" />
|
||||||
|
<Content Include="ContentsLocation\Views\DefinitionTemplates\LocationSettings.ascx" />
|
||||||
<Content Include="Contents\Views\DisplayTemplates\Parts\Contents.Publish.SummaryAdmin.ascx" />
|
<Content Include="Contents\Views\DisplayTemplates\Parts\Contents.Publish.SummaryAdmin.ascx" />
|
||||||
<Content Include="Contents\Views\DisplayTemplates\Parts\Contents.Publish.ascx" />
|
<Content Include="Contents\Views\DisplayTemplates\Parts\Contents.Publish.ascx" />
|
||||||
<Content Include="Localization\Views\EditorTemplates\Parts\Localization.Translation.ascx" />
|
<Content Include="Localization\Views\EditorTemplates\Parts\Localization.Translation.ascx" />
|
||||||
@ -352,6 +353,7 @@
|
|||||||
<Content Include="Localization\Views\Web.config" />
|
<Content Include="Localization\Views\Web.config" />
|
||||||
<Content Include="Reports\Views\Web.config" />
|
<Content Include="Reports\Views\Web.config" />
|
||||||
<Content Include="PublishLater\Views\Web.config" />
|
<Content Include="PublishLater\Views\Web.config" />
|
||||||
|
<Content Include="ContentsLocation\Views\Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
using Orchard.ContentManagement;
|
using Orchard.ContentManagement;
|
||||||
using Orchard.ContentManagement.Aspects;
|
using Orchard.ContentManagement.Aspects;
|
||||||
using Orchard.ContentManagement.Drivers;
|
using Orchard.ContentManagement.Drivers;
|
||||||
using Orchard.Core.Common.Models;
|
using Orchard.Core.ContentsLocation.Models;
|
||||||
using Orchard.Core.Common.Settings;
|
|
||||||
using Orchard.Core.Routable.Models;
|
using Orchard.Core.Routable.Models;
|
||||||
using Orchard.Core.Routable.Services;
|
using Orchard.Core.Routable.Services;
|
||||||
using Orchard.Core.Routable.ViewModels;
|
using Orchard.Core.Routable.ViewModels;
|
||||||
|
@ -8,5 +8,5 @@ description: The routable module enables content items to be accessed through a
|
|||||||
features:
|
features:
|
||||||
Routable:
|
Routable:
|
||||||
Description: Routable content part.
|
Description: Routable content part.
|
||||||
Dependencies: Settings
|
Dependencies: ContentsLocation
|
||||||
Category: Core
|
Category: Core
|
||||||
|
@ -67,6 +67,7 @@ namespace Orchard.Setup.Services {
|
|||||||
"Common",
|
"Common",
|
||||||
"PublishLater",
|
"PublishLater",
|
||||||
"Contents",
|
"Contents",
|
||||||
|
"ContentsLocation",
|
||||||
"Dashboard",
|
"Dashboard",
|
||||||
"Reports",
|
"Reports",
|
||||||
"Feeds",
|
"Feeds",
|
||||||
|
Loading…
Reference in New Issue
Block a user