Getting the live writer link tags for Blogs (back up and) under the Remote Blog Publishing feature

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-10-18 15:00:19 -07:00
parent 92916c66dd
commit f79e2b6f9c
6 changed files with 21 additions and 22 deletions

View File

@@ -0,0 +1,14 @@
using JetBrains.Annotations;
using Orchard.Blogs.Models;
using Orchard.ContentManagement.Drivers;
using Orchard.Environment.Extensions;
namespace Orchard.Blogs.Drivers {
[UsedImplicitly]
[OrchardFeature("Orchard.Blogs.RemotePublishing")]
public class RemoteBlogPublishingDriver : ContentPartDriver<BlogPart> {
protected override DriverResult Display(BlogPart part, string displayType, dynamic shapeHelper) {
return ContentShape("Parts_Blogs_RemotePublishing", shape => shape.Slug(part.Slug));
}
}
}

View File

@@ -69,6 +69,7 @@
<Compile Include="AdminMenu.cs" />
<Compile Include="Drivers\BlogArchivesPartDriver.cs" />
<Compile Include="Drivers\BlogPagerPartDriver.cs" />
<Compile Include="Drivers\RemoteBlogPublishingDriver.cs" />
<Compile Include="Drivers\RecentBlogPostsPartDriver.cs" />
<Compile Include="Handlers\BlogArchivesPartHandler.cs" />
<Compile Include="Handlers\RecentBlogPostsPartHandler.cs" />
@@ -108,7 +109,6 @@
<Compile Include="Services\IBlogPostService.cs" />
<Compile Include="Services\IBlogService.cs" />
<Compile Include="Services\XmlRpcHandler.cs" />
<Compile Include="RemoteBlogPublishingShapes.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Content\Admin\images\draft.gif" />
@@ -156,7 +156,7 @@
<None Include="Placement.info">
<SubType>Designer</SubType>
</None>
<Content Include="Views\RemoteBlogPublishing.cshtml" />
<Content Include="Views\Parts\Blogs.RemotePublishing.cshtml" />
<Content Include="Views\Parts\Blogs.BlogArchives.cshtml" />
<Content Include="Views\EditorTemplates\Parts\Blogs.RecentBlogPosts.cshtml" />
<Content Include="Views\EditorTemplates\Parts\Blogs.BlogArchives.cshtml" />

View File

@@ -20,8 +20,10 @@
<Match ContentType="Blog">
<Match DisplayType="Detail">
<!-- blog posts currently added to the blog within the controller into Content:5 <Place Parts_Blogs_BlogPost_List="Content:5" />-->
<!-- Parts_Blogs_RemotePublishing is made available with the "Remote Blog Publishing" feature -->
<Place Parts_Blogs_Blog_Pager="Content:after"
Parts_Blogs_Blog_Description="Content:before" />
Parts_Blogs_Blog_Description="Content:before"
Parts_Blogs_RemotePublishing="Content"/>
</Match>
<Match DisplayType="DetailAdmin">
<Place Parts_Blogs_BlogPost_List_Admin="Content:5"

View File

@@ -1,16 +0,0 @@
using Orchard.DisplayManagement.Descriptors;
using Orchard.Environment.Extensions;
namespace Orchard.Blogs {
[OrchardFeature("Remote Blog Publishing")]
public class RemoteBlogPublishingShapes : IShapeTableProvider {
public void Discover(ShapeTableBuilder builder) {
builder.Describe("Content__Blog")
.OnDisplaying(displaying => {
if (displaying.ShapeMetadata.DisplayType == "Detail") {
displaying.ShapeMetadata.Wrappers.Add("RemoteBlogPublishing");
}
});
}
}
}

View File

@@ -19,7 +19,7 @@ using Orchard.Blogs.Extensions;
namespace Orchard.Blogs.Services {
[UsedImplicitly]
[OrchardFeature("Remote Blog Publishing")]
[OrchardFeature("Orchard.Blogs.RemotePublishing")]
public class XmlRpcHandler : IXmlRpcHandler {
private readonly IBlogService _blogService;
private readonly IBlogPostService _blogPostService;

View File

@@ -4,4 +4,3 @@
RegisterLink(new LinkEntry { Rel = "wlwmanifest", Type = "application/wlwmanifest+xml", Href = Url.BlogLiveWriterManifest((string)Model.Slug) });
RegisterLink(new LinkEntry { Rel = "EditURI", Type = "application/rsd+xml", Title = "RSD", Href = Url.BlogRsd((string)Model.Slug) });
}
@Display.PlaceChildContent(Source: Model)