mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-24 21:43:37 +08:00
Changing parts shapes to use the "Parts_" prefix convention.
Similart to content items now (Items_*) and what fields will use (Fields_*) --HG-- branch : dev
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Orchard.Core.Common.Drivers {
|
|||||||
|
|
||||||
protected override DriverResult Display(BodyPart part, string displayType, dynamic shapeHelper) {
|
protected override DriverResult Display(BodyPart part, string displayType, dynamic shapeHelper) {
|
||||||
var bodyText = _htmlFilters.Aggregate(part.Text, (text, filter) => filter.ProcessContent(text));
|
var bodyText = _htmlFilters.Aggregate(part.Text, (text, filter) => filter.ProcessContent(text));
|
||||||
var body = shapeHelper.Common_Body(ContentPart: part, Html: new HtmlString(bodyText));
|
var body = shapeHelper.Parts_Common_Body(ContentPart: part, Html: new HtmlString(bodyText));
|
||||||
if (!string.IsNullOrWhiteSpace(displayType))
|
if (!string.IsNullOrWhiteSpace(displayType))
|
||||||
body.Metadata.Type = string.Format("{0}.{1}", body.Metadata.Type, displayType);
|
body.Metadata.Type = string.Format("{0}.{1}", body.Metadata.Type, displayType);
|
||||||
var location = part.GetLocation(displayType);
|
var location = part.GetLocation(displayType);
|
||||||
|
@@ -36,7 +36,7 @@ namespace Orchard.Core.Common.Drivers {
|
|||||||
public IOrchardServices Services { get; set; }
|
public IOrchardServices Services { get; set; }
|
||||||
|
|
||||||
protected override DriverResult Display(CommonPart part, string displayType, dynamic shapeHelper) {
|
protected override DriverResult Display(CommonPart part, string displayType, dynamic shapeHelper) {
|
||||||
var metadata = shapeHelper.Common_Metadata(ContentPart: part);
|
var metadata = shapeHelper.Parts_Common_Metadata(ContentPart: part);
|
||||||
if (!string.IsNullOrWhiteSpace(displayType))
|
if (!string.IsNullOrWhiteSpace(displayType))
|
||||||
metadata.Metadata.Type = string.Format("{0}.{1}", metadata.Metadata.Type, displayType);
|
metadata.Metadata.Type = string.Format("{0}.{1}", metadata.Metadata.Type, displayType);
|
||||||
var location = part.GetLocation(displayType);
|
var location = part.GetLocation(displayType);
|
||||||
|
@@ -5,7 +5,7 @@ using Orchard.Core.ContentsLocation.Models;
|
|||||||
namespace Orchard.Core.Contents.Drivers {
|
namespace Orchard.Core.Contents.Drivers {
|
||||||
public class ContentsDriver : ContentPartDriver<ContentPart> {
|
public class ContentsDriver : ContentPartDriver<ContentPart> {
|
||||||
protected override DriverResult Display(ContentPart part, string displayType, dynamic shapeHelper) {
|
protected override DriverResult Display(ContentPart part, string displayType, dynamic shapeHelper) {
|
||||||
var publish = shapeHelper.Contents_Publish(ContentPart: part);
|
var publish = shapeHelper.Parts_Contents_Publish(ContentPart: part);
|
||||||
if (!string.IsNullOrWhiteSpace(displayType))
|
if (!string.IsNullOrWhiteSpace(displayType))
|
||||||
publish.Metadata.Type = string.Format("{0}.{1}", publish.Metadata.Type, displayType);
|
publish.Metadata.Type = string.Format("{0}.{1}", publish.Metadata.Type, displayType);
|
||||||
var location = part.GetLocation(displayType, "Secondary", "5");
|
var location = part.GetLocation(displayType, "Secondary", "5");
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Orchard.ContentManagement;
|
using Orchard.ContentManagement;
|
||||||
using Orchard.ContentManagement.Drivers;
|
using Orchard.ContentManagement.Drivers;
|
||||||
@@ -23,7 +22,7 @@ namespace Orchard.Core.Localization.Drivers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override DriverResult Display(LocalizationPart part, string displayType, dynamic shapeHelper) {
|
protected override DriverResult Display(LocalizationPart part, string displayType, dynamic shapeHelper) {
|
||||||
var contentTranslations = shapeHelper.Localization_ContentTranslations(ContentPart: part, Localizations: GetDisplayLocalizations(part));
|
var contentTranslations = shapeHelper.Parts_Localization_ContentTranslations(ContentPart: part, Localizations: GetDisplayLocalizations(part));
|
||||||
if (!string.IsNullOrWhiteSpace(displayType))
|
if (!string.IsNullOrWhiteSpace(displayType))
|
||||||
contentTranslations.Metadata.Type = string.Format("{0}.{1}", contentTranslations.Metadata.Type, displayType);
|
contentTranslations.Metadata.Type = string.Format("{0}.{1}", contentTranslations.Metadata.Type, displayType);
|
||||||
var location = part.GetLocation(displayType);
|
var location = part.GetLocation(displayType);
|
||||||
|
@@ -254,12 +254,12 @@
|
|||||||
<Content Include="Common\Views\DefinitionTemplates\BodyTypePartSettings.cshtml" />
|
<Content Include="Common\Views\DefinitionTemplates\BodyTypePartSettings.cshtml" />
|
||||||
<Content Include="Common\Views\DefinitionTemplates\BodyPartSettings.cshtml" />
|
<Content Include="Common\Views\DefinitionTemplates\BodyPartSettings.cshtml" />
|
||||||
<Content Include="Common\Views\DisplayTemplates\Fields\Common.TextField.cshtml" />
|
<Content Include="Common\Views\DisplayTemplates\Fields\Common.TextField.cshtml" />
|
||||||
<Content Include="Common\Views\Common.Body.SummaryAdmin.cshtml" />
|
<Content Include="Common\Views\Parts\Common.Body.SummaryAdmin.cshtml" />
|
||||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.Manage.SummaryAdmin.cshtml" />
|
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.Manage.SummaryAdmin.cshtml" />
|
||||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPost.SummaryAdmin.cshtml" />
|
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPost.SummaryAdmin.cshtml" />
|
||||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPre.SummaryAdmin.cshtml" />
|
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPre.SummaryAdmin.cshtml" />
|
||||||
<Content Include="Common\Views\Common.Metadata.cshtml" />
|
<Content Include="Common\Views\Parts\Common.Metadata.cshtml" />
|
||||||
<Content Include="Common\Views\Common.Metadata.SummaryAdmin.cshtml" />
|
<Content Include="Common\Views\Parts\Common.Metadata.SummaryAdmin.cshtml" />
|
||||||
<Content Include="ContentsLocation\Module.txt" />
|
<Content Include="ContentsLocation\Module.txt" />
|
||||||
<Content Include="ContentsLocation\Styles\admin.css" />
|
<Content Include="ContentsLocation\Styles\admin.css" />
|
||||||
<Content Include="ContentsLocation\Views\DefinitionTemplates\LocationSettings.cshtml" />
|
<Content Include="ContentsLocation\Views\DefinitionTemplates\LocationSettings.cshtml" />
|
||||||
@@ -268,8 +268,8 @@
|
|||||||
<Content Include="Contents\Views\Admin\List.cshtml" />
|
<Content Include="Contents\Views\Admin\List.cshtml" />
|
||||||
<Content Include="Feeds\Views\Feed.cshtml" />
|
<Content Include="Feeds\Views\Feed.cshtml" />
|
||||||
<Content Include="Localization\Views\EditorTemplates\Parts\Localization.Translation.cshtml" />
|
<Content Include="Localization\Views\EditorTemplates\Parts\Localization.Translation.cshtml" />
|
||||||
<Content Include="Contents\Views\Contents.Publish.cshtml" />
|
<Content Include="Contents\Views\Parts\Contents.Publish.cshtml" />
|
||||||
<Content Include="Contents\Views\Contents.Publish.SummaryAdmin.cshtml" />
|
<Content Include="Contents\Views\Parts\Contents.Publish.SummaryAdmin.cshtml" />
|
||||||
<Content Include="Messaging\Module.txt" />
|
<Content Include="Messaging\Module.txt" />
|
||||||
<Content Include="Messaging\Views\EditorTemplates\Parts\Messaging.MessageSettings.cshtml" />
|
<Content Include="Messaging\Views\EditorTemplates\Parts\Messaging.MessageSettings.cshtml" />
|
||||||
<Content Include="PublishLater\Content\Admin\images\draft.gif" />
|
<Content Include="PublishLater\Content\Admin\images\draft.gif" />
|
||||||
@@ -277,8 +277,8 @@
|
|||||||
<Content Include="PublishLater\Content\Admin\images\online.gif" />
|
<Content Include="PublishLater\Content\Admin\images\online.gif" />
|
||||||
<Content Include="PublishLater\Content\Admin\images\published.gif" />
|
<Content Include="PublishLater\Content\Admin\images\published.gif" />
|
||||||
<Content Include="PublishLater\Content\Admin\images\scheduled.gif" />
|
<Content Include="PublishLater\Content\Admin\images\scheduled.gif" />
|
||||||
<Content Include="PublishLater\Views\PublishLater.Metadata.cshtml" />
|
<Content Include="PublishLater\Views\Parts\PublishLater.Metadata.cshtml" />
|
||||||
<Content Include="PublishLater\Views\PublishLater.Metadata.SummaryAdmin.cshtml" />
|
<Content Include="PublishLater\Views\Parts\PublishLater.Metadata.SummaryAdmin.cshtml" />
|
||||||
<Content Include="Common\Views\EditorTemplates\Fields\Common.TextField.cshtml" />
|
<Content Include="Common\Views\EditorTemplates\Fields\Common.TextField.cshtml" />
|
||||||
<Content Include="Common\Views\EditorTemplates\Parts\Common.Container.cshtml" />
|
<Content Include="Common\Views\EditorTemplates\Parts\Common.Container.cshtml" />
|
||||||
<Content Include="Common\Views\EditorTemplates\PlainTextEditor.cshtml" />
|
<Content Include="Common\Views\EditorTemplates\PlainTextEditor.cshtml" />
|
||||||
@@ -286,8 +286,8 @@
|
|||||||
<Content Include="Contents\Views\Admin\CreatableTypeList.cshtml" />
|
<Content Include="Contents\Views\Admin\CreatableTypeList.cshtml" />
|
||||||
<Content Include="Localization\Styles\admin.css" />
|
<Content Include="Localization\Styles\admin.css" />
|
||||||
<Content Include="Localization\Styles\base.css" />
|
<Content Include="Localization\Styles\base.css" />
|
||||||
<Content Include="Localization\Views\Localization.ContentTranslations.Summary.cshtml" />
|
<Content Include="Localization\Views\Parts\Localization.ContentTranslations.Summary.cshtml" />
|
||||||
<Content Include="Localization\Views\Localization.ContentTranslations.cshtml" />
|
<Content Include="Localization\Views\Parts\Localization.ContentTranslations.cshtml" />
|
||||||
<Content Include="PublishLater\Module.txt" />
|
<Content Include="PublishLater\Module.txt" />
|
||||||
<Content Include="PublishLater\Styles\datetime.css" />
|
<Content Include="PublishLater\Styles\datetime.css" />
|
||||||
<Content Include="PublishLater\Views\EditorTemplates\Parts\PublishLater.cshtml" />
|
<Content Include="PublishLater\Views\EditorTemplates\Parts\PublishLater.cshtml" />
|
||||||
@@ -296,7 +296,7 @@
|
|||||||
<Content Include="Reports\Views\Admin\Index.cshtml" />
|
<Content Include="Reports\Views\Admin\Index.cshtml" />
|
||||||
<Content Include="Localization\Module.txt" />
|
<Content Include="Localization\Module.txt" />
|
||||||
<Content Include="Localization\Views\Admin\Translate.cshtml" />
|
<Content Include="Localization\Views\Admin\Translate.cshtml" />
|
||||||
<Content Include="Localization\Views\Localization.ContentTranslations.SummaryAdmin.cshtml" />
|
<Content Include="Localization\Views\Parts\Localization.ContentTranslations.SummaryAdmin.cshtml" />
|
||||||
<Content Include="Localization\Views\CultureSelection.cshtml" />
|
<Content Include="Localization\Views\CultureSelection.cshtml" />
|
||||||
<Content Include="Routable\Module.txt" />
|
<Content Include="Routable\Module.txt" />
|
||||||
<Content Include="Routable\Scripts\jquery.slugify.js" />
|
<Content Include="Routable\Scripts\jquery.slugify.js" />
|
||||||
@@ -345,7 +345,7 @@
|
|||||||
<Content Include="Common\Views\Web.config" />
|
<Content Include="Common\Views\Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Common\Views\Common.Body.cshtml" />
|
<Content Include="Common\Views\Parts\Common.Body.cshtml" />
|
||||||
<Content Include="Common\Views\EditorTemplates\Parts\Common.Body.cshtml" />
|
<Content Include="Common\Views\EditorTemplates\Parts\Common.Body.cshtml" />
|
||||||
<Content Include="Common\Views\EditorTemplates\Parts\Common.Owner.cshtml" />
|
<Content Include="Common\Views\EditorTemplates\Parts\Common.Owner.cshtml" />
|
||||||
<Content Include="Feeds\Module.txt" />
|
<Content Include="Feeds\Module.txt" />
|
||||||
@@ -361,7 +361,7 @@
|
|||||||
<Content Include="Navigation\Views\Web.config" />
|
<Content Include="Navigation\Views\Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Common\Views\Common.Body.Summary.cshtml" />
|
<Content Include="Common\Views\Parts\Common.Body.Summary.cshtml" />
|
||||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPost.cshtml" />
|
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPost.cshtml" />
|
||||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPre.cshtml" />
|
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPre.cshtml" />
|
||||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.Manage.cshtml" />
|
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.Manage.cshtml" />
|
||||||
@@ -390,7 +390,7 @@
|
|||||||
<Content Include="Shapes\Views\MenuItem.cshtml" />
|
<Content Include="Shapes\Views\MenuItem.cshtml" />
|
||||||
<Content Include="Shapes\Views\Web.config" />
|
<Content Include="Shapes\Views\Web.config" />
|
||||||
<Content Include="Dashboard\Views\Helper\Index.cshtml" />
|
<Content Include="Dashboard\Views\Helper\Index.cshtml" />
|
||||||
<Content Include="Routable\Views\Routable.RoutePart.cshtml" />
|
<Content Include="Routable\Views\Parts\Routable.RoutePart.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||||
|
@@ -28,7 +28,7 @@ namespace Orchard.Core.PublishLater.Drivers {
|
|||||||
public IOrchardServices Services { get; set; }
|
public IOrchardServices Services { get; set; }
|
||||||
|
|
||||||
protected override DriverResult Display(PublishLaterPart part, string displayType, dynamic shapeHelper) {
|
protected override DriverResult Display(PublishLaterPart part, string displayType, dynamic shapeHelper) {
|
||||||
var metadata = shapeHelper.PublishLater_Metadata(ContentPart: part, ScheduledPublishUtc: part.ScheduledPublishUtc.Value);
|
var metadata = shapeHelper.Parts_PublishLater_Metadata(ContentPart: part, ScheduledPublishUtc: part.ScheduledPublishUtc.Value);
|
||||||
if (!string.IsNullOrWhiteSpace(displayType))
|
if (!string.IsNullOrWhiteSpace(displayType))
|
||||||
metadata.Metadata.Type = string.Format("{0}.{1}", metadata.Metadata.Type, displayType);
|
metadata.Metadata.Type = string.Format("{0}.{1}", metadata.Metadata.Type, displayType);
|
||||||
var location = part.GetLocation(displayType);
|
var location = part.GetLocation(displayType);
|
||||||
|
@@ -45,7 +45,7 @@ namespace Orchard.Core.Routable.Drivers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override DriverResult Display(RoutePart part, string displayType, dynamic shapeHelper) {
|
protected override DriverResult Display(RoutePart part, string displayType, dynamic shapeHelper) {
|
||||||
var routePart = shapeHelper.Routable_RoutePart(ContentPart: part, Title: part.Title);
|
var routePart = shapeHelper.Parts_Routable_RoutePart(ContentPart: part, Title: part.Title);
|
||||||
if (!string.IsNullOrWhiteSpace(displayType))
|
if (!string.IsNullOrWhiteSpace(displayType))
|
||||||
routePart.Metadata.Type = string.Format("{0}.{1}", routePart.Metadata.Type, displayType);
|
routePart.Metadata.Type = string.Format("{0}.{1}", routePart.Metadata.Type, displayType);
|
||||||
var location = part.GetLocation(displayType, "Header", "5");
|
var location = part.GetLocation(displayType, "Header", "5");
|
||||||
|
@@ -29,7 +29,7 @@ namespace ArchiveLater.Drivers {
|
|||||||
public IOrchardServices Services { get; set; }
|
public IOrchardServices Services { get; set; }
|
||||||
|
|
||||||
protected override DriverResult Display(ArchiveLaterPart part, string displayType, dynamic shapeHelper) {
|
protected override DriverResult Display(ArchiveLaterPart part, string displayType, dynamic shapeHelper) {
|
||||||
var metadata = shapeHelper.ArchiveLater_Metadata(ContentPart: part, ScheduledArchiveUtc: part.ScheduledArchiveUtc.Value);
|
var metadata = shapeHelper.Parts_ArchiveLater_Metadata(ContentPart: part, ScheduledArchiveUtc: part.ScheduledArchiveUtc.Value);
|
||||||
if (!string.IsNullOrWhiteSpace(displayType))
|
if (!string.IsNullOrWhiteSpace(displayType))
|
||||||
metadata.Metadata.Type = string.Format("{0}.{1}", metadata.Metadata.Type, displayType);
|
metadata.Metadata.Type = string.Format("{0}.{1}", metadata.Metadata.Type, displayType);
|
||||||
var location = part.GetLocation(displayType);
|
var location = part.GetLocation(displayType);
|
||||||
|
@@ -98,8 +98,8 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\ArchiveLater.Metadata.cshtml" />
|
<Content Include="Views\Parts\ArchiveLater.Metadata.cshtml" />
|
||||||
<Content Include="Views\ArchiveLater.Metadata.SummaryAdmin.cshtml" />
|
<Content Include="Views\Parts\ArchiveLater.Metadata.SummaryAdmin.cshtml" />
|
||||||
<Content Include="Views\EditorTemplates\Parts\ArchiveLater.cshtml" />
|
<Content Include="Views\EditorTemplates\Parts\ArchiveLater.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
|
@@ -37,20 +37,20 @@ namespace Orchard.Blogs.Drivers {
|
|||||||
protected override DriverResult Display(BlogPart part, string displayType, dynamic shapeHelper) {
|
protected override DriverResult Display(BlogPart part, string displayType, dynamic shapeHelper) {
|
||||||
var driverResults = new List<DriverResult>();
|
var driverResults = new List<DriverResult>();
|
||||||
|
|
||||||
var metadata = shapeHelper.Blogs_Blog_Manage(ContentPart: part);
|
var metadata = shapeHelper.Parts_Blogs_Blog_Manage(ContentPart: part);
|
||||||
metadata.Metadata.Type = "Blogs_Blog.Manage";
|
metadata.Metadata.Type = "Parts_Blogs_Blog.Manage";
|
||||||
driverResults.Add(ContentShape(metadata).Location("manage"));
|
driverResults.Add(ContentShape(metadata).Location("manage"));
|
||||||
|
|
||||||
var description = shapeHelper.Blogs_Blog_Description(ContentPart: part);
|
var description = shapeHelper.Parts_Blogs_Blog_Description(ContentPart: part);
|
||||||
description.Metadata.Type = "Blogs_Blog.Description";
|
description.Metadata.Type = "Parts_Blogs_Blog.Description";
|
||||||
driverResults.Add(ContentShape(description).Location("manage", "after"));
|
driverResults.Add(ContentShape(description).Location("manage", "after"));
|
||||||
|
|
||||||
if (displayType.StartsWith("Admin")) {
|
if (displayType.StartsWith("Admin")) {
|
||||||
var list = shapeHelper.List();
|
var list = shapeHelper.List();
|
||||||
list.AddRange(_blogPostService.Get(part, VersionOptions.Latest)
|
list.AddRange(_blogPostService.Get(part, VersionOptions.Latest)
|
||||||
.Select(bp => _contentManager.BuildDisplay(bp, "SummaryAdmin.BlogPost")));
|
.Select(bp => _contentManager.BuildDisplay(bp, "SummaryAdmin.BlogPost")));
|
||||||
var blogPostList = shapeHelper.Blogs_BlogPost_List(ContentPart: part, BlogPosts: list);
|
var blogPostList = shapeHelper.Parts_Blogs_BlogPost_List(ContentPart: part, BlogPosts: list);
|
||||||
blogPostList.Metadata.Type = "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);
|
||||||
}
|
}
|
||||||
@@ -58,8 +58,8 @@ namespace Orchard.Blogs.Drivers {
|
|||||||
var list = shapeHelper.List();
|
var list = shapeHelper.List();
|
||||||
list.AddRange(_blogPostService.Get(part)
|
list.AddRange(_blogPostService.Get(part)
|
||||||
.Select(bp => _contentManager.BuildDisplay(bp, "Summary.BlogPost")));
|
.Select(bp => _contentManager.BuildDisplay(bp, "Summary.BlogPost")));
|
||||||
var blogPostList = shapeHelper.Blogs_BlogPost_List(ContentPart: part, BlogPosts: list);
|
var blogPostList = shapeHelper.Parts_Blogs_BlogPost_List(ContentPart: part, BlogPosts: list);
|
||||||
blogPostList.Metadata.Type = "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);
|
||||||
|
|
||||||
|
@@ -122,12 +122,12 @@
|
|||||||
<Content Include="Views\BlogPost\ListByArchive.cshtml" />
|
<Content Include="Views\BlogPost\ListByArchive.cshtml" />
|
||||||
<Content Include="Views\Blog\Item.cshtml" />
|
<Content Include="Views\Blog\Item.cshtml" />
|
||||||
<Content Include="Views\Blog\List.cshtml" />
|
<Content Include="Views\Blog\List.cshtml" />
|
||||||
<Content Include="Views\Blogs.Blog.Manage.cshtml" />
|
<Content Include="Views\Parts\Blogs.Blog.Manage.cshtml" />
|
||||||
<Content Include="Views\Blogs.Blog.Description.cshtml" />
|
<Content Include="Views\Parts\Blogs.Blog.Description.cshtml" />
|
||||||
<Content Include="Views\Common.Metadata.Admin.Blog.cshtml" />
|
<Content Include="Views\Parts\Common.Metadata.Admin.Blog.cshtml" />
|
||||||
<Content Include="Views\Blogs.BlogPost.List.cshtml" />
|
<Content Include="Views\Parts\Blogs.BlogPost.List.cshtml" />
|
||||||
<Content Include="Views\EditorTemplates\Parts\Blogs.Blog.Fields.cshtml" />
|
<Content Include="Views\EditorTemplates\Parts\Blogs.Blog.Fields.cshtml" />
|
||||||
<Content Include="Views\Blogs.BlogPost.List.Admin.cshtml">
|
<Content Include="Views\Parts\Blogs.BlogPost.List.Admin.cshtml">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="Views\Items\Content.Admin.Blog.cshtml" />
|
<Content Include="Views\Items\Content.Admin.Blog.cshtml" />
|
||||||
@@ -155,31 +155,31 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Common.Metadata.Blog.cshtml" />
|
<Content Include="Views\Parts\Common.Metadata.Blog.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Localization.ContentTranslations.Summary.BlogPost.cshtml" />
|
<Content Include="Views\Parts\Localization.ContentTranslations.Summary.BlogPost.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Common.Body.Summary.BlogPost.cshtml" />
|
<Content Include="Views\Parts\Common.Body.Summary.BlogPost.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Tags.ShowTags.Summary.BlogPost.cshtml" />
|
<Content Include="Views\Parts\Tags.ShowTags.Summary.BlogPost.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\PublishLater.Metadata.BlogPost.cshtml" />
|
<Content Include="Views\Parts\PublishLater.Metadata.BlogPost.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Common.Metadata.BlogPost.cshtml" />
|
<Content Include="Views\Parts\Common.Metadata.BlogPost.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Localization.ContentTranslations.BlogPost.cshtml" />
|
<Content Include="Views\Parts\Localization.ContentTranslations.BlogPost.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Common.Body.BlogPost.cshtml" />
|
<Content Include="Views\Parts\Common.Body.BlogPost.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Tags.ShowTags.BlogPost.cshtml" />
|
<Content Include="Views\Parts\Tags.ShowTags.BlogPost.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||||
|
@@ -20,9 +20,9 @@ namespace Orchard.Comments.Drivers {
|
|||||||
int pendingCount = parts.Aggregate(0, (seed, item) => seed + (item.Has<CommentsPart>() ? item.As<CommentsPart>().PendingComments.Count : 0));
|
int pendingCount = parts.Aggregate(0, (seed, item) => seed + (item.Has<CommentsPart>() ? item.As<CommentsPart>().PendingComments.Count : 0));
|
||||||
|
|
||||||
if (displayType == "SummaryAdmin")
|
if (displayType == "SummaryAdmin")
|
||||||
return ContentShape(shapeHelper.Comments_CountAdmin(ContentPart: part, CommentCount: count, PendingCount: pendingCount)).Location(part.GetLocation("SummaryAdmin"));
|
return ContentShape(shapeHelper.Parts_Comments_CountAdmin(ContentPart: part, CommentCount: count, PendingCount: pendingCount)).Location(part.GetLocation("SummaryAdmin"));
|
||||||
|
|
||||||
return ContentShape(shapeHelper.Comments_Count(ContentPart: part, CommentCount: count, PendingCount: pendingCount)).Location(part.GetLocation("Summary"));
|
return ContentShape(shapeHelper.Parts_Comments_Count(ContentPart: part, CommentCount: count, PendingCount: pendingCount)).Location(part.GetLocation("Summary"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@@ -12,17 +12,17 @@ namespace Orchard.Comments.Drivers {
|
|||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (displayType.StartsWith("Detail"))
|
if (displayType.StartsWith("Detail"))
|
||||||
return ContentShape(shapeHelper.Comments_Comments(ContentPart: part)).Location(part.GetLocation("Detail"));
|
return ContentShape(shapeHelper.Parts_Comments_Comments(ContentPart: part)).Location(part.GetLocation("Detail"));
|
||||||
|
|
||||||
if (displayType == "SummaryAdmin")
|
if (displayType == "SummaryAdmin")
|
||||||
return ContentShape(shapeHelper.Comments_CountAdmin(ContentPart: part, CommentCount: part.Comments.Count, PendingCount: part.PendingComments.Count))
|
return ContentShape(shapeHelper.Parts_Comments_CountAdmin(ContentPart: part, CommentCount: part.Comments.Count, PendingCount: part.PendingComments.Count))
|
||||||
.Location(part.GetLocation("SummaryAdmin"));
|
.Location(part.GetLocation("SummaryAdmin"));
|
||||||
|
|
||||||
var location = displayType.Contains("Summary")
|
var location = displayType.Contains("Summary")
|
||||||
? part.GetLocation("Summary")
|
? part.GetLocation("Summary")
|
||||||
: part.GetLocation(displayType);
|
: part.GetLocation(displayType);
|
||||||
|
|
||||||
return ContentShape(shapeHelper.Comments_Count(ContentPart: part, CommentCount: part.Comments.Count, PendingCount: part.PendingComments.Count))
|
return ContentShape(shapeHelper.Parts_Comments_Count(ContentPart: part, CommentCount: part.Comments.Count, PendingCount: part.PendingComments.Count))
|
||||||
.Location(location);
|
.Location(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -127,9 +127,9 @@
|
|||||||
<Content Include="Views\Admin\Details.cshtml" />
|
<Content Include="Views\Admin\Details.cshtml" />
|
||||||
<Content Include="Views\Admin\Edit.cshtml" />
|
<Content Include="Views\Admin\Edit.cshtml" />
|
||||||
<Content Include="Views\Admin\Index.cshtml" />
|
<Content Include="Views\Admin\Index.cshtml" />
|
||||||
<Content Include="Views\Comments.Comments.cshtml" />
|
<Content Include="Views\Parts\Comments.Comments.cshtml" />
|
||||||
<Content Include="Views\Comments.Count.cshtml" />
|
<Content Include="Views\Parts\Comments.Count.cshtml" />
|
||||||
<Content Include="Views\Comments.CountAdmin.cshtml" />
|
<Content Include="Views\Parts\Comments.CountAdmin.cshtml" />
|
||||||
<Content Include="Views\EditorTemplates\Parts\Comments.Comments.cshtml" />
|
<Content Include="Views\EditorTemplates\Parts\Comments.Comments.cshtml" />
|
||||||
<Content Include="Views\EditorTemplates\Parts\Comments.SiteSettings.cshtml" />
|
<Content Include="Views\EditorTemplates\Parts\Comments.SiteSettings.cshtml" />
|
||||||
<Content Include="Views\ListOfComments.cshtml" />
|
<Content Include="Views\ListOfComments.cshtml" />
|
||||||
|
@@ -24,7 +24,7 @@ namespace Orchard.Tags.Drivers {
|
|||||||
public virtual IUser CurrentUser { get; set; }
|
public virtual IUser CurrentUser { get; set; }
|
||||||
|
|
||||||
protected override DriverResult Display(TagsPart part, string displayType, dynamic shapeHelper) {
|
protected override DriverResult Display(TagsPart part, string displayType, dynamic shapeHelper) {
|
||||||
var showTags = shapeHelper.Tags_ShowTags(ContentPart: part, Tags: part.CurrentTags);
|
var showTags = shapeHelper.Parts_Tags_ShowTags(ContentPart: part, Tags: part.CurrentTags);
|
||||||
if (!string.IsNullOrWhiteSpace(displayType))
|
if (!string.IsNullOrWhiteSpace(displayType))
|
||||||
showTags.Metadata.Type = string.Format("{0}.{1}", showTags.Metadata.Type, displayType);
|
showTags.Metadata.Type = string.Format("{0}.{1}", showTags.Metadata.Type, displayType);
|
||||||
var location = part.GetLocation(displayType);
|
var location = part.GetLocation(displayType);
|
||||||
|
@@ -97,7 +97,7 @@
|
|||||||
<Content Include="Views\Admin\Edit.cshtml" />
|
<Content Include="Views\Admin\Edit.cshtml" />
|
||||||
<Content Include="Views\Admin\Index.cshtml" />
|
<Content Include="Views\Admin\Index.cshtml" />
|
||||||
<Content Include="Views\Admin\Search.cshtml" />
|
<Content Include="Views\Admin\Search.cshtml" />
|
||||||
<Content Include="Views\Tags.ShowTags.cshtml" />
|
<Content Include="Views\Parts\Tags.ShowTags.cshtml" />
|
||||||
<Content Include="Views\EditorTemplates\Parts\Tags.EditTags.cshtml" />
|
<Content Include="Views\EditorTemplates\Parts\Tags.EditTags.cshtml" />
|
||||||
<Content Include="Views\Home\Index.cshtml" />
|
<Content Include="Views\Home\Index.cshtml" />
|
||||||
<Content Include="Views\Home\Search.cshtml" />
|
<Content Include="Views\Home\Search.cshtml" />
|
||||||
|
@@ -40,4 +40,7 @@
|
|||||||
<div id="footer" role="contentinfo">
|
<div id="footer" role="contentinfo">
|
||||||
@Display(Model.Footer)</div>
|
@Display(Model.Footer)</div>
|
||||||
|
|
||||||
|
@* tmp *@
|
||||||
|
<div style="background:#666;color:#daf2f6;margin:10px;padding:10px;font:12px/18px Consolas,'Lucida Console','Bitstream Vera Sans Mono','DejaVu Sans Mono',monospace;">
|
||||||
@Display.DumpShapeTable()
|
@Display.DumpShapeTable()
|
||||||
|
</div>
|
Reference in New Issue
Block a user