diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs index 922f4584a..552ae02a8 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs @@ -35,7 +35,7 @@ namespace Orchard.Blogs.Controllers { if (!Services.Authorizer.Authorize(Permissions.ManageBlogs, T("Not allowed to create blogs"))) return new HttpUnauthorizedResult(); - var blog = Services.ContentManager.New(BlogDriver.ContentType.Name); + var blog = Services.ContentManager.New(BlogPartDriver.ContentType.Name); if (blog == null) return new NotFoundResult(); @@ -52,7 +52,7 @@ namespace Orchard.Blogs.Controllers { if (!Services.Authorizer.Authorize(Permissions.ManageBlogs, T("Couldn't create blog"))) return new HttpUnauthorizedResult(); - model.Blog = Services.ContentManager.UpdateEditorModel(Services.ContentManager.New(BlogDriver.ContentType.Name), this); + model.Blog = Services.ContentManager.UpdateEditorModel(Services.ContentManager.New(BlogPartDriver.ContentType.Name), this); if (!ModelState.IsValid) return View(model); @@ -116,12 +116,12 @@ namespace Orchard.Blogs.Controllers { return new HttpUnauthorizedResult(); //TODO: (erikpo) Move looking up the current blog up into a modelbinder - Blog blog = _blogService.Get(blogSlug); + BlogPart blogPart = _blogService.Get(blogSlug); - if (blog == null) + if (blogPart == null) return new NotFoundResult(); - _blogService.Delete(blog); + _blogService.Delete(blogPart); Services.Notifier.Information(T("Blog was successfully deleted")); @@ -141,14 +141,14 @@ namespace Orchard.Blogs.Controllers { //TODO: (erikpo) Should move the slug parameter and get call and null check up into a model binder public ActionResult Item(string blogSlug) { - Blog blog = _blogService.Get(blogSlug); + BlogPart blogPart = _blogService.Get(blogSlug); - if (blog == null) + if (blogPart == null) return new NotFoundResult(); //TODO: (erikpo) Need to make templatePath be more convention based so if my controller name has "Admin" in it then "Admin/{type}" is assumed var model = new BlogForAdminViewModel { - Blog = Services.ContentManager.BuildDisplayModel(blog, "DetailAdmin") + Blog = Services.ContentManager.BuildDisplayModel(blogPart, "DetailAdmin") }; return View(model); diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogController.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogController.cs index c0aad6773..0f3487d9e 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogController.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogController.cs @@ -61,9 +61,9 @@ namespace Orchard.Blogs.Controllers { public ActionResult LiveWriterManifest(string blogSlug) { Logger.Debug("Live Writer Manifest requested"); - Blog blog = _blogService.Get(blogSlug); + BlogPart blogPart = _blogService.Get(blogSlug); - if (blog == null) + if (blogPart == null) return new NotFoundResult(); const string manifestUri = "http://schemas.microsoft.com/wlw/manifest/weblog"; @@ -86,9 +86,9 @@ namespace Orchard.Blogs.Controllers { public ActionResult Rsd(string blogSlug) { Logger.Debug("RSD requested"); - Blog blog = _blogService.Get(blogSlug); + BlogPart blogPart = _blogService.Get(blogSlug); - if (blog == null) + if (blogPart == null) return new NotFoundResult(); const string manifestUri = "http://archipelago.phrasewise.com/rsd"; @@ -106,7 +106,7 @@ namespace Orchard.Blogs.Controllers { new XAttribute("name", "MetaWeblog"), new XAttribute("preferred", true), new XAttribute("apiLink", url), - new XAttribute("blogID", blog.Id)))); + new XAttribute("blogID", blogPart.Id)))); var doc = new XDocument(new XElement( XName.Get("rsd", manifestUri), diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs index c675a6469..3a3189042 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs @@ -31,9 +31,9 @@ namespace Orchard.Blogs.Controllers { if (!Services.Authorizer.Authorize(Permissions.EditBlogPost, T("Not allowed to create blog post"))) return new HttpUnauthorizedResult(); - var blogPost = Services.ContentManager.New(BlogPostDriver.ContentType.Name); + var blogPost = Services.ContentManager.New(BlogPostDriver.ContentType.Name); - if (blogPost.Blog == null) + if (blogPost.BlogPart == null) return new NotFoundResult(); var model = new CreateBlogPostViewModel { @@ -48,9 +48,9 @@ namespace Orchard.Blogs.Controllers { if (!Services.Authorizer.Authorize(Permissions.EditBlogPost, T("Couldn't create blog post"))) return new HttpUnauthorizedResult(); - var blogPost = Services.ContentManager.New(BlogPostDriver.ContentType.Name); + var blogPost = Services.ContentManager.New(BlogPostDriver.ContentType.Name); - if (blogPost.Blog == null) + if (blogPost.BlogPart == null) return new NotFoundResult(); Services.ContentManager.Create(blogPost, VersionOptions.Draft); @@ -142,13 +142,13 @@ namespace Orchard.Blogs.Controllers { } ActionResult RedirectToEdit(int id) { - return RedirectToEdit(Services.ContentManager.GetLatest(id)); + return RedirectToEdit(Services.ContentManager.GetLatest(id)); } ActionResult RedirectToEdit(IContent item) { - if (item == null || item.As() == null) + if (item == null || item.As() == null) return new NotFoundResult(); - return RedirectToAction("Edit", new { BlogSlug = item.As().Blog.Slug, PostId = item.ContentItem.Id }); + return RedirectToAction("Edit", new { BlogSlug = item.As().BlogPart.Slug, PostId = item.ContentItem.Id }); } [ValidateAntiForgeryTokenOrchard] diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostController.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostController.cs index 33b36bfb3..e98a09fad 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostController.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostController.cs @@ -37,43 +37,43 @@ namespace Orchard.Blogs.Controllers { return new HttpUnauthorizedResult(); //TODO: (erikpo) Move looking up the current blog up into a modelbinder - Blog blog = _blogService.Get(blogSlug); + BlogPart blogPart = _blogService.Get(blogSlug); - if (blog == null) + if (blogPart == null) return new NotFoundResult(); //TODO: (erikpo) Look up the current user and their permissions to this blog post and determine if they should be able to view it or not. VersionOptions versionOptions = VersionOptions.Published; - BlogPost post = _blogPostService.Get(blog, postSlug, versionOptions); + BlogPostPart postPart = _blogPostService.Get(blogPart, postSlug, versionOptions); - if (post == null) + if (postPart == null) return new NotFoundResult(); var model = new BlogPostViewModel { - Blog = blog, - BlogPost = _services.ContentManager.BuildDisplayModel(post, "Detail") + BlogPart = blogPart, + BlogPost = _services.ContentManager.BuildDisplayModel(postPart, "Detail") }; - _feedManager.Register(blog); + _feedManager.Register(blogPart); return View(model); } public ActionResult ListByArchive(string blogSlug, string archiveData) { //TODO: (erikpo) Move looking up the current blog up into a modelbinder - Blog blog = _blogService.Get(blogSlug); + BlogPart blogPart = _blogService.Get(blogSlug); - if (blog == null) + if (blogPart == null) return new NotFoundResult(); var archive = new ArchiveData(archiveData); var model = new BlogPostArchiveViewModel { - Blog = blog, + BlogPart = blogPart, ArchiveData = archive, - BlogPosts = _blogPostService.Get(blog, archive).Select(b => _services.ContentManager.BuildDisplayModel(b, "Summary")) + BlogPosts = _blogPostService.Get(blogPart, archive).Select(b => _services.ContentManager.BuildDisplayModel(b, "Summary")) }; - _feedManager.Register(blog); + _feedManager.Register(blogPart); return View(model); } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/DataMigrations/BlogsDataMigration.cs b/src/Orchard.Web/Modules/Orchard.Blogs/DataMigrations/BlogsDataMigration.cs index a8207e59b..d0b0527b1 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/DataMigrations/BlogsDataMigration.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/DataMigrations/BlogsDataMigration.cs @@ -9,17 +9,17 @@ namespace Orchard.Blogs.DataMigrations { public class BlogsDataMigration : DataMigrationImpl { public int Create() { - //CREATE TABLE Orchard_Blogs_BlogArchiveRecord (Id integer, Year INTEGER, Month INTEGER, PostCount INTEGER, Blog_id INTEGER, primary key (Id)); - SchemaBuilder.CreateTable("BlogArchiveRecord", table => table + //CREATE TABLE Orchard_Blogs_BlogPartArchiveRecord (Id integer, Year INTEGER, Month INTEGER, PostCount INTEGER, Blog_id INTEGER, primary key (Id)); + SchemaBuilder.CreateTable("BlogPartArchiveRecord", table => table .Column("Id", column => column.PrimaryKey().Identity()) .Column("Year") .Column("Month") .Column("PostCount") - .Column("Blog_id") + .Column("BlogPart_id") ); - //CREATE TABLE Orchard_Blogs_BlogRecord (Id INTEGER not null, Description TEXT, PostCount INTEGER, primary key (Id)); - SchemaBuilder.CreateTable("BlogRecord", table => table + //CREATE TABLE Orchard_Blogs_BlogPartRecord (Id INTEGER not null, Description TEXT, PostCount INTEGER, primary key (Id)); + SchemaBuilder.CreateTable("BlogPartRecord", table => table .ContentPartRecord() .Column("Description") .Column("PostCount") @@ -31,14 +31,14 @@ namespace Orchard.Blogs.DataMigrations { public int UpdateFrom1() { ContentDefinitionManager.AlterTypeDefinition("Blog", cfg => cfg - .WithPart("Blog") + .WithPart("BlogPart") .WithPart("CommonAspect") .WithPart("IsRoutable") ); ContentDefinitionManager.AlterTypeDefinition("BlogPost", cfg => cfg - .WithPart("BlogPost") + .WithPart("BlogPostPart") .WithPart("CommonAspect") .WithPart("PublishLaterPart") .WithPart("IsRoutable") @@ -49,7 +49,7 @@ namespace Orchard.Blogs.DataMigrations { } public int UpdateFrom2() { - ContentDefinitionManager.AlterPartDefinition(typeof(Blog).Name, cfg => cfg + ContentDefinitionManager.AlterPartDefinition(typeof(BlogPart).Name, cfg => cfg .WithLocation(new Dictionary { {"Editor", new ContentLocation { Zone = "primary", Position = "1" }} })); diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogDriver.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPartDriver.cs similarity index 70% rename from src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogDriver.cs rename to src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPartDriver.cs index c595d0c95..4f4b02213 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPartDriver.cs @@ -13,7 +13,7 @@ using Orchard.Mvc.ViewModels; namespace Orchard.Blogs.Drivers { [UsedImplicitly] - public class BlogDriver : ContentItemDriver { + public class BlogPartDriver : ContentItemDriver { public IOrchardServices Services { get; set; } public readonly static ContentType ContentType = new ContentType { @@ -24,7 +24,7 @@ namespace Orchard.Blogs.Drivers { private readonly IContentManager _contentManager; private readonly IBlogPostService _blogPostService; - public BlogDriver(IOrchardServices services, IContentManager contentManager, IBlogPostService blogPostService) { + public BlogPartDriver(IOrchardServices services, IContentManager contentManager, IBlogPostService blogPostService) { Services = services; _contentManager = contentManager; _blogPostService = blogPostService; @@ -39,50 +39,50 @@ namespace Orchard.Blogs.Drivers { protected override string Prefix { get { return ""; } } - protected override string GetDisplayText(Blog item) { + protected override string GetDisplayText(BlogPart item) { return item.Name; } - public override RouteValueDictionary GetDisplayRouteValues(Blog blog) { + public override RouteValueDictionary GetDisplayRouteValues(BlogPart blogPart) { return new RouteValueDictionary { {"Area", "Orchard.Blogs"}, {"Controller", "Blog"}, {"Action", "Item"}, - {"blogSlug", blog.Slug} + {"blogSlug", blogPart.Slug} }; } - public override RouteValueDictionary GetEditorRouteValues(Blog blog) { + public override RouteValueDictionary GetEditorRouteValues(BlogPart blogPart) { return new RouteValueDictionary { {"Area", "Orchard.Blogs"}, {"Controller", "Blog"}, {"Action", "Edit"}, - {"blogSlug", blog.Slug} + {"blogSlug", blogPart.Slug} }; } - protected override DriverResult Display(Blog blog, string displayType) { + protected override DriverResult Display(BlogPart blogPart, string displayType) { - IEnumerable> blogPosts = null; + IEnumerable> blogPosts = null; if (displayType.StartsWith("DetailAdmin")) { - blogPosts = _blogPostService.Get(blog, VersionOptions.Latest) + blogPosts = _blogPostService.Get(blogPart, VersionOptions.Latest) .Select(bp => _contentManager.BuildDisplayModel(bp, "SummaryAdmin")); } else if (displayType.StartsWith("Detail")) { - blogPosts = _blogPostService.Get(blog) + blogPosts = _blogPostService.Get(blogPart) .Select(bp => _contentManager.BuildDisplayModel(bp, "Summary")); } return Combined( ContentItemTemplate("Items/Blogs.Blog").LongestMatch(displayType, "Summary", "DetailAdmin", "SummaryAdmin"), - ContentPartTemplate(blog, "Parts/Blogs.Blog.Manage").Location("manage"), - ContentPartTemplate(blog, "Parts/Blogs.Blog.Metadata").Location("metadata"), - ContentPartTemplate(blog, "Parts/Blogs.Blog.Description").Location("primary"), + ContentPartTemplate(blogPart, "Parts/Blogs.Blog.Manage").Location("manage"), + ContentPartTemplate(blogPart, "Parts/Blogs.Blog.Metadata").Location("metadata"), + ContentPartTemplate(blogPart, "Parts/Blogs.Blog.Description").Location("primary"), blogPosts == null ? null : ContentPartTemplate( new ListContentsViewModel { - ContainerId = blog.Id, + ContainerId = blogPart.Id, Entries = blogPosts.Select(bp => new ListContentsViewModel.Entry { ContentItem = bp.Item.ContentItem, ContentItemMetadata = _contentManager.GetItemMetadata(bp.Item.ContentItem), @@ -93,16 +93,16 @@ namespace Orchard.Blogs.Drivers { "").LongestMatch(displayType, "DetailAdmin").Location("primary")); } - protected override DriverResult Editor(Blog blog) { - var location = blog.GetLocation("Editor"); + protected override DriverResult Editor(BlogPart blogPart) { + var location = blogPart.GetLocation("Editor"); return Combined( ContentItemTemplate("Items/Blogs.Blog"), - ContentPartTemplate(blog, "Parts/Blogs.Blog.Fields").Location(location)); + ContentPartTemplate(blogPart, "Parts/Blogs.Blog.Fields").Location(location)); } - protected override DriverResult Editor(Blog blog, IUpdateModel updater) { - updater.TryUpdateModel(blog, Prefix, null, null); - return Editor(blog); + protected override DriverResult Editor(BlogPart blogPart, IUpdateModel updater) { + updater.TryUpdateModel(blogPart, Prefix, null, null); + return Editor(blogPart); } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPostDriver.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPostDriver.cs index 322d721e9..2f8fc3229 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPostDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPostDriver.cs @@ -7,7 +7,7 @@ using Orchard.Localization; namespace Orchard.Blogs.Drivers { [UsedImplicitly] - public class BlogPostDriver : ContentItemDriver { + public class BlogPostDriver : ContentItemDriver { public IOrchardServices Services { get; set; } public readonly static ContentType ContentType = new ContentType { @@ -28,54 +28,54 @@ namespace Orchard.Blogs.Drivers { protected override string Prefix { get { return ""; } } - protected override string GetDisplayText(BlogPost post) { - return post.Title; + protected override string GetDisplayText(BlogPostPart postPart) { + return postPart.Title; } - public override RouteValueDictionary GetDisplayRouteValues(BlogPost post) { - if (post.Blog == null) + public override RouteValueDictionary GetDisplayRouteValues(BlogPostPart postPart) { + if (postPart.BlogPart == null) return new RouteValueDictionary(); return new RouteValueDictionary { {"Area", "Orchard.Blogs"}, {"Controller", "BlogPost"}, {"Action", "Item"}, - {"blogSlug", post.Blog.Slug}, - {"postSlug", post.Slug}, + {"blogSlug", postPart.BlogPart.Slug}, + {"postSlug", postPart.Slug}, }; } - public override RouteValueDictionary GetEditorRouteValues(BlogPost post) { - if (post.Blog == null) + public override RouteValueDictionary GetEditorRouteValues(BlogPostPart postPart) { + if (postPart.BlogPart == null) return new RouteValueDictionary(); return new RouteValueDictionary { {"Area", "Orchard.Blogs"}, {"Controller", "BlogPostAdmin"}, {"Action", "Edit"}, - {"blogSlug", post.Blog.Slug}, - {"postId", post.Id}, + {"blogSlug", postPart.BlogPart.Slug}, + {"postId", postPart.Id}, }; } - public override RouteValueDictionary GetCreateRouteValues(BlogPost post) { - if (post.Blog == null) + public override RouteValueDictionary GetCreateRouteValues(BlogPostPart postPart) { + if (postPart.BlogPart == null) return new RouteValueDictionary(); return new RouteValueDictionary { {"Area", "Orchard.Blogs"}, {"Controller", "BlogPostAdmin"}, {"Action", "Create"}, - {"blogSlug", post.Blog.Slug}, + {"blogSlug", postPart.BlogPart.Slug}, }; } - protected override DriverResult Editor(BlogPost post) { + protected override DriverResult Editor(BlogPostPart postPart) { return ContentItemTemplate("Items/Blogs.BlogPost"); } - protected override DriverResult Editor(BlogPost post, IUpdateModel updater) { - return Editor(post); + protected override DriverResult Editor(BlogPostPart postPart, IUpdateModel updater) { + return Editor(postPart); } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Extensions/FeedManagerExtensions.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Extensions/FeedManagerExtensions.cs index 938df402d..326d499b2 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Extensions/FeedManagerExtensions.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Extensions/FeedManagerExtensions.cs @@ -4,9 +4,9 @@ using Orchard.Core.Feeds; namespace Orchard.Blogs.Extensions { public static class FeedManagerExtensions { - public static void Register(this IFeedManager feedManager, Blog blog) { - feedManager.Register(blog.Name, "rss", new RouteValueDictionary { { "containerid", blog.Id } }); - feedManager.Register(blog.Name + " - Comments", "rss", new RouteValueDictionary { { "commentedoncontainer", blog.Id } }); + public static void Register(this IFeedManager feedManager, BlogPart blogPart) { + feedManager.Register(blogPart.Name, "rss", new RouteValueDictionary { { "containerid", blogPart.Id } }); + feedManager.Register(blogPart.Name + " - Comments", "rss", new RouteValueDictionary { { "commentedoncontainer", blogPart.Id } }); } } } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Extensions/UriExtensions.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Extensions/UriExtensions.cs deleted file mode 100644 index 006836303..000000000 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Extensions/UriExtensions.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace Orchard.Blogs.Extensions { - public static class UriExtensions { - public static string ToRootString(this Uri uri) { - return string.Format("{0}://{1}{2}", uri.Scheme, uri.Host, uri.Port != 80 ? ":" + uri.Port : ""); - } - } -} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Extensions/UrlHelperExtensions.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Extensions/UrlHelperExtensions.cs index 2d5d70dd6..aeb7d170e 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Extensions/UrlHelperExtensions.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Extensions/UrlHelperExtensions.cs @@ -52,48 +52,48 @@ namespace Orchard.Blogs.Extensions { return urlHelper.Action("Remove", "BlogAdmin", new {blogSlug, area = "Orchard.Blogs"}); } - public static string BlogPost(this UrlHelper urlHelper, BlogPost blogPost) { - return urlHelper.BlogPost(blogPost.Blog.Slug, blogPost.Slug); + public static string BlogPost(this UrlHelper urlHelper, BlogPostPart blogPostPart) { + return urlHelper.BlogPost(blogPostPart.BlogPart.Slug, blogPostPart.Slug); } public static string BlogPost(this UrlHelper urlHelper, string blogSlug, string postSlug) { return urlHelper.Action("Item", "BlogPost", new {blogSlug, postSlug, area = "Orchard.Blogs"}); } - public static string BlogPostCreate(this UrlHelper urlHelper, Blog blog) { - return urlHelper.BlogPostCreate(blog.Slug); + public static string BlogPostCreate(this UrlHelper urlHelper, BlogPart blogPart) { + return urlHelper.BlogPostCreate(blogPart.Slug); } public static string BlogPostCreate(this UrlHelper urlHelper, string blogSlug) { return urlHelper.Action("Create", "BlogPostAdmin", new {blogSlug, area = "Orchard.Blogs"}); } - public static string BlogPostEdit(this UrlHelper urlHelper, BlogPost blogPost) { - return urlHelper.BlogPostEdit(blogPost.Blog.Slug, blogPost.Id); + public static string BlogPostEdit(this UrlHelper urlHelper, BlogPostPart blogPostPart) { + return urlHelper.BlogPostEdit(blogPostPart.BlogPart.Slug, blogPostPart.Id); } public static string BlogPostEdit(this UrlHelper urlHelper, string blogSlug, int postId) { return urlHelper.Action("Edit", "BlogPostAdmin", new {blogSlug, postId, area = "Orchard.Blogs"}); } - public static string BlogPostDelete(this UrlHelper urlHelper, BlogPost blogPost) { - return urlHelper.BlogPostDelete(blogPost.Blog.Slug, blogPost.Id); + public static string BlogPostDelete(this UrlHelper urlHelper, BlogPostPart blogPostPart) { + return urlHelper.BlogPostDelete(blogPostPart.BlogPart.Slug, blogPostPart.Id); } public static string BlogPostDelete(this UrlHelper urlHelper, string blogSlug, int postId) { return urlHelper.Action("Delete", "BlogPostAdmin", new {blogSlug, postId, area = "Orchard.Blogs"}); } - public static string BlogPostPublish(this UrlHelper urlHelper, BlogPost blogPost) { - return urlHelper.BlogPostPublish(blogPost.Blog.Slug, blogPost.Id); + public static string BlogPostPublish(this UrlHelper urlHelper, BlogPostPart blogPostPart) { + return urlHelper.BlogPostPublish(blogPostPart.BlogPart.Slug, blogPostPart.Id); } public static string BlogPostPublish(this UrlHelper urlHelper, string blogSlug, int postId) { return urlHelper.Action("Publish", "BlogPostAdmin", new { blogSlug, postId, area = "Orchard.Blogs" }); } - public static string BlogPostUnpublish(this UrlHelper urlHelper, BlogPost blogPost) { - return urlHelper.BlogPostUnpublish(blogPost.Blog.Slug, blogPost.Id); + public static string BlogPostUnpublish(this UrlHelper urlHelper, BlogPostPart blogPostPart) { + return urlHelper.BlogPostUnpublish(blogPostPart.BlogPart.Slug, blogPostPart.Id); } public static string BlogPostUnpublish(this UrlHelper urlHelper, string blogSlug, int postId) { diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Filters/ArchivesFilter.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Filters/ArchivesFilter.cs index fc933fd8c..8950caf5d 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Filters/ArchivesFilter.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Filters/ArchivesFilter.cs @@ -15,19 +15,19 @@ namespace Orchard.Blogs.Filters { var blogViewModel = filterContext.Controller.ViewData.Model as BlogViewModel; if (blogViewModel != null) { - blogViewModel.Zones.AddRenderPartial("sidebar", "Archives", new BlogArchivesViewModel { Blog = blogViewModel.Blog.Item, Archives = _blogPostService.GetArchives(blogViewModel.Blog.Item) }); + blogViewModel.Zones.AddRenderPartial("sidebar", "Archives", new BlogArchivesViewModel { BlogPart = blogViewModel.Blog.Item, Archives = _blogPostService.GetArchives(blogViewModel.Blog.Item) }); return; } var blogPostViewModel = filterContext.Controller.ViewData.Model as BlogPostViewModel; if (blogPostViewModel != null) { - blogPostViewModel.Zones.AddRenderPartial("sidebar", "Archives", new BlogArchivesViewModel { Blog = blogPostViewModel.Blog, Archives = _blogPostService.GetArchives(blogPostViewModel.Blog) }); + blogPostViewModel.Zones.AddRenderPartial("sidebar", "Archives", new BlogArchivesViewModel { BlogPart = blogPostViewModel.BlogPart, Archives = _blogPostService.GetArchives(blogPostViewModel.BlogPart) }); return; } var blogPostArchiveViewModel = filterContext.Controller.ViewData.Model as BlogPostArchiveViewModel; if (blogPostArchiveViewModel != null) { - blogPostArchiveViewModel.Zones.AddRenderPartial("sidebar", "Archives", new BlogArchivesViewModel { Blog = blogPostArchiveViewModel.Blog, Archives = _blogPostService.GetArchives(blogPostArchiveViewModel.Blog) }); + blogPostArchiveViewModel.Zones.AddRenderPartial("sidebar", "Archives", new BlogArchivesViewModel { BlogPart = blogPostArchiveViewModel.BlogPart, Archives = _blogPostService.GetArchives(blogPostArchiveViewModel.BlogPart) }); return; } } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogArchiveHandler.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogArchiveHandler.cs index 48f0d2e28..0b0405cb2 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogArchiveHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogArchiveHandler.cs @@ -11,25 +11,25 @@ using Orchard.Data; namespace Orchard.Blogs.Handlers { [UsedImplicitly] public class BlogArchiveHandler : ContentHandler { - public BlogArchiveHandler(IRepository blogArchiveRepository, IRepository commonRepository) { - OnPublished((context, bp) => RecalculateBlogArchive(blogArchiveRepository, commonRepository, bp)); - OnRemoved((context, bp) => RecalculateBlogArchive(blogArchiveRepository, commonRepository, bp)); + public BlogArchiveHandler(IRepository blogArchiveRepository, IRepository commonRepository) { + OnPublished((context, bp) => RecalculateBlogArchive(blogArchiveRepository, commonRepository, bp)); + OnRemoved((context, bp) => RecalculateBlogArchive(blogArchiveRepository, commonRepository, bp)); } - private static void RecalculateBlogArchive(IRepository blogArchiveRepository, IRepository commonRepository, BlogPost blogPost) { + private static void RecalculateBlogArchive(IRepository blogArchiveRepository, IRepository commonRepository, BlogPostPart blogPostPart) { blogArchiveRepository.Flush(); //INFO: (erikpo) Remove all current blog archive records var blogArchiveRecords = from bar in blogArchiveRepository.Table - where bar.Blog == blogPost.Blog.Record + where bar.BlogPart == blogPostPart.BlogPart.Record select bar; blogArchiveRecords.ToList().ForEach(blogArchiveRepository.Delete); //INFO: (erikpo) Get all blog posts for the current blog var postsQuery = from bpr in commonRepository.Table - where bpr.ContentItemRecord.ContentType.Name == BlogPostDriver.ContentType.Name && bpr.Container.Id == blogPost.Blog.Record.Id + where bpr.ContentItemRecord.ContentType.Name == BlogPostDriver.ContentType.Name && bpr.Container.Id == blogPostPart.BlogPart.Record.Id orderby bpr.PublishedUtc select bpr; @@ -49,7 +49,7 @@ namespace Orchard.Blogs.Handlers { //INFO: (erikpo) Create the new blog archive records based on the in memory values foreach (KeyValuePair item in inMemoryBlogArchives) { - blogArchiveRepository.Create(new BlogArchiveRecord {Blog = blogPost.Blog.Record, Year = item.Key.Year, Month = item.Key.Month, PostCount = item.Value}); + blogArchiveRepository.Create(new BlogPartArchiveRecord {BlogPart = blogPostPart.BlogPart.Record, Year = item.Key.Year, Month = item.Key.Month, PostCount = item.Value}); } } } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogHandler.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogHandler.cs index 7843b20d4..9499c9e0e 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogHandler.cs @@ -6,7 +6,7 @@ using Orchard.Data; namespace Orchard.Blogs.Handlers { [UsedImplicitly] public class BlogHandler : ContentHandler { - public BlogHandler(IRepository repository) { + public BlogHandler(IRepository repository) { Filters.Add(StorageFilter.For(repository)); } } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogPostHandler.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogPostHandler.cs index d94a28876..d7cbe394c 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogPostHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogPostHandler.cs @@ -19,7 +19,7 @@ namespace Orchard.Blogs.Handlers { _orchardServices = orchardServices; T = NullLocalizer.Instance; - Action updateBlogPostCount = + Action updateBlogPostCount = (blog => { // Ensure we get the "right" set of published posts for the blog blog.ContentItem.ContentManager.Flush(); @@ -28,10 +28,10 @@ namespace Orchard.Blogs.Handlers { blog.PostCount = postsCount; }); - OnInitializing((context, bp) => { + OnInitializing((context, bp) => { var blogSlug = requestContext.RouteData.Values.ContainsKey("blogSlug") ? requestContext.RouteData.Values["blogSlug"] as string : null; if (!string.IsNullOrEmpty(blogSlug)) { - bp.Blog = blogService.Get(blogSlug); + bp.BlogPart = blogService.Get(blogSlug); return; } @@ -41,19 +41,19 @@ namespace Orchard.Blogs.Handlers { if (!string.IsNullOrEmpty(containerId)) { int cId; if (int.TryParse(containerId, out cId)) { - bp.Blog = context.ContentItem.ContentManager.Get(cId).As(); + bp.BlogPart = context.ContentItem.ContentManager.Get(cId).As(); return; } } }); - OnCreated((context, bp) => updateBlogPostCount(bp.Blog)); - OnPublished((context, bp) => updateBlogPostCount(bp.Blog)); - OnVersioned((context, bp1, bp2) => updateBlogPostCount(bp2.Blog)); - OnRemoved((context, bp) => updateBlogPostCount(bp.Blog)); + OnCreated((context, bp) => updateBlogPostCount(bp.BlogPart)); + OnPublished((context, bp) => updateBlogPostCount(bp.BlogPart)); + OnVersioned((context, bp1, bp2) => updateBlogPostCount(bp2.BlogPart)); + OnRemoved((context, bp) => updateBlogPostCount(bp.BlogPart)); - OnRemoved( + OnRemoved( (context, b) => - blogPostService.Get(context.ContentItem.As()).ToList().ForEach( + blogPostService.Get(context.ContentItem.As()).ToList().ForEach( blogPost => context.ContentManager.Remove(blogPost.ContentItem))); } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Models/Blog.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPart.cs similarity index 90% rename from src/Orchard.Web/Modules/Orchard.Blogs/Models/Blog.cs rename to src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPart.cs index 624380803..47efb2290 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Models/Blog.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPart.cs @@ -3,7 +3,7 @@ using Orchard.ContentManagement; using Orchard.Core.Routable.Models; namespace Orchard.Blogs.Models { - public class Blog : ContentPart { + public class BlogPart : ContentPart { [HiddenInput(DisplayValue = false)] public int Id { get { return ContentItem.Id; } } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogArchiveRecord.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPartArchiveRecord.cs similarity index 67% rename from src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogArchiveRecord.cs rename to src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPartArchiveRecord.cs index a876037ae..77a065254 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogArchiveRecord.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPartArchiveRecord.cs @@ -1,7 +1,7 @@ namespace Orchard.Blogs.Models { - public class BlogArchiveRecord { + public class BlogPartArchiveRecord { public virtual int Id { get; set; } - public virtual BlogRecord Blog { get; set; } + public virtual BlogPartRecord BlogPart { get; set; } public virtual int Year { get; set; } public virtual int Month { get; set; } public virtual int PostCount { get; set; } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogRecord.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPartRecord.cs similarity index 75% rename from src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogRecord.cs rename to src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPartRecord.cs index c855790a2..4a19c2309 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogRecord.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPartRecord.cs @@ -1,7 +1,7 @@ using Orchard.ContentManagement.Records; namespace Orchard.Blogs.Models { - public class BlogRecord : ContentPartRecord { + public class BlogPartRecord : ContentPartRecord { public virtual string Description { get; set; } public virtual int PostCount { get; set; } } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPost.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPostPart.cs similarity index 94% rename from src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPost.cs rename to src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPostPart.cs index 7c3081226..8ea0fa057 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPost.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPostPart.cs @@ -7,7 +7,7 @@ using Orchard.Core.Routable.Models; using Orchard.Security; namespace Orchard.Blogs.Models { - public class BlogPost : ContentPart { + public class BlogPostPart : ContentPart { [HiddenInput(DisplayValue = false)] public int Id { get { return ContentItem.Id; } @@ -28,8 +28,8 @@ namespace Orchard.Blogs.Models { set { this.As().Text = value; } } - public Blog Blog { - get { return this.As().Container.As(); } + public BlogPart BlogPart { + get { return this.As().Container.As(); } set { this.As().Container = value; } } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj b/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj index 30df21d5f..29f00f14d 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj @@ -69,7 +69,7 @@ - + @@ -78,7 +78,7 @@ - + @@ -87,11 +87,11 @@ - + - + - + diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Services/BlogPostService.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Services/BlogPostService.cs index b3fbd78b9..396219a18 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Services/BlogPostService.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Services/BlogPostService.cs @@ -14,44 +14,44 @@ namespace Orchard.Blogs.Services { [UsedImplicitly] public class BlogPostService : IBlogPostService { private readonly IContentManager _contentManager; - private readonly IRepository _blogArchiveRepository; + private readonly IRepository _blogArchiveRepository; private readonly IPublishingTaskManager _publishingTaskManager; - public BlogPostService(IContentManager contentManager, IRepository blogArchiveRepository, IPublishingTaskManager publishingTaskManager) { + public BlogPostService(IContentManager contentManager, IRepository blogArchiveRepository, IPublishingTaskManager publishingTaskManager) { _contentManager = contentManager; _blogArchiveRepository = blogArchiveRepository; _publishingTaskManager = publishingTaskManager; } - public BlogPost Get(Blog blog, string slug) { - return Get(blog, slug, VersionOptions.Published); + public BlogPostPart Get(BlogPart blogPart, string slug) { + return Get(blogPart, slug, VersionOptions.Published); } - public BlogPost Get(Blog blog, string slug, VersionOptions versionOptions) { + public BlogPostPart Get(BlogPart blogPart, string slug, VersionOptions versionOptions) { return _contentManager.Query(versionOptions, BlogPostDriver.ContentType.Name).Join().Where(rr => rr.Slug == slug). - Join().Where(cr => cr.Container == blog.Record.ContentItemRecord).List(). - SingleOrDefault().As(); + Join().Where(cr => cr.Container == blogPart.Record.ContentItemRecord).List(). + SingleOrDefault().As(); } - public BlogPost Get(int id) { + public BlogPostPart Get(int id) { return Get(id, VersionOptions.Published); } - public BlogPost Get(int id, VersionOptions versionOptions) { - return _contentManager.Get(id, versionOptions); + public BlogPostPart Get(int id, VersionOptions versionOptions) { + return _contentManager.Get(id, versionOptions); } - public IEnumerable Get(Blog blog) { - return Get(blog, VersionOptions.Published); + public IEnumerable Get(BlogPart blogPart) { + return Get(blogPart, VersionOptions.Published); } - public IEnumerable Get(Blog blog, VersionOptions versionOptions) { - return GetBlogQuery(blog, versionOptions).List().Select(ci => ci.As()); + public IEnumerable Get(BlogPart blogPart, VersionOptions versionOptions) { + return GetBlogQuery(blogPart, versionOptions).List().Select(ci => ci.As()); } - public IEnumerable Get(Blog blog, ArchiveData archiveData) { - var query = GetBlogQuery(blog, VersionOptions.Published); + public IEnumerable Get(BlogPart blogPart, ArchiveData archiveData) { + var query = GetBlogQuery(blogPart, VersionOptions.Published); if (archiveData.Day > 0) { var dayDate = new DateTime(archiveData.Year, archiveData.Month, archiveData.Day); @@ -70,13 +70,13 @@ namespace Orchard.Blogs.Services { query = query.Where(cr => cr.CreatedUtc >= yearDate && cr.CreatedUtc < yearDate.AddYears(1)); } - return query.List().Select(ci => ci.As()); + return query.List().Select(ci => ci.As()); } - public IEnumerable> GetArchives(Blog blog) { + public IEnumerable> GetArchives(BlogPart blogPart) { var query = from bar in _blogArchiveRepository.Table - where bar.Blog == blog.Record + where bar.BlogPart == blogPart.Record orderby bar.Year descending, bar.Month descending select bar; @@ -87,30 +87,30 @@ namespace Orchard.Blogs.Services { bar.PostCount)); } - public void Delete(BlogPost blogPost) { - _publishingTaskManager.DeleteTasks(blogPost.ContentItem); - _contentManager.Remove(blogPost.ContentItem); + public void Delete(BlogPostPart blogPostPart) { + _publishingTaskManager.DeleteTasks(blogPostPart.ContentItem); + _contentManager.Remove(blogPostPart.ContentItem); } - public void Publish(BlogPost blogPost) { - _publishingTaskManager.DeleteTasks(blogPost.ContentItem); - _contentManager.Publish(blogPost.ContentItem); + public void Publish(BlogPostPart blogPostPart) { + _publishingTaskManager.DeleteTasks(blogPostPart.ContentItem); + _contentManager.Publish(blogPostPart.ContentItem); } - public void Publish(BlogPost blogPost, DateTime scheduledPublishUtc) { - _publishingTaskManager.Publish(blogPost.ContentItem, scheduledPublishUtc); + public void Publish(BlogPostPart blogPostPart, DateTime scheduledPublishUtc) { + _publishingTaskManager.Publish(blogPostPart.ContentItem, scheduledPublishUtc); } - public void Unpublish(BlogPost blogPost) { - _contentManager.Unpublish(blogPost.ContentItem); + public void Unpublish(BlogPostPart blogPostPart) { + _contentManager.Unpublish(blogPostPart.ContentItem); } - public DateTime? GetScheduledPublishUtc(BlogPost blogPost) { - var task = _publishingTaskManager.GetPublishTask(blogPost.ContentItem); + public DateTime? GetScheduledPublishUtc(BlogPostPart blogPostPart) { + var task = _publishingTaskManager.GetPublishTask(blogPostPart.ContentItem); return (task == null ? null : task.ScheduledUtc); } - private IContentQuery GetBlogQuery(ContentPart blog, VersionOptions versionOptions) { + private IContentQuery GetBlogQuery(ContentPart blog, VersionOptions versionOptions) { return _contentManager.Query(versionOptions, BlogPostDriver.ContentType.Name).Join().Where( cr => cr.Container == blog.Record.ContentItemRecord).OrderByDescending(cr => cr.CreatedUtc); diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Services/BlogService.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Services/BlogService.cs index fd07dcdd5..b3095eb7c 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Services/BlogService.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Services/BlogService.cs @@ -18,31 +18,31 @@ namespace Orchard.Blogs.Services { _blogSlugConstraint = blogSlugConstraint; } - public Blog Get(string slug) { - return _contentManager.Query() + public BlogPart Get(string slug) { + return _contentManager.Query() .Join().Where(rr => rr.Slug == slug) .List().FirstOrDefault(); } - public IEnumerable Get() { - return _contentManager.Query() + public IEnumerable Get() { + return _contentManager.Query() .Join() .OrderBy(br => br.Title) .List(); } - public void Create(Blog blog) { - _contentManager.Create(blog.ContentItem); - _blogSlugConstraint.AddSlug(blog.Slug); + public void Create(BlogPart blogPart) { + _contentManager.Create(blogPart.ContentItem); + _blogSlugConstraint.AddSlug(blogPart.Slug); } - public void Edit(Blog blog) { - _blogSlugConstraint.AddSlug(blog.Slug); + public void Edit(BlogPart blogPart) { + _blogSlugConstraint.AddSlug(blogPart.Slug); } - public void Delete(Blog blog) { - _contentManager.Remove(blog.ContentItem); - _blogSlugConstraint.RemoveSlug(blog.Slug); + public void Delete(BlogPart blogPart) { + _contentManager.Remove(blogPart.ContentItem); + _blogSlugConstraint.RemoveSlug(blogPart.Slug); } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Services/IBlogPostService.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Services/IBlogPostService.cs index 6590fc887..5a1810689 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Services/IBlogPostService.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Services/IBlogPostService.cs @@ -5,18 +5,18 @@ using Orchard.ContentManagement; namespace Orchard.Blogs.Services { public interface IBlogPostService : IDependency { - BlogPost Get(Blog blog, string slug); - BlogPost Get(Blog blog, string slug, VersionOptions versionOptions); - BlogPost Get(int id); - BlogPost Get(int id, VersionOptions versionOptions); - IEnumerable Get(Blog blog); - IEnumerable Get(Blog blog, VersionOptions versionOptions); - IEnumerable Get(Blog blog, ArchiveData archiveData); - IEnumerable> GetArchives(Blog blog); - void Delete(BlogPost blogPost); - void Publish(BlogPost blogPost); - void Publish(BlogPost blogPost, DateTime scheduledPublishUtc); - void Unpublish(BlogPost blogPost); - DateTime? GetScheduledPublishUtc(BlogPost blogPost); + BlogPostPart Get(BlogPart blogPart, string slug); + BlogPostPart Get(BlogPart blogPart, string slug, VersionOptions versionOptions); + BlogPostPart Get(int id); + BlogPostPart Get(int id, VersionOptions versionOptions); + IEnumerable Get(BlogPart blogPart); + IEnumerable Get(BlogPart blogPart, VersionOptions versionOptions); + IEnumerable Get(BlogPart blogPart, ArchiveData archiveData); + IEnumerable> GetArchives(BlogPart blogPart); + void Delete(BlogPostPart blogPostPart); + void Publish(BlogPostPart blogPostPart); + void Publish(BlogPostPart blogPostPart, DateTime scheduledPublishUtc); + void Unpublish(BlogPostPart blogPostPart); + DateTime? GetScheduledPublishUtc(BlogPostPart blogPostPart); } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Services/IBlogService.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Services/IBlogService.cs index b5f8c25b1..3d6ef17a4 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Services/IBlogService.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Services/IBlogService.cs @@ -3,10 +3,10 @@ using Orchard.Blogs.Models; namespace Orchard.Blogs.Services { public interface IBlogService : IDependency { - Blog Get(string slug); - IEnumerable Get(); - void Create(Blog blog); - void Edit(Blog blog); - void Delete(Blog blog); + BlogPart Get(string slug); + IEnumerable Get(); + void Create(BlogPart blogPart); + void Edit(BlogPart blogPart); + void Delete(BlogPart blogPart); } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs index 2c14b76de..757c60a79 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs @@ -130,7 +130,7 @@ namespace Orchard.Blogs.Services { var user = _membershipService.ValidateUser(userName, password); _authorizationService.CheckAccess(StandardPermissions.AccessFrontEnd, user, null); - var blog = _contentManager.Get(Convert.ToInt32(blogId)); + var blog = _contentManager.Get(Convert.ToInt32(blogId)); if (blog == null) throw new ArgumentException(); @@ -151,7 +151,7 @@ namespace Orchard.Blogs.Services { var user = _membershipService.ValidateUser(userName, password); _authorizationService.CheckAccess(Permissions.EditBlogPost, user, null); - var blog = _contentManager.Get(Convert.ToInt32(blogId)); + var blog = _contentManager.Get(Convert.ToInt32(blogId)); if (blog == null) throw new ArgumentException(); @@ -159,8 +159,8 @@ namespace Orchard.Blogs.Services { var description = content.Optional("description"); var slug = content.Optional("wp_slug"); - var blogPost = _contentManager.New(BlogPostDriver.ContentType.Name); - blogPost.Blog = blog; + var blogPost = _contentManager.New(BlogPostDriver.ContentType.Name); + blogPost.BlogPart = blog; blogPost.Title = title; blogPost.Slug = slug; blogPost.Text = description; @@ -237,14 +237,14 @@ namespace Orchard.Blogs.Services { return true; } - private static XRpcStruct CreateBlogStruct(BlogPost blogPost, UrlHelper urlHelper) { - var url = urlHelper.AbsoluteAction(() => urlHelper.BlogPost(blogPost)); + private static XRpcStruct CreateBlogStruct(BlogPostPart blogPostPart, UrlHelper urlHelper) { + var url = urlHelper.AbsoluteAction(() => urlHelper.BlogPost(blogPostPart)); return new XRpcStruct() - .Set("postid", blogPost.Id) - .Set("dateCreated", blogPost.CreatedUtc) - .Set("title", blogPost.Title) - .Set("wp_slug", blogPost.Slug) - .Set("description", blogPost.Text) + .Set("postid", blogPostPart.Id) + .Set("dateCreated", blogPostPart.CreatedUtc) + .Set("title", blogPostPart.Title) + .Set("wp_slug", blogPostPart.Slug) + .Set("description", blogPostPart.Text) .Set("link", url) .Set("permaLink", url); } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/AdminBlogsViewModel.cs b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/AdminBlogsViewModel.cs index f10817283..1d0fce0d9 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/AdminBlogsViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/AdminBlogsViewModel.cs @@ -8,7 +8,7 @@ namespace Orchard.Blogs.ViewModels { } public class AdminBlogEntry { - public ContentItemViewModel ContentItemViewModel { get; set; } + public ContentItemViewModel ContentItemViewModel { get; set; } public int TotalPostCount { get; set; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogArchivesViewModel.cs b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogArchivesViewModel.cs index 235ca854a..70a7f0b5f 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogArchivesViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogArchivesViewModel.cs @@ -3,7 +3,7 @@ using Orchard.Blogs.Models; namespace Orchard.Blogs.ViewModels { public class BlogArchivesViewModel { - public Blog Blog { get; set; } + public BlogPart BlogPart { get; set; } public IEnumerable> Archives { get; set; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogEditViewModel.cs b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogEditViewModel.cs index e20251b58..87f075284 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogEditViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogEditViewModel.cs @@ -3,7 +3,7 @@ using Orchard.Mvc.ViewModels; namespace Orchard.Blogs.ViewModels { public class BlogEditViewModel : BaseViewModel { - public ContentItemViewModel Blog { get; set; } + public ContentItemViewModel Blog { get; set; } public bool PromoteToHomePage { get; set; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogForAdminViewModel.cs b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogForAdminViewModel.cs index c6c43fc51..a31532022 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogForAdminViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogForAdminViewModel.cs @@ -3,6 +3,6 @@ using Orchard.Mvc.ViewModels; namespace Orchard.Blogs.ViewModels { public class BlogForAdminViewModel : BaseViewModel { - public ContentItemViewModel Blog { get; set; } + public ContentItemViewModel Blog { get; set; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogPostArchiveViewModel.cs b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogPostArchiveViewModel.cs index d530b580c..e8c20255c 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogPostArchiveViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogPostArchiveViewModel.cs @@ -4,8 +4,8 @@ using Orchard.Mvc.ViewModels; namespace Orchard.Blogs.ViewModels { public class BlogPostArchiveViewModel : BaseViewModel { - public Blog Blog { get; set; } + public BlogPart BlogPart { get; set; } public ArchiveData ArchiveData { get; set; } - public IEnumerable> BlogPosts { get; set; } + public IEnumerable> BlogPosts { get; set; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogPostEditViewModel.cs b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogPostEditViewModel.cs index 8d29c9034..e394f6f54 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogPostEditViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogPostEditViewModel.cs @@ -3,6 +3,6 @@ using Orchard.Mvc.ViewModels; namespace Orchard.Blogs.ViewModels { public class BlogPostEditViewModel : BaseViewModel { - public ContentItemViewModel BlogPost { get; set; } + public ContentItemViewModel BlogPost { get; set; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogPostViewModel.cs b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogPostViewModel.cs index 112c3f42f..527b97ba3 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogPostViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogPostViewModel.cs @@ -3,7 +3,7 @@ using Orchard.Mvc.ViewModels; namespace Orchard.Blogs.ViewModels { public class BlogPostViewModel : BaseViewModel { - public Blog Blog { get; set; } - public ContentItemViewModel BlogPost { get; set; } + public BlogPart BlogPart { get; set; } + public ContentItemViewModel BlogPost { get; set; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogViewModel.cs b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogViewModel.cs index 389571962..7be8071cc 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogViewModel.cs @@ -3,6 +3,6 @@ using Orchard.Mvc.ViewModels; namespace Orchard.Blogs.ViewModels { public class BlogViewModel : BaseViewModel { - public ContentItemViewModel Blog { get; set; } + public ContentItemViewModel Blog { get; set; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogsViewModel.cs b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogsViewModel.cs index 32d2232a6..bf96cdba6 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogsViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogsViewModel.cs @@ -4,6 +4,6 @@ using Orchard.Mvc.ViewModels; namespace Orchard.Blogs.ViewModels { public class BlogsViewModel : BaseViewModel { - public IEnumerable> Blogs { get; set; } + public IEnumerable> Blogs { get; set; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/CreateBlogPostViewModel.cs b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/CreateBlogPostViewModel.cs index ef6e4b52e..4276a2a65 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/CreateBlogPostViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/CreateBlogPostViewModel.cs @@ -3,6 +3,6 @@ using Orchard.Mvc.ViewModels; namespace Orchard.Blogs.ViewModels { public class CreateBlogPostViewModel : BaseViewModel { - public ContentItemViewModel BlogPost { get; set; } + public ContentItemViewModel BlogPost { get; set; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/CreateBlogViewModel.cs b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/CreateBlogViewModel.cs index 967158b40..ddb9a516f 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/CreateBlogViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/CreateBlogViewModel.cs @@ -3,7 +3,7 @@ using Orchard.Mvc.ViewModels; namespace Orchard.Blogs.ViewModels { public class CreateBlogViewModel : BaseViewModel { - public ContentItemViewModel Blog { get; set; } + public ContentItemViewModel Blog { get; set; } public bool PromoteToHomePage { get; set; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Archives.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Archives.ascx index 3e74c6b85..fb41b4958 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Archives.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Archives.ascx @@ -22,13 +22,13 @@ <% } %> <% } else { %> - <%: Html.UnorderedList(Model.Archives, (t, i) => Html.Link(string.Format("{0:MMMM yyyy} ({1})", t.Key.ToDateTime(), t.Value), Url.BlogArchiveMonth(Model.Blog.Slug, t.Key.Year, t.Key.Month)), "archiveMonthList") %><% + <%: Html.UnorderedList(Model.Archives, (t, i) => Html.Link(string.Format("{0:MMMM yyyy} ({1})", t.Key.ToDateTime(), t.Value), Url.BlogArchiveMonth(Model.BlogPart.Slug, t.Key.Year, t.Key.Month)), "archiveMonthList") %><% } } else { %> diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/Item.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/Item.ascx index f98896342..2d911c884 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/Item.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/Item.ascx @@ -1,4 +1,4 @@ <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Blogs.ViewModels"%> -<% Html.AddTitleParts(Model.Blog.Name); %> +<% Html.AddTitleParts(Model.BlogPart.Name); %> <%: Html.DisplayForItem(m => m.BlogPost) %> diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/ListByArchive.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/ListByArchive.ascx index 3f8fb486f..ca57c400d 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/ListByArchive.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/ListByArchive.ascx @@ -5,9 +5,9 @@
<%: T("Archives").ToString() -%> / <%: Html.Link(Model.ArchiveData.Year.ToString(), Url.BlogArchiveYear(Model.Blog.Slug, Model.ArchiveData.Year)) -%><%=Model.ArchiveData.Month > 0 ? string.Format(" / {0}", Html.Link(Model.ArchiveData.ToDateTime().ToString("MMMM"), Url.BlogArchiveMonth(Model.Blog.Slug, Model.ArchiveData.Year, Model.ArchiveData.Month))) : "" -%><%=Model.ArchiveData.Day > 0 ? string.Format(" / {0}", Html.Link(Model.ArchiveData.Day.ToString(), Url.BlogArchiveDay(Model.Blog.Slug, Model.ArchiveData.Year, Model.ArchiveData.Month, Model.ArchiveData.Day))) : "" +%> / <%: Html.Link(Model.ArchiveData.Year.ToString(), Url.BlogArchiveYear(Model.BlogPart.Slug, Model.ArchiveData.Year)) +%><%=Model.ArchiveData.Month > 0 ? string.Format(" / {0}", Html.Link(Model.ArchiveData.ToDateTime().ToString("MMMM"), Url.BlogArchiveMonth(Model.BlogPart.Slug, Model.ArchiveData.Year, Model.ArchiveData.Month))) : "" +%><%=Model.ArchiveData.Day > 0 ? string.Format(" / {0}", Html.Link(Model.ArchiveData.Day.ToString(), Url.BlogArchiveDay(Model.BlogPart.Slug, Model.ArchiveData.Year, Model.ArchiveData.Month, Model.ArchiveData.Day))) : "" %>
diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.DetailAdmin.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.DetailAdmin.ascx index d4aab5af5..1c04f5025 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.DetailAdmin.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.DetailAdmin.ascx @@ -1,4 +1,4 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>" %> +<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>" %> <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <%@ Import Namespace="Orchard.Blogs.Extensions"%> <%@ Import Namespace="Orchard.Blogs.Models"%> @@ -17,5 +17,4 @@ --%> -<% Html.Zone("primary"); - Html.ZonesAny(); %> \ No newline at end of file +<% Html.Zone("primary"); %> \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx index 852f50cae..a0ae94197 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx @@ -1,4 +1,4 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>" %> +<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>" %> <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <%@ Import Namespace="Orchard.Blogs.Extensions"%> <%@ Import Namespace="Orchard.Blogs.Models"%> diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.SummaryAdmin.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.SummaryAdmin.ascx index ab489f33d..1211b3258 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.SummaryAdmin.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.SummaryAdmin.ascx @@ -1,4 +1,4 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>" %> +<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>" %> <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <%@ Import Namespace="Orchard.Blogs.Extensions"%> <%@ Import Namespace="Orchard.Blogs.Models"%> diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.ascx index dd244b3af..a0219aafd 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.ascx @@ -1,4 +1,4 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>" %> +<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>" %> <%@ Import Namespace="Orchard.UI.Resources"%> <%@ Import Namespace="Orchard.Blogs.Extensions"%> <%@ Import Namespace="Orchard.Mvc.ViewModels"%> diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx index fd20c29a1..270fbe96e 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx @@ -1,4 +1,4 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>" %> +<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>" %> <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <%@ Import Namespace="Orchard.Blogs.Extensions"%> <%@ Import Namespace="Orchard.Blogs.Models"%> diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.ascx index 970fca6f7..412bc02a3 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.ascx @@ -1,4 +1,4 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>" %> +<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>" %> <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <%@ Import Namespace="Orchard.Blogs.Models"%>

<%: Html.TitleForPage(Model.Item.Title)%>

diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Description.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Description.ascx index beab3fb41..a3a9a5ddd 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Description.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Description.ascx @@ -1,4 +1,4 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> +<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Blogs.Models"%>

<%: Model.Description %>

diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Manage.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Manage.ascx index 8ef7e1e26..d5f124834 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Manage.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Manage.ascx @@ -1,4 +1,4 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> +<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Blogs"%> <%@ Import Namespace="Orchard.Blogs.Extensions"%> <%@ Import Namespace="Orchard.Blogs.Models"%><% diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Metadata.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Metadata.ascx index ecd331b26..47cfcd8ef 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Metadata.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Metadata.ascx @@ -1,2 +1,2 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> +<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Blogs.Models"%> \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Items/Blogs.Blog.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Items/Blogs.Blog.ascx index 26ad62aed..119122908 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Items/Blogs.Blog.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Items/Blogs.Blog.ascx @@ -1,4 +1,4 @@ -<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl>" %> +<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl>" %> <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <%@ Import Namespace="Orchard.Blogs.Models"%> <% Html.AddTitleParts(Model.Item.Name); %> diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Items/Blogs.BlogPost.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Items/Blogs.BlogPost.ascx index c28f7ed3a..9b3cff6be 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Items/Blogs.BlogPost.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Items/Blogs.BlogPost.ascx @@ -1,4 +1,4 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>" %> +<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>" %> <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <%@ Import Namespace="Orchard.Blogs.Models"%> <% Html.AddTitleParts(Model.Item.Title); %> diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Parts/Blogs.Blog.Fields.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Parts/Blogs.Blog.Fields.ascx index 65b30dadb..afbc99c55 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Parts/Blogs.Blog.Fields.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Parts/Blogs.Blog.Fields.ascx @@ -1,4 +1,4 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> +<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Blogs.Models"%>
<%: Html.LabelFor(m => m.Description) %> diff --git a/src/Orchard.Web/Orchard.Web.csproj b/src/Orchard.Web/Orchard.Web.csproj index 80b195dc1..418b2a79b 100644 --- a/src/Orchard.Web/Orchard.Web.csproj +++ b/src/Orchard.Web/Orchard.Web.csproj @@ -101,6 +101,10 @@ + + + + Designer diff --git a/src/Orchard.Web/Themes/TheAdmin/Views/Menu.ascx b/src/Orchard.Web/Themes/TheAdmin/Views/Menu.ascx index 40cbc6c70..e26e738ca 100644 --- a/src/Orchard.Web/Themes/TheAdmin/Views/Menu.ascx +++ b/src/Orchard.Web/Themes/TheAdmin/Views/Menu.ascx @@ -1,6 +1,7 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <% using (this.Capture("end-of-page-scripts")) { %> <% } %> \ No newline at end of file