mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-22 03:37:25 +08:00
Providing some default descriptions for out-of-the-box content parts.
--HG-- branch : 1.x extra : rebase_source : a8e36387800f484de3d5aca800b25a9f89f4982b
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user