mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Changing primary content zone to "Primary" (from "primary")
--HG-- branch : dev
This commit is contained in:
@@ -41,7 +41,7 @@ namespace Orchard.Core.Common.DataMigrations {
|
||||
public int UpdateFrom1() {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(BodyPart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Default", new ContentLocation { Zone = "primary", Position = "5" }},
|
||||
{"Default", new ContentLocation { Zone = "Primary", Position = "5" }},
|
||||
}));
|
||||
return 2;
|
||||
}
|
||||
@@ -50,7 +50,7 @@ namespace Orchard.Core.Common.DataMigrations {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(CommonPart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Default", new ContentLocation { Zone = "metadata", Position = "5" }},
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "20" }},
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "20" }},
|
||||
}));
|
||||
return 3;
|
||||
}
|
||||
|
@@ -19,14 +19,14 @@ namespace Orchard.Core.Common.Drivers {
|
||||
}
|
||||
|
||||
protected override DriverResult Display(ContentPart part, TextField field, string displayType) {
|
||||
var location = field.GetLocation(displayType, "primary", "1");
|
||||
var location = field.GetLocation(displayType, "Primary", "1");
|
||||
|
||||
return ContentFieldTemplate(field, TemplateName, GetPrefix(field, part))
|
||||
.Location(location);
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(ContentPart part, TextField field) {
|
||||
var location = field.GetLocation("Editor", "primary", "1");
|
||||
var location = field.GetLocation("Editor", "Primary", "1");
|
||||
|
||||
return ContentFieldTemplate(field, TemplateName, GetPrefix(field, part))
|
||||
.Location(location);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<div class="sections">
|
||||
<div class="primary">
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
||||
</div>
|
||||
<div class="secondary">
|
||||
@Display(Model.secondary)
|
||||
|
@@ -1,3 +1,3 @@
|
||||
content item -> @Model.ContentItem.ContentType
|
||||
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
||||
|
@@ -15,5 +15,5 @@
|
||||
@Html.Link(T("Remove").Text, Url.Action("Remove", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl }), new { itemprop = "RemoveUrl UnsafeUrl" })
|
||||
<br />@Display(Model.meta)
|
||||
</div>
|
||||
<div class="primary">@Display(Model.primary)</div>
|
||||
<div class="primary">@Display(Model.Primary)</div>
|
||||
</div>
|
@@ -3,6 +3,6 @@
|
||||
@Display(Model.Header)
|
||||
</header>
|
||||
<section>
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
||||
</section>
|
||||
</article>
|
@@ -99,7 +99,7 @@ namespace Orchard.Core.ContentsLocation.Settings {
|
||||
var viewModel = new LocationSettingsViewModel {
|
||||
Definition = location,
|
||||
Location = settings.Get(location.Name),
|
||||
DefaultLocation = new ContentLocation { Zone = "primary", Position = "1" }
|
||||
DefaultLocation = new ContentLocation { Zone = "Primary", Position = "1" }
|
||||
};
|
||||
yield return DefinitionTemplate(viewModel, templateName: "LocationSettings", prefix: location.Name);
|
||||
}
|
||||
|
@@ -22,8 +22,8 @@ namespace Orchard.Core.Localization.DataMigrations {
|
||||
public int UpdateFrom1() {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(LocalizationPart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Default", new ContentLocation { Zone = "primary", Position = "5" }},
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "1" }},
|
||||
{"Default", new ContentLocation { Zone = "Primary", Position = "5" }},
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "1" }},
|
||||
}));
|
||||
return 2;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ namespace Orchard.Core.Navigation.DataMigrations {
|
||||
public int UpdateFrom2() {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(MenuPart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "9" }}
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "9" }}
|
||||
}));
|
||||
return 3;
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ namespace Orchard.Core.Routable {
|
||||
public int UpdateFrom1() {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(RoutePart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "before.5" }}
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "before.5" }}
|
||||
} ));
|
||||
|
||||
return 2;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
||||
<fieldset>
|
||||
<input class="button primaryAction" type="submit" value="@T("Save")" />
|
||||
</fieldset>
|
||||
|
@@ -51,7 +51,7 @@ namespace Orchard.Blogs.Drivers {
|
||||
.Select(bp => _contentManager.BuildDisplay(bp, "SummaryAdmin.BlogPost")));
|
||||
var blogPostList = shapeHelper.Parts_Blogs_BlogPost_List(ContentPart: part, BlogPosts: list);
|
||||
blogPostList.Metadata.Type = "Parts_Blogs_BlogPost.List.Admin";
|
||||
var contentShape = ContentShape(blogPostList).Location("primary");
|
||||
var contentShape = ContentShape(blogPostList).Location("Primary");
|
||||
driverResults.Add(contentShape);
|
||||
}
|
||||
else if (!displayType.Contains("Summary")) {
|
||||
@@ -60,7 +60,7 @@ namespace Orchard.Blogs.Drivers {
|
||||
.Select(bp => _contentManager.BuildDisplay(bp, "Summary.BlogPost")));
|
||||
var blogPostList = shapeHelper.Parts_Blogs_BlogPost_List(ContentPart: part, BlogPosts: list);
|
||||
blogPostList.Metadata.Type = "Parts_Blogs_BlogPost.List";
|
||||
var contentShape = ContentShape(blogPostList).Location("primary");
|
||||
var contentShape = ContentShape(blogPostList).Location("Primary");
|
||||
driverResults.Add(contentShape);
|
||||
|
||||
_feedManager.Register(part);
|
||||
|
@@ -51,7 +51,7 @@ namespace Orchard.Blogs {
|
||||
public int UpdateFrom2() {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(BlogPart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "1" }}
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "1" }}
|
||||
}));
|
||||
return 3;
|
||||
}
|
||||
|
@@ -4,4 +4,4 @@
|
||||
@Display(Model.manage)
|
||||
<div class="manage"><a href="@Url.BlogPostCreate((BlogPart)Model.ContentItem.Get(typeof(BlogPart)))" class="add button primaryAction">@T("New Post")</a></div>
|
||||
@Display(Model.metadata)
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
@@ -7,4 +7,4 @@
|
||||
<h1>@Html.TitleForPage((string)Model.Title)</h1>
|
||||
@Display(Model.manage)
|
||||
@Display(Model.metadata)
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
@@ -1,3 +1,3 @@
|
||||
<h1>@Html.TitleForPage((string)Model.Title)</h1>
|
||||
@Display(Model.metadata)
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
@@ -1,4 +1,4 @@
|
||||
@Html.AddTitleParts(Model.Title)
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!111 Content.Edit.Blog !!!!!!!!!!!!!!!!!!!!!!!!11
|
||||
<fieldset><input class="button primaryAction" type="submit" value="@T("Add")" /></fieldset>
|
@@ -5,7 +5,7 @@
|
||||
}
|
||||
<div class="sections">
|
||||
<div class="primary">
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
||||
</div>
|
||||
<div class="secondary">
|
||||
@Display(Model.secondary)
|
||||
|
@@ -5,4 +5,4 @@
|
||||
@using Orchard.Core.Common.ViewModels;
|
||||
<h2>@Html.Link((string)Model.Title, Url.BlogPost((BlogPostPart)Model.ContentItem.Get(typeof(BlogPostPart))))</h2>
|
||||
<div class="meta">@Html.PublishedState(new CommonMetadataViewModel((CommonPart)Model.ContentItem.Get(typeof(CommonPart))), T) | @Display(Model.meta)</div>
|
||||
<div class="content">@Display(Model.primary)</div>
|
||||
<div class="content">@Display(Model.Primary)</div>
|
@@ -18,5 +18,5 @@
|
||||
@Html.Link(T("Remove").Text, Url.Action("Remove", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl }), new { itemprop = "RemoveUrl UnsafeUrl" })
|
||||
<br />@Display(Model.meta)
|
||||
</div>
|
||||
<div class="primary">@Display(Model.primary)</div>
|
||||
<div class="primary">@Display(Model.Primary)</div>
|
||||
</div>
|
||||
|
@@ -68,11 +68,11 @@ namespace Orchard.Comments {
|
||||
public int UpdateFrom2() {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(CommentsPart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Default", new ContentLocation { Zone = "primary", Position = "before.5" }},
|
||||
{"Detail", new ContentLocation { Zone = "primary", Position = "after.5" }},
|
||||
{"Default", new ContentLocation { Zone = "Primary", Position = "before.5" }},
|
||||
{"Detail", new ContentLocation { Zone = "Primary", Position = "after.5" }},
|
||||
{"SummaryAdmin", new ContentLocation { Zone = "meta", Position = null }},
|
||||
{"Summary", new ContentLocation { Zone = "meta", Position = "5" }},
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "10" }},
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "10" }},
|
||||
}));
|
||||
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(CommentsContainerPart).Name, cfg => cfg
|
||||
|
@@ -28,8 +28,8 @@ namespace Orchard.Tags {
|
||||
public int UpdateFrom1() {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(TagsPart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Default", new ContentLocation { Zone = "primary", Position = "49" }},
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "9" }},
|
||||
{"Default", new ContentLocation { Zone = "Primary", Position = "49" }},
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "9" }},
|
||||
}));
|
||||
return 2;
|
||||
}
|
||||
|
@@ -82,21 +82,21 @@ namespace Orchard.Widgets {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(LayerPart).Name,
|
||||
cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "1" }}
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "1" }}
|
||||
})
|
||||
);
|
||||
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(WidgetPart).Name,
|
||||
cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "1" }}
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "1" }}
|
||||
})
|
||||
);
|
||||
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(WidgetBagPart).Name,
|
||||
cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Editor", new ContentLocation {Zone = "primary", Position = "5"}}
|
||||
{"Editor", new ContentLocation {Zone = "Primary", Position = "5"}}
|
||||
})
|
||||
);
|
||||
ContentDefinitionManager.AlterTypeDefinition("WidgetPage",
|
||||
|
@@ -7,4 +7,4 @@
|
||||
<h1>@Html.TitleForPage((string)Model.Title)</h1>
|
||||
@Display(Model.manage)
|
||||
@Display(Model.metadata)
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
@@ -10,7 +10,7 @@ namespace Orchard.ContentManagement.Handlers {
|
||||
public TemplateFilterForRecord(string prefix, string templateName) {
|
||||
_prefix = prefix;
|
||||
_templateName = templateName;
|
||||
_location = "primary";
|
||||
_location = "Primary";
|
||||
_position = "5";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user