#16904: Adding CommonPart by default

Work Item: 16904

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-09-16 16:55:00 -07:00
parent 6cb7a3ba7e
commit 5bdf66d077
2 changed files with 5 additions and 1 deletions

View File

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

View File

@@ -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 <b>Common</b> 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 <b>Containable</b> part makes it possible to add content items of this type to a <b>List</b>.")
@T("Choose the Parts to add to this Content Type. Adding the <b>Containable</b> part makes it possible to add content items of this type to a <b>List</b>.")
@using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary()
<fieldset>