From 8e4779977a6883294cf51dcff719d294f2e8fa25 Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Wed, 3 Mar 2010 13:15:50 -0800 Subject: [PATCH 1/2] Changing the Body aspect's manage template parts to be named more appropriately - Changed the templates to be prefixed with "Common.Body." --HG-- branch : dev rename : src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/ManageWrapperPost.ascx => src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Manage.ascx rename : src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/ManageWrapperPost.ascx => src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.ManageWrapperPost.ascx rename : src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/ManageWrapperPre.ascx => src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.ManageWrapperPre.ascx --- src/Orchard.Web/Core/Common/Controllers/BodyDriver.cs | 6 +++--- .../Parts/{Manage.ascx => Common.Body.Manage.ascx} | 2 +- ...eWrapperPost.ascx => Common.Body.ManageWrapperPost.ascx} | 0 ...ageWrapperPre.ascx => Common.Body.ManageWrapperPre.ascx} | 0 src/Orchard.Web/Core/Orchard.Core.csproj | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) rename src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/{Manage.ascx => Common.Body.Manage.ascx} (71%) rename src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/{ManageWrapperPost.ascx => Common.Body.ManageWrapperPost.ascx} (100%) rename src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/{ManageWrapperPre.ascx => Common.Body.ManageWrapperPre.ascx} (100%) diff --git a/src/Orchard.Web/Core/Common/Controllers/BodyDriver.cs b/src/Orchard.Web/Core/Common/Controllers/BodyDriver.cs index 0368c9f46..45959bedc 100644 --- a/src/Orchard.Web/Core/Common/Controllers/BodyDriver.cs +++ b/src/Orchard.Web/Core/Common/Controllers/BodyDriver.cs @@ -23,10 +23,10 @@ namespace Orchard.Core.Common.Controllers { var model = new BodyDisplayViewModel { BodyAspect = part, Text = BbcodeReplace(part.Text) }; return Combined( - Services.Authorizer.Authorize(Permissions.ChangeOwner) ? ContentPartTemplate(model, "Parts/ManageWrapperPre").Location("primary", "5") : null, - Services.Authorizer.Authorize(Permissions.ChangeOwner) ? ContentPartTemplate(model, "Parts/Manage").Location("primary", "5") : null, + Services.Authorizer.Authorize(Permissions.ChangeOwner) ? ContentPartTemplate(model, "Parts/Common.Body.ManageWrapperPre").Location("primary", "5") : null, + Services.Authorizer.Authorize(Permissions.ChangeOwner) ? ContentPartTemplate(model, "Parts/Common.Body.Manage").Location("primary", "5") : null, ContentPartTemplate(model, TemplateName, Prefix).LongestMatch(displayType, "Summary", "SummaryAdmin").Location("primary", "5"), - Services.Authorizer.Authorize(Permissions.ChangeOwner) ? ContentPartTemplate(model, "Parts/ManageWrapperPost").Location("primary", "5") : null); + Services.Authorizer.Authorize(Permissions.ChangeOwner) ? ContentPartTemplate(model, "Parts/Common.Body.ManageWrapperPost").Location("primary", "5") : null); } protected override DriverResult Editor(BodyAspect part) { diff --git a/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Manage.ascx b/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Manage.ascx similarity index 71% rename from src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Manage.ascx rename to src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Manage.ascx index a8d07423b..c2f57aa94 100644 --- a/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Manage.ascx +++ b/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Manage.ascx @@ -1,5 +1,5 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Core.Common.ViewModels"%>
- <%=Html.ItemEditLink("Edit", Model.BodyAspect.ContentItem) %> + <%=Html.ItemEditLink("Edits", Model.BodyAspect.ContentItem) %>
\ No newline at end of file diff --git a/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/ManageWrapperPost.ascx b/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.ManageWrapperPost.ascx similarity index 100% rename from src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/ManageWrapperPost.ascx rename to src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.ManageWrapperPost.ascx diff --git a/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/ManageWrapperPre.ascx b/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.ManageWrapperPre.ascx similarity index 100% rename from src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/ManageWrapperPre.ascx rename to src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.ManageWrapperPre.ascx diff --git a/src/Orchard.Web/Core/Orchard.Core.csproj b/src/Orchard.Web/Core/Orchard.Core.csproj index 1c90dbad4..775477634 100644 --- a/src/Orchard.Web/Core/Orchard.Core.csproj +++ b/src/Orchard.Web/Core/Orchard.Core.csproj @@ -226,9 +226,9 @@ - - - + + + From e9628c4c8fd4df7d5b4938a1b701d7b7458f9c8f Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Wed, 3 Mar 2010 13:19:09 -0800 Subject: [PATCH 2/2] Changing the Body aspect's manage link text back to what it should be, "Edit"... --HG-- branch : dev --- .../Common/Views/DisplayTemplates/Parts/Common.Body.Manage.ascx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Manage.ascx b/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Manage.ascx index c2f57aa94..a8d07423b 100644 --- a/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Manage.ascx +++ b/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Manage.ascx @@ -1,5 +1,5 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Core.Common.ViewModels"%>
- <%=Html.ItemEditLink("Edits", Model.BodyAspect.ContentItem) %> + <%=Html.ItemEditLink("Edit", Model.BodyAspect.ContentItem) %>
\ No newline at end of file