From 5bdf66d0771e0b38f1de0a5d7f657bd8f455c746 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Fri, 16 Sep 2011 16:55:00 -0700 Subject: [PATCH] #16904: Adding CommonPart by default Work Item: 16904 --HG-- branch : 1.x --- .../Orchard.ContentTypes/Controllers/AdminController.cs | 4 ++++ .../Orchard.ContentTypes/Views/Admin/AddPartsTo.cshtml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs index 72cdf8ce3..5fae06822 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs @@ -73,6 +73,10 @@ namespace Orchard.ContentTypes.Controllers { } var contentTypeDefinition = _contentDefinitionService.AddType(viewModel.Name, viewModel.DisplayName); + + // adds CommonPart by default + _contentDefinitionService.AddPartToType("CommonPart", viewModel.Name); + var typeViewModel = new EditTypeViewModel(contentTypeDefinition); diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/AddPartsTo.cshtml b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/AddPartsTo.cshtml index 033e57d9e..ea9e82f00 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/AddPartsTo.cshtml +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/AddPartsTo.cshtml @@ -3,7 +3,7 @@ Style.Require("ContentTypesAdmin"); Layout.Title = T("Add Parts To \"{0}\"", Model.Type.DisplayName).ToString(); } -@T("Choose the Parts to add to this Content Type. The Common part should be included in most types. It gives the items an owner as well as a creation, publication and last modification date stamps. In addition to the Common part, adding the Containable part makes it possible to add content items of this type to a List.") +@T("Choose the Parts to add to this Content Type. Adding the Containable part makes it possible to add content items of this type to a List.") @using (Html.BeginFormAntiForgeryPost()) { @Html.ValidationSummary()