Providing some default descriptions for out-of-the-box content parts.

--HG--
branch : 1.x
extra : rebase_source : a8e36387800f484de3d5aca800b25a9f89f4982b
This commit is contained in:
Sipke Schoorstra
2013-03-11 12:35:12 +01:00
parent 356f62e032
commit 8416503df6
11 changed files with 176 additions and 24 deletions

View File

@@ -6,8 +6,13 @@ namespace Orchard.Core.Navigation {
public class Migrations : DataMigrationImpl {
public int Create() {
ContentDefinitionManager.AlterPartDefinition("MenuPart", builder => builder.Attachable());
ContentDefinitionManager.AlterPartDefinition("NavigationPart", builder => builder.Attachable());
ContentDefinitionManager.AlterPartDefinition("MenuPart", builder => builder
.Attachable()
.WithDescription("Provides an easy way to create a ContentMenuItem from the content editor."));
ContentDefinitionManager.AlterPartDefinition("NavigationPart", builder => builder
.Attachable()
.WithDescription("Allows the management of Content Menu Items associated with a Content Item."));
ContentDefinitionManager.AlterTypeDefinition("Page", cfg => cfg.WithPart("NavigationPart"));
SchemaBuilder.CreateTable("MenuItemPartRecord",
@@ -75,7 +80,9 @@ namespace Orchard.Core.Navigation {
.WithSetting("Stereotype", "MenuItem")
);
ContentDefinitionManager.AlterPartDefinition("AdminMenuPart", builder => builder.Attachable());
ContentDefinitionManager.AlterPartDefinition("AdminMenuPart", builder => builder
.Attachable()
.WithDescription("Adds a menu item to the Admin menu that links to this content item."));
SchemaBuilder.CreateTable("ContentMenuItemPartRecord",
table => table
@@ -211,5 +218,19 @@ namespace Orchard.Core.Navigation {
return 4;
}
public int UpdateFrom4() {
ContentDefinitionManager.AlterPartDefinition("MenuPart", builder => builder
.WithDescription("Provides an easy way to create a ContentMenuItem from the content editor."));
ContentDefinitionManager.AlterPartDefinition("NavigationPart", builder => builder
.WithDescription("Allows the management of Content Menu Items associated with a Content Item."));
ContentDefinitionManager.AlterPartDefinition("AdminMenuPart", builder => builder
.Attachable()
.WithDescription("Adds a menu item to the Admin menu that links to this content item."));
return 5;
}
}
}