Making the zone names used on admin related templates consistent with what's being used for the front-end (e.g. Header, Meta, Actions, Content, Sidebar)

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-10-29 22:52:53 -07:00
parent 9a5239e777
commit 4fe4cfe46b
31 changed files with 93 additions and 82 deletions

View File

@@ -158,7 +158,7 @@ namespace Orchard.Core.Common.Handlers {
// if (instance.Owner != null)
// viewModel.Owner = instance.Owner.UserName;
// context.AddEditor(new TemplateViewModel(viewModel, "CommonPart") { TemplateName = "Parts/Common.Owner", ZoneName = "primary", Position = "999" });
// context.AddEditor(new TemplateViewModel(viewModel, "CommonPart") { TemplateName = "Parts/Common.Owner", ZoneName = "Content", Position = "999" });
//}
@@ -190,7 +190,7 @@ namespace Orchard.Core.Common.Handlers {
// }
// }
// context.AddEditor(new TemplateViewModel(viewModel, "CommonPart") { TemplateName = "Parts/Common.Owner", ZoneName = "primary", Position = "999" });
// context.AddEditor(new TemplateViewModel(viewModel, "CommonPart") { TemplateName = "Parts/Common.Owner", ZoneName = "Content", Position = "999" });
//}
}
}

View File

@@ -10,10 +10,10 @@
-->
<!-- edit shapes getting default placements -->
<!-- edit "shape" -->
<Place Parts_Common_Body_Edit="Primary:2"/>
<Place Parts_Common_Owner_Edit="Primary:20"/>
<Place Parts_Common_Container_Edit="Primary:20"/>
<Place Fields_Common_Text_Edit="Primary:2.5"/>
<Place Parts_Common_Body_Edit="Content:2"/>
<Place Parts_Common_Owner_Edit="Content:20"/>
<Place Parts_Common_Container_Edit="Content:20"/>
<Place Fields_Common_Text_Edit="Content:2.5"/>
<!-- default positioning -->
<!-- show summary for all DisplayType by default -->
<Place Parts_Common_Body_Summary="Content:5"/>
@@ -22,7 +22,8 @@
<Match DisplayType="Detail">
<!-- hide summary, show full content, for Detail -->
<Place Parts_Common_Body_Summary="-"
Parts_Common_Body="Content:5" />
Parts_Common_Body="Content:5"
Parts_Common_Metadata="Meta:2"/>
</Match>
<Match DisplayType="Summary">
<Place Parts_Common_Metadata_Summary="Meta:2"/>

View File

@@ -8,6 +8,6 @@
<Place Parts_Contents_Publish="Content:5"/>
</Match>
<Match DisplayType="SummaryAdmin">
<Place Parts_Contents_Publish_SummaryAdmin="Secondary:5"/>
<Place Parts_Contents_Publish_SummaryAdmin="Actions:5"/>
</Match>
</Placement>

View File

@@ -1,9 +1,10 @@
<div class="sections">
<div class="primary">
@Display(Model.Primary)
@Display(Model.Content)
</div>
<div class="secondary">
@Display(Model.Secondary)
@Display(Model.Sidebar)
@* todo: (heskew) remove when the CommonPart is adding the save button *@
<fieldset>
<button class="primaryAction" type="submit" name="submit.Save" value="submit.Save">@T("Save")</button>
</fieldset>

View File

@@ -8,11 +8,19 @@
<div class="properties">
<input type="checkbox" value="@contentItem.Id" name="itemIds"/>
<h3>@Html.ItemEditLink(contentItem)</h3>
@if (Model.Header != null) {
<div class="header">@Display(Model.Header)</div>
}
@if (Model.Meta != null) {
<div class="metadata">@Display(Model.Meta)</div>
}
</div>
<div class="related">@Display(Model.Secondary)
<div class="related">
@Display(Model.Actions)
@Html.ItemEditLink(T("Edit").Text, contentItem) @T(" | ")
@Html.Link(T("Remove").Text, Url.Action("Remove", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl }), new { itemprop = "RemoveUrl UnsafeUrl" })
</div>
<div class="primary">@Display(Model.Primary)</div>
@if (Model.Content != null) {
<div class="primary">@Display(Model.Content)</div>
}
</div>

View File

@@ -6,7 +6,7 @@
Parts_Localization_ContentTranslations_SummaryAdmin
-->
<!-- edit shape just gets default placement -->
<Place Parts_Localization_ContentTranslations_Edit="Primary:before.1"/>
<Place Parts_Localization_ContentTranslations_Edit="Content:before.1"/>
<Match DisplayType="Detail">
<Place Parts_Localization_ContentTranslations="Content:2"/>
</Match>
@@ -14,6 +14,6 @@
<Place Parts_Localization_ContentTranslations_Summary="Content:2"/>
</Match>
<Match DisplayType="SummaryAdmin">
<Place Parts_Localization_ContentTranslations_SummaryAdmin="Primary:5"/>
<Place Parts_Localization_ContentTranslations_SummaryAdmin="Content:5"/>
</Match>
</Placement>

View File

@@ -2,7 +2,7 @@
@using Orchard.Core.Localization.ViewModels;
@{
dynamic content = Model.Content;
content.Zones.Primary.Add(New.Partial(TemplateName: "CultureSelection", Model: Model), "0");
content.Zones.Content.Add(New.Partial(TemplateName: "CultureSelection", Model: Model), "0");
}
<h1>@Html.TitleForPage(T("Translate Content").ToString())</h1>
@using (Html.BeginFormAntiForgeryPost()) {

View File

@@ -1,3 +1,3 @@
<Placement>
<Place Parts_MessageSettings_Edit="Primary:10"/>
<Place Parts_MessageSettings_Edit="Content:10"/>
</Placement>

View File

@@ -1,3 +1,3 @@
<Placement>
<Place Parts_Navigation_Menu_Edit="Primary:9"/>
<Place Parts_Navigation_Menu_Edit="Content:9"/>
</Placement>

View File

@@ -1,4 +1,9 @@
<Placement>
<Place Parts_RoutableTitle="Header:5"/>
<Place Parts_Routable_Edit="Primary:before.5"/>
<Place Parts_Routable_Edit="Content:before.5"/>
<Match DisplayType="Detail">
<Place Parts_RoutableTitle="Header:5"/>
</Match>
<Match DisplayType="Summary">
<Place Parts_RoutableTitle="Header:5"/>
</Match>
</Placement>

View File

@@ -1,3 +1,3 @@
<Placement>
<Place Parts_Settings_SiteSettingsPart="Primary:1"/>
<Place Parts_Settings_SiteSettingsPart="Content:1"/>
</Placement>

View File

@@ -1,10 +1,9 @@
<h1>@Html.TitleForPage(T("Manage Settings").ToString())</h1>
@using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary()
@Display(Model.Primary)
<fieldset>
<input class="button primaryAction" type="submit" value="@T("Save")" />
</fieldset>
@Html.ValidationSummary()
@Display(Model.Content)
<fieldset>
<input class="button primaryAction" type="submit" value="@T("Save")" />
</fieldset>
}

View File

@@ -1,6 +1,6 @@
<Placement>
<Place Parts_ArchiveLater_Edit="Sidebar:2"/>
<Match DisplayType="SummaryAdmin">
<Place Parts_ArchiveLater_Metadata_SummaryAdmin="Meta:2"/>
</Match>
<Place Parts_ArchiveLater_Edit="Secondary:2"/>
</Placement>

View File

@@ -163,7 +163,6 @@
<Content Include="Views\Items\Content-Blog.DetailAdmin.cshtml" />
<Content Include="Views\Items\Content-Blog.Edit.cshtml" />
<Content Include="Views\Items\Content-BlogPost.Editor.cshtml" />
<Content Include="Views\Items\Content-BlogPost.SummaryAdmin.cshtml" />
<Content Include="Views\Parts\Blogs.BlogPost.List.cshtml" />
<Content Include="Views\Parts\Blogs.Blog.Pager.cshtml" />
<Content Include="Views\Parts\Blogs.RecentBlogPosts.cshtml" />

View File

@@ -10,9 +10,9 @@
-->
<!-- widget and edit shapes just get default placement -->
<!-- edit "shapes" -->
<Place Parts_Blogs_Blog_Fields="Primary:2"/>
<Place Parts_Blogs_BlogArchives_Edit="Primary:5"/>
<Place Parts_Blogs_RecentBlogPosts_Edit="Primary:5"/>
<Place Parts_Blogs_Blog_Fields="Content:2"/>
<Place Parts_Blogs_BlogArchives_Edit="Content:5"/>
<Place Parts_Blogs_RecentBlogPosts_Edit="Content:5"/>
<!-- widgets -->
<Place Parts_Blogs_BlogArchives="Content"/>
<Place Parts_Blogs_RecentBlogPosts="Content"/>
@@ -29,8 +29,8 @@
</Match>
<Match DisplayType="DetailAdmin">
<Place Parts_Blogs_BlogPost_List_Admin="Content:5"
Parts_Blogs_Blog_Manage="Manage"
Parts_Blogs_Blog_Description="Manage:after"/>
Parts_Blogs_Blog_Manage="Actions"
Parts_Blogs_Blog_Description="Actions:after"/>
</Match>
<Match DisplayType="Summary">
<Place Parts_Blogs_Blog_Description="Content:before"

View File

@@ -1,6 +1,7 @@
@using Orchard.Blogs.Extensions;
@using Orchard.Blogs.Models;
<h1><a href="@Url.BlogForAdmin((string)Model.Slug)">@Html.TitleForPage((string)Model.Title)</a></h1>
@Display(Model.Manage)
@Display(Model.Header)
@Display(Model.Actions)
<div class="manage"><a href="@Url.BlogPostCreate((BlogPart)Model.ContentItem.Get(typeof(BlogPart)))" class="add button primaryAction">@T("New Post")</a></div>
@Display(Model.Content)

View File

@@ -2,6 +2,13 @@
@{
Html.AddTitleParts((string)Model.Title);
}
@Display(Model.Primary)
@Display(Model.Secondary)
<fieldset><button class="primaryAction" type="submit">@T("Save")</button></fieldset>
<div class="sections">
<div class="primary">
@Display(Model.Content)
</div>
<div class="secondary">
@Display(Model.Sidebar)
@* todo: (heskew) remove when the CommonPart is adding the save button *@
<fieldset><button class="primaryAction" type="submit">@T("Save")</button></fieldset>
</div>
</div>

View File

@@ -10,18 +10,20 @@
<div class="properties">
<input type="checkbox" value="@contentItem.Id" name="itemIds"/>
<h3>@Html.Link((string)Model.Title, Url.BlogForAdmin((string)Model.Slug))</h3>
@if (Model.Header != null) {
<div class="header">@Display(Model.Header)</div>
}
@if (Model.Meta != null) {
<div class="metadata">@Display(Model.Meta)</div>
}
@* <p>[list of authors] [modify blog access]</p> *@
</div>
<div class="related">
@Display(Model.Actions)
<a href="@Url.Blog((string)Model.Slug)" title="@T("View")">@T("View")</a>@T(" | ")
<a href="@Url.BlogForAdmin((string)Model.Slug)" title="@T("List Posts")">@T("List Posts")</a>@T(" | ")
<a href="@Url.BlogPostCreate((BlogPart)Model.ContentItem.Get(typeof(BlogPart)))" title="@T("New Post")">@T("New Post")</a>@T(" | ")
<a href="@Url.BlogEdit((string)Model.Slug)" title="@T("Edit")">@T("Edit")</a>@T(" | ")
<a href="Url.BlogRemove((string)Model.Slug)" title="@T("Remove")" itemprop="RemoveUrl UnsafeUrl">@T("Remove")</a>
<br />@Display(Model.Secondary)
<a href="@Url.BlogRemove((string)Model.Slug)" title="@T("Remove")" itemprop="RemoveUrl UnsafeUrl">@T("Remove")</a>
</div>
@if (Model.Content != null) {
<div class="primary">@Display(Model.Content)</div>

View File

@@ -1,3 +1,5 @@
@* todo: (heskew) remove - not being used but keeping around for the "remove draft" reminder *@
@using Orchard.Blogs.Models;
@{
Html.AddTitleParts((string)Model.Title);
@@ -5,10 +7,11 @@
}
<div class="sections">
<div class="primary">
@Display(Model.Primary)
@Display(Model.Content)
</div>
<div class="secondary">
@Display(Model.Secondary)
@Display(Model.Sidebar)
@* todo: (heskew) remove when the CommonPart is adding the save button - also move the remove draft functionality to the CommonPart at that time *@
<fieldset>
<button class="primaryAction" type="submit" name="submit.Save">@T("Save")</button>
@* TODO: (erikpo) In the future, remove the HasPublished check so the user can delete the content item from here if the choose to *@
@@ -17,4 +20,4 @@
}
</fieldset>
</div>
</div>
</div>asdfsdaf

View File

@@ -1,21 +0,0 @@
@using Orchard.Blogs.Extensions;
@using Orchard.Blogs.Models;
@using Orchard.ContentManagement;
@using Orchard.Utility.Extensions;
@{
ContentItem contentItem = Model.ContentItem;
var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
}
<div class="summary" itemscope="itemscope" itemid="@contentItem.Id" itemtype="http://orchardproject.net/data/ContentItem">
<div class="properties">
<input type="checkbox" value="@contentItem.Id" name="itemIds"/>
<h3>@Html.Link((string)Model.Title, Url.BlogPostEdit((BlogPostPart)Model.ContentItem.Get(typeof(BlogPostPart))))</h3>
<div class="metadata">@Display(Model.Meta)</div>
</div>
<div class="related">@Display(Model.Related)
@Html.Link(T("Edit").Text, Url.BlogPostEdit((BlogPostPart)Model.ContentItem.Get(typeof(BlogPostPart)))) @T(" | ")
@Html.Link(T("Remove").Text, Url.Action("Remove", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl }), new { itemprop = "RemoveUrl UnsafeUrl" })@T(" | ")
@Display(Model.Secondary)
</div>
<div class="primary">@Display(Model.Content)</div>
</div>

View File

@@ -7,8 +7,8 @@
-->
<!-- widget and edit shapes just get default placement -->
<!-- edit "shapes" -->
<Place Parts_Comments_Enable="Primary:10"/>
<Place Parts_Comments_SiteSettings="Primary:10"/>
<Place Parts_Comments_Enable="Content:10"/>
<Place Parts_Comments_SiteSettings="Content:10"/>
<Match DisplayType="Detail">
<Place Parts_Comments="Content:10" />
</Match>
@@ -16,6 +16,6 @@
<Place Parts_Comments_Count="Meta:5"/>
</Match>
<Match DisplayType="SummaryAdmin">
<Place Parts_Comments_Count_SummaryAdmin="Secondary"/>
<Place Parts_Comments_Count_SummaryAdmin="Sidebar"/>
</Match>
</Placement>

View File

@@ -4,7 +4,7 @@
Parts_QueriedContents
-->
<!-- edit "shape" -->
<Place Parts_ContentQueries_Configuration="Primary:2"/>
<Place Parts_ContentQueries_Configuration="Content:2"/>
<!-- default positioning -->
<Match ContentType="ContentQuery">
<Match DisplayType="Detail">

View File

@@ -1,3 +1,3 @@
<Placement>
<Place Parts_SmtpSettings_Edit="Primary:10"/>
<Place Parts_SmtpSettings_Edit="Content:10"/>
</Placement>

View File

@@ -7,7 +7,7 @@
-->
<!-- edit shape just get default placement -->
<!-- edit "shape" -->
<Place Parts_PublishLater_Edit="Secondary:1"/>
<Place Parts_PublishLater_Edit="Sidebar:1"/>
<!-- default positioning -->
<Match DisplayType="SummaryAdmin">
<Place Parts_PublishLater_Metadata_SummaryAdmin="Meta:1"/>

View File

@@ -1,3 +1,3 @@
<Placement>
<Place Parts_Roles_UserRoles_Edit="Primary:10"/>
<Place Parts_Roles_UserRoles_Edit="Content:10"/>
</Placement>

View File

@@ -1,3 +1,3 @@
<Placement>
<Place Parts_Search_SiteSettings="Primary:1"/>
<Place Parts_Search_SiteSettings="Content:1"/>
</Placement>

View File

@@ -1,4 +1,9 @@
<Placement>
<Place Parts_Tags_ShowTags="Header:after.7"/>
<Place Parts_Tags_Edit="Primary:7"/>
<Place Parts_Tags_Edit="Content:7"/>
<Match DisplayType="Detail">
<Place Parts_Tags_ShowTags="Header:after.7"/>
</Match>
<Match DisplayType="Summary">
<Place Parts_Tags_ShowTags="Header:after.7"/>
</Match>
</Placement>

View File

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

View File

@@ -1,5 +1,5 @@
<Placement>
<Place Parts_Widgets_LayerPart="Primary:1"/>
<Place Parts_Widgets_WidgetPart="Primary:1"/>
<Place Parts_Widgets_WidegetBagPart="Primary:5"/>
<Place Parts_Widgets_LayerPart="Content:1"/>
<Place Parts_Widgets_WidgetPart="Content:1"/>
<Place Parts_Widgets_WidegetBagPart="Content:5"/>
</Placement>

View File

@@ -1,9 +1,10 @@
<div class="sections">
<div class="primary">
@Display(Model.Primary)
@Display(Model.Content)
</div>
<div class="secondary">
@Display(Model.Secondary)
@Display(Model.Sidebar)
@* todo: (heskew) remove when the CommonPart is adding the save button *@
<fieldset>
<input class="button primaryAction" type="submit" name="submit.Save" value="@T("Save")"/>
</fieldset>

View File

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