From c308aa1fbd5de0df526ff3dc53c22403266a6817 Mon Sep 17 00:00:00 2001 From: Louis DeJardin Date: Fri, 15 Oct 2010 11:55:48 -0700 Subject: [PATCH] Refactoring some shape naming conventions Items_Content* shapes types now Content* Items_Widget* shape types now Widget* *_Editor shapes now *_Edit --HG-- branch : dev --- .../Core/Common/Drivers/BodyPartDriver.cs | 4 +- src/Orchard.Web/Core/Common/Placement.info | 2 +- src/Orchard.Web/Core/Contents/Shapes.cs | 4 +- src/Orchard.Web/Core/Orchard.Core.csproj | 2 +- .../Drivers/PublishLaterPartDriver.cs | 4 +- .../Core/PublishLater/Placement.info | 2 +- .../Orchard.Widgets/Orchard.Widgets.csproj | 6 +- src/Orchard.Web/Orchard.Web.csproj | 169 ++++++++++++++++++ .../DefaultContentDisplay.cs | 4 +- 9 files changed, 183 insertions(+), 14 deletions(-) diff --git a/src/Orchard.Web/Core/Common/Drivers/BodyPartDriver.cs b/src/Orchard.Web/Core/Common/Drivers/BodyPartDriver.cs index a5717ce14..4f52efb0a 100644 --- a/src/Orchard.Web/Core/Common/Drivers/BodyPartDriver.cs +++ b/src/Orchard.Web/Core/Common/Drivers/BodyPartDriver.cs @@ -55,7 +55,7 @@ namespace Orchard.Core.Common.Drivers { protected override DriverResult Editor(BodyPart part, dynamic shapeHelper) { var model = BuildEditorViewModel(part); - return ContentShape("Parts_Common_Body_Editor", + return ContentShape("Parts_Common_Body_Edit", () => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: model, Prefix: Prefix)); } @@ -63,7 +63,7 @@ namespace Orchard.Core.Common.Drivers { var model = BuildEditorViewModel(part); updater.TryUpdateModel(model, Prefix, null, null); - return ContentShape("Parts_Common_Body_Editor", + return ContentShape("Parts_Common_Body_Edit", () => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: model, Prefix: Prefix)); } diff --git a/src/Orchard.Web/Core/Common/Placement.info b/src/Orchard.Web/Core/Common/Placement.info index dc0adb995..08f8a7883 100644 --- a/src/Orchard.Web/Core/Common/Placement.info +++ b/src/Orchard.Web/Core/Common/Placement.info @@ -2,7 +2,7 @@ - + diff --git a/src/Orchard.Web/Core/Contents/Shapes.cs b/src/Orchard.Web/Core/Contents/Shapes.cs index 648ea96ee..20abec04f 100644 --- a/src/Orchard.Web/Core/Contents/Shapes.cs +++ b/src/Orchard.Web/Core/Contents/Shapes.cs @@ -19,12 +19,12 @@ namespace Orchard.Core.Contents { } }); - builder.Describe("Items_Content_Editor") + builder.Describe("Items_Content_Edit") .OnDisplaying(displaying => { ContentItem contentItem = displaying.Shape.ContentItem; if (contentItem != null) { //Content.Editor-Page - displaying.ShapeMetadata.Alternates.Add("Items_Content_Editor__" + contentItem.ContentType); + displaying.ShapeMetadata.Alternates.Add("Items_Content_Edit__" + contentItem.ContentType); } }); } diff --git a/src/Orchard.Web/Core/Orchard.Core.csproj b/src/Orchard.Web/Core/Orchard.Core.csproj index b493f2ab8..c3f5499d7 100644 --- a/src/Orchard.Web/Core/Orchard.Core.csproj +++ b/src/Orchard.Web/Core/Orchard.Core.csproj @@ -381,7 +381,7 @@ - + diff --git a/src/Orchard.Web/Core/PublishLater/Drivers/PublishLaterPartDriver.cs b/src/Orchard.Web/Core/PublishLater/Drivers/PublishLaterPartDriver.cs index 4b7c32cd5..e0821d4c5 100644 --- a/src/Orchard.Web/Core/PublishLater/Drivers/PublishLaterPartDriver.cs +++ b/src/Orchard.Web/Core/PublishLater/Drivers/PublishLaterPartDriver.cs @@ -43,7 +43,7 @@ namespace Orchard.Core.PublishLater.Drivers { protected override DriverResult Editor(PublishLaterPart part, dynamic shapeHelper) { var model = BuildEditorViewModel(part); - return ContentShape("Parts_PublishLater_Editor", + return ContentShape("Parts_PublishLater_Edit", () => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: model, Prefix: Prefix)); } protected override DriverResult Editor(PublishLaterPart part, IUpdateModel updater, dynamic shapeHelper) { @@ -65,7 +65,7 @@ namespace Orchard.Core.PublishLater.Drivers { //Services.Notifier.Information(T("{0} draft has been saved!", model.ContentItem.TypeDefinition.DisplayName)); break; } - return ContentShape("Parts_PublishLater_Editor", + return ContentShape("Parts_PublishLater_Edit", () => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: model, Prefix: Prefix)); } diff --git a/src/Orchard.Web/Core/PublishLater/Placement.info b/src/Orchard.Web/Core/PublishLater/Placement.info index 0aac725c1..e7e177112 100644 --- a/src/Orchard.Web/Core/PublishLater/Placement.info +++ b/src/Orchard.Web/Core/PublishLater/Placement.info @@ -2,7 +2,7 @@ - + diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj b/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj index 4210fb3de..0483cc885 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj @@ -116,12 +116,12 @@ Designer - - + + - + diff --git a/src/Orchard.Web/Orchard.Web.csproj b/src/Orchard.Web/Orchard.Web.csproj index 11a36e4f4..31ae9639c 100644 --- a/src/Orchard.Web/Orchard.Web.csproj +++ b/src/Orchard.Web/Orchard.Web.csproj @@ -125,9 +125,27 @@ + + + + + + + + + + + + + + + + + Designer + @@ -147,12 +165,163 @@ Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Orchard/ContentManagement/DefaultContentDisplay.cs b/src/Orchard/ContentManagement/DefaultContentDisplay.cs index 589fe36c2..d44078a1e 100644 --- a/src/Orchard/ContentManagement/DefaultContentDisplay.cs +++ b/src/Orchard/ContentManagement/DefaultContentDisplay.cs @@ -81,7 +81,7 @@ namespace Orchard.ContentManagement { if (!contentTypeDefinition.Settings.TryGetValue("Stereotype", out stereotype)) stereotype = "Content"; - var actualShapeType = "Items_" + stereotype + "_Editor"; + var actualShapeType = "Items_" + stereotype + "_Edit"; dynamic itemShape = CreateItemShape(actualShapeType); itemShape.ContentItem = content.ContentItem; @@ -99,7 +99,7 @@ namespace Orchard.ContentManagement { if (!contentTypeDefinition.Settings.TryGetValue("Stereotype", out stereotype)) stereotype = "Content"; - var actualShapeType = "Items_" + stereotype + "_Editor"; + var actualShapeType = "Items_" + stereotype + "_Edit"; dynamic itemShape = CreateItemShape(actualShapeType); itemShape.ContentItem = content.ContentItem;