Changing primary content zone to "Primary" (from "primary")

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-10-11 15:45:32 -07:00
parent 71d3c9c32a
commit 302d0585b9
25 changed files with 34 additions and 34 deletions

View File

@@ -41,7 +41,7 @@ namespace Orchard.Core.Common.DataMigrations {
public int UpdateFrom1() { public int UpdateFrom1() {
ContentDefinitionManager.AlterPartDefinition(typeof(BodyPart).Name, cfg => cfg ContentDefinitionManager.AlterPartDefinition(typeof(BodyPart).Name, cfg => cfg
.WithLocation(new Dictionary<string, ContentLocation> { .WithLocation(new Dictionary<string, ContentLocation> {
{"Default", new ContentLocation { Zone = "primary", Position = "5" }}, {"Default", new ContentLocation { Zone = "Primary", Position = "5" }},
})); }));
return 2; return 2;
} }
@@ -50,7 +50,7 @@ namespace Orchard.Core.Common.DataMigrations {
ContentDefinitionManager.AlterPartDefinition(typeof(CommonPart).Name, cfg => cfg ContentDefinitionManager.AlterPartDefinition(typeof(CommonPart).Name, cfg => cfg
.WithLocation(new Dictionary<string, ContentLocation> { .WithLocation(new Dictionary<string, ContentLocation> {
{"Default", new ContentLocation { Zone = "metadata", Position = "5" }}, {"Default", new ContentLocation { Zone = "metadata", Position = "5" }},
{"Editor", new ContentLocation { Zone = "primary", Position = "20" }}, {"Editor", new ContentLocation { Zone = "Primary", Position = "20" }},
})); }));
return 3; return 3;
} }

View File

@@ -19,14 +19,14 @@ namespace Orchard.Core.Common.Drivers {
} }
protected override DriverResult Display(ContentPart part, TextField field, string displayType) { 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)) return ContentFieldTemplate(field, TemplateName, GetPrefix(field, part))
.Location(location); .Location(location);
} }
protected override DriverResult Editor(ContentPart part, TextField field) { 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)) return ContentFieldTemplate(field, TemplateName, GetPrefix(field, part))
.Location(location); .Location(location);

View File

@@ -1,6 +1,6 @@
<div class="sections"> <div class="sections">
<div class="primary"> <div class="primary">
@Display(Model.primary) @Display(Model.Primary)
</div> </div>
<div class="secondary"> <div class="secondary">
@Display(Model.secondary) @Display(Model.secondary)

View File

@@ -1,3 +1,3 @@
content item -> @Model.ContentItem.ContentType content item -> @Model.ContentItem.ContentType
@Display(Model.primary) @Display(Model.Primary)

View File

@@ -15,5 +15,5 @@
@Html.Link(T("Remove").Text, Url.Action("Remove", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl }), new { itemprop = "RemoveUrl UnsafeUrl" }) @Html.Link(T("Remove").Text, Url.Action("Remove", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl }), new { itemprop = "RemoveUrl UnsafeUrl" })
<br />@Display(Model.meta) <br />@Display(Model.meta)
</div> </div>
<div class="primary">@Display(Model.primary)</div> <div class="primary">@Display(Model.Primary)</div>
</div> </div>

View File

@@ -3,6 +3,6 @@
@Display(Model.Header) @Display(Model.Header)
</header> </header>
<section> <section>
@Display(Model.primary) @Display(Model.Primary)
</section> </section>
</article> </article>

View File

@@ -99,7 +99,7 @@ namespace Orchard.Core.ContentsLocation.Settings {
var viewModel = new LocationSettingsViewModel { var viewModel = new LocationSettingsViewModel {
Definition = location, Definition = location,
Location = settings.Get(location.Name), 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); yield return DefinitionTemplate(viewModel, templateName: "LocationSettings", prefix: location.Name);
} }

View File

@@ -22,8 +22,8 @@ namespace Orchard.Core.Localization.DataMigrations {
public int UpdateFrom1() { public int UpdateFrom1() {
ContentDefinitionManager.AlterPartDefinition(typeof(LocalizationPart).Name, cfg => cfg ContentDefinitionManager.AlterPartDefinition(typeof(LocalizationPart).Name, cfg => cfg
.WithLocation(new Dictionary<string, ContentLocation> { .WithLocation(new Dictionary<string, ContentLocation> {
{"Default", new ContentLocation { Zone = "primary", Position = "5" }}, {"Default", new ContentLocation { Zone = "Primary", Position = "5" }},
{"Editor", new ContentLocation { Zone = "primary", Position = "1" }}, {"Editor", new ContentLocation { Zone = "Primary", Position = "1" }},
})); }));
return 2; return 2;
} }

View File

@@ -39,7 +39,7 @@ namespace Orchard.Core.Navigation.DataMigrations {
public int UpdateFrom2() { public int UpdateFrom2() {
ContentDefinitionManager.AlterPartDefinition(typeof(MenuPart).Name, cfg => cfg ContentDefinitionManager.AlterPartDefinition(typeof(MenuPart).Name, cfg => cfg
.WithLocation(new Dictionary<string, ContentLocation> { .WithLocation(new Dictionary<string, ContentLocation> {
{"Editor", new ContentLocation { Zone = "primary", Position = "9" }} {"Editor", new ContentLocation { Zone = "Primary", Position = "9" }}
})); }));
return 3; return 3;
} }

View File

@@ -24,7 +24,7 @@ namespace Orchard.Core.Routable {
public int UpdateFrom1() { public int UpdateFrom1() {
ContentDefinitionManager.AlterPartDefinition(typeof(RoutePart).Name, cfg => cfg ContentDefinitionManager.AlterPartDefinition(typeof(RoutePart).Name, cfg => cfg
.WithLocation(new Dictionary<string, ContentLocation> { .WithLocation(new Dictionary<string, ContentLocation> {
{"Editor", new ContentLocation { Zone = "primary", Position = "before.5" }} {"Editor", new ContentLocation { Zone = "Primary", Position = "before.5" }}
} )); } ));
return 2; return 2;

View File

@@ -2,7 +2,7 @@
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()
@Display(Model.primary) @Display(Model.Primary)
<fieldset> <fieldset>
<input class="button primaryAction" type="submit" value="@T("Save")" /> <input class="button primaryAction" type="submit" value="@T("Save")" />
</fieldset> </fieldset>

View File

@@ -51,7 +51,7 @@ namespace Orchard.Blogs.Drivers {
.Select(bp => _contentManager.BuildDisplay(bp, "SummaryAdmin.BlogPost"))); .Select(bp => _contentManager.BuildDisplay(bp, "SummaryAdmin.BlogPost")));
var blogPostList = shapeHelper.Parts_Blogs_BlogPost_List(ContentPart: part, BlogPosts: list); var blogPostList = shapeHelper.Parts_Blogs_BlogPost_List(ContentPart: part, BlogPosts: list);
blogPostList.Metadata.Type = "Parts_Blogs_BlogPost.List.Admin"; blogPostList.Metadata.Type = "Parts_Blogs_BlogPost.List.Admin";
var contentShape = ContentShape(blogPostList).Location("primary"); var contentShape = ContentShape(blogPostList).Location("Primary");
driverResults.Add(contentShape); driverResults.Add(contentShape);
} }
else if (!displayType.Contains("Summary")) { else if (!displayType.Contains("Summary")) {
@@ -60,7 +60,7 @@ namespace Orchard.Blogs.Drivers {
.Select(bp => _contentManager.BuildDisplay(bp, "Summary.BlogPost"))); .Select(bp => _contentManager.BuildDisplay(bp, "Summary.BlogPost")));
var blogPostList = shapeHelper.Parts_Blogs_BlogPost_List(ContentPart: part, BlogPosts: list); var blogPostList = shapeHelper.Parts_Blogs_BlogPost_List(ContentPart: part, BlogPosts: list);
blogPostList.Metadata.Type = "Parts_Blogs_BlogPost.List"; blogPostList.Metadata.Type = "Parts_Blogs_BlogPost.List";
var contentShape = ContentShape(blogPostList).Location("primary"); var contentShape = ContentShape(blogPostList).Location("Primary");
driverResults.Add(contentShape); driverResults.Add(contentShape);
_feedManager.Register(part); _feedManager.Register(part);

View File

@@ -51,7 +51,7 @@ namespace Orchard.Blogs {
public int UpdateFrom2() { public int UpdateFrom2() {
ContentDefinitionManager.AlterPartDefinition(typeof(BlogPart).Name, cfg => cfg ContentDefinitionManager.AlterPartDefinition(typeof(BlogPart).Name, cfg => cfg
.WithLocation(new Dictionary<string, ContentLocation> { .WithLocation(new Dictionary<string, ContentLocation> {
{"Editor", new ContentLocation { Zone = "primary", Position = "1" }} {"Editor", new ContentLocation { Zone = "Primary", Position = "1" }}
})); }));
return 3; return 3;
} }

View File

@@ -4,4 +4,4 @@
@Display(Model.manage) @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> <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.metadata)
@Display(Model.primary) @Display(Model.Primary)

View File

@@ -7,4 +7,4 @@
<h1>@Html.TitleForPage((string)Model.Title)</h1> <h1>@Html.TitleForPage((string)Model.Title)</h1>
@Display(Model.manage) @Display(Model.manage)
@Display(Model.metadata) @Display(Model.metadata)
@Display(Model.primary) @Display(Model.Primary)

View File

@@ -1,3 +1,3 @@
<h1>@Html.TitleForPage((string)Model.Title)</h1> <h1>@Html.TitleForPage((string)Model.Title)</h1>
@Display(Model.metadata) @Display(Model.metadata)
@Display(Model.primary) @Display(Model.Primary)

View File

@@ -1,4 +1,4 @@
@Html.AddTitleParts(Model.Title) @Html.AddTitleParts(Model.Title)
@Display(Model.primary) @Display(Model.Primary)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!111 Content.Edit.Blog !!!!!!!!!!!!!!!!!!!!!!!!11 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!111 Content.Edit.Blog !!!!!!!!!!!!!!!!!!!!!!!!11
<fieldset><input class="button primaryAction" type="submit" value="@T("Add")" /></fieldset> <fieldset><input class="button primaryAction" type="submit" value="@T("Add")" /></fieldset>

View File

@@ -5,7 +5,7 @@
} }
<div class="sections"> <div class="sections">
<div class="primary"> <div class="primary">
@Display(Model.primary) @Display(Model.Primary)
</div> </div>
<div class="secondary"> <div class="secondary">
@Display(Model.secondary) @Display(Model.secondary)

View File

@@ -5,4 +5,4 @@
@using Orchard.Core.Common.ViewModels; @using Orchard.Core.Common.ViewModels;
<h2>@Html.Link((string)Model.Title, Url.BlogPost((BlogPostPart)Model.ContentItem.Get(typeof(BlogPostPart))))</h2> <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="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>

View File

@@ -18,5 +18,5 @@
@Html.Link(T("Remove").Text, Url.Action("Remove", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl }), new { itemprop = "RemoveUrl UnsafeUrl" }) @Html.Link(T("Remove").Text, Url.Action("Remove", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl }), new { itemprop = "RemoveUrl UnsafeUrl" })
<br />@Display(Model.meta) <br />@Display(Model.meta)
</div> </div>
<div class="primary">@Display(Model.primary)</div> <div class="primary">@Display(Model.Primary)</div>
</div> </div>

View File

@@ -68,11 +68,11 @@ namespace Orchard.Comments {
public int UpdateFrom2() { public int UpdateFrom2() {
ContentDefinitionManager.AlterPartDefinition(typeof(CommentsPart).Name, cfg => cfg ContentDefinitionManager.AlterPartDefinition(typeof(CommentsPart).Name, cfg => cfg
.WithLocation(new Dictionary<string, ContentLocation> { .WithLocation(new Dictionary<string, ContentLocation> {
{"Default", new ContentLocation { Zone = "primary", Position = "before.5" }}, {"Default", new ContentLocation { Zone = "Primary", Position = "before.5" }},
{"Detail", new ContentLocation { Zone = "primary", Position = "after.5" }}, {"Detail", new ContentLocation { Zone = "Primary", Position = "after.5" }},
{"SummaryAdmin", new ContentLocation { Zone = "meta", Position = null }}, {"SummaryAdmin", new ContentLocation { Zone = "meta", Position = null }},
{"Summary", new ContentLocation { Zone = "meta", Position = "5" }}, {"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 ContentDefinitionManager.AlterPartDefinition(typeof(CommentsContainerPart).Name, cfg => cfg

View File

@@ -28,8 +28,8 @@ namespace Orchard.Tags {
public int UpdateFrom1() { public int UpdateFrom1() {
ContentDefinitionManager.AlterPartDefinition(typeof(TagsPart).Name, cfg => cfg ContentDefinitionManager.AlterPartDefinition(typeof(TagsPart).Name, cfg => cfg
.WithLocation(new Dictionary<string, ContentLocation> { .WithLocation(new Dictionary<string, ContentLocation> {
{"Default", new ContentLocation { Zone = "primary", Position = "49" }}, {"Default", new ContentLocation { Zone = "Primary", Position = "49" }},
{"Editor", new ContentLocation { Zone = "primary", Position = "9" }}, {"Editor", new ContentLocation { Zone = "Primary", Position = "9" }},
})); }));
return 2; return 2;
} }

View File

@@ -82,21 +82,21 @@ namespace Orchard.Widgets {
ContentDefinitionManager.AlterPartDefinition(typeof(LayerPart).Name, ContentDefinitionManager.AlterPartDefinition(typeof(LayerPart).Name,
cfg => cfg cfg => cfg
.WithLocation(new Dictionary<string, ContentLocation> { .WithLocation(new Dictionary<string, ContentLocation> {
{"Editor", new ContentLocation { Zone = "primary", Position = "1" }} {"Editor", new ContentLocation { Zone = "Primary", Position = "1" }}
}) })
); );
ContentDefinitionManager.AlterPartDefinition(typeof(WidgetPart).Name, ContentDefinitionManager.AlterPartDefinition(typeof(WidgetPart).Name,
cfg => cfg cfg => cfg
.WithLocation(new Dictionary<string, ContentLocation> { .WithLocation(new Dictionary<string, ContentLocation> {
{"Editor", new ContentLocation { Zone = "primary", Position = "1" }} {"Editor", new ContentLocation { Zone = "Primary", Position = "1" }}
}) })
); );
ContentDefinitionManager.AlterPartDefinition(typeof(WidgetBagPart).Name, ContentDefinitionManager.AlterPartDefinition(typeof(WidgetBagPart).Name,
cfg => cfg cfg => cfg
.WithLocation(new Dictionary<string, ContentLocation> { .WithLocation(new Dictionary<string, ContentLocation> {
{"Editor", new ContentLocation {Zone = "primary", Position = "5"}} {"Editor", new ContentLocation {Zone = "Primary", Position = "5"}}
}) })
); );
ContentDefinitionManager.AlterTypeDefinition("WidgetPage", ContentDefinitionManager.AlterTypeDefinition("WidgetPage",

View File

@@ -7,4 +7,4 @@
<h1>@Html.TitleForPage((string)Model.Title)</h1> <h1>@Html.TitleForPage((string)Model.Title)</h1>
@Display(Model.manage) @Display(Model.manage)
@Display(Model.metadata) @Display(Model.metadata)
@Display(Model.primary) @Display(Model.Primary)

View File

@@ -10,7 +10,7 @@ namespace Orchard.ContentManagement.Handlers {
public TemplateFilterForRecord(string prefix, string templateName) { public TemplateFilterForRecord(string prefix, string templateName) {
_prefix = prefix; _prefix = prefix;
_templateName = templateName; _templateName = templateName;
_location = "primary"; _location = "Primary";
_position = "5"; _position = "5";
} }