diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Config/Host.config b/src/Orchard.Azure/Orchard.Azure.Web/Config/Host.config index f43c28564..6bd02b8e9 100644 --- a/src/Orchard.Azure/Orchard.Azure.Web/Config/Host.config +++ b/src/Orchard.Azure/Orchard.Azure.Web/Config/Host.config @@ -13,7 +13,7 @@ service="Orchard.Environment.Configuration.IShellSettingsManager"> - diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj b/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj index af11c3fa4..73110bfa0 100644 --- a/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj +++ b/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj @@ -176,6 +176,98 @@ {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core + + {D5D447D7-EF8E-43A6-B9A4-3B025DD9F45D} + Lucene + + + {1C981BB3-26F7-494C-9005-CC27A5144233} + Orchard.ArchiveLater + + + {63FBD4D9-E1DA-4A7B-AA6A-D6074FE50867} + Orchard.Blogs + + + {C0C45321-B51D-4D8D-9B7B-AA4C2E0B2962} + Orchard.CodeGeneration + + + {14C049FD-B35B-415A-A824-87F26B26E7FD} + Orchard.Comments + + + {0E7646E8-FE8F-43C1-8799-D97860925EC4} + Orchard.ContentTypes + + + {05660F47-D649-48BD-9DED-DF4E01E7CFF9} + Orchard.Email + + + {AB3C207C-0126-4143-8D62-1119DF80D366} + Orchard.Experimental + + + {EA2B9121-EF54-40A6-A53E-6593C86EE696} + Orchard.Indexing + + + {8F116B06-1C0E-4E4C-9A0A-D2FAB851E768} + Orchard.jQuery + + + {D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB} + Orchard.Media + + + {EA4F1DA7-F2AB-4384-9AA4-9B756E2026B1} + Orchard.Migrations + + + {17F86780-9A1F-4AA1-86F1-875EEC2730C7} + Orchard.Modules + + + {72457126-E118-4171-A08F-9A709EE4B7FC} + Orchard.MultiTenancy + + + {DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059} + Orchard.Packaging + + + {D10AD48F-407D-4DB5-A328-173EC7CB010F} + Orchard.Roles + + + {4BE4EB01-AC56-4048-924E-2CA77F509ABA} + Orchard.Search + + + {8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4} + Orchard.Setup + + + {5D0F00F0-26C9-4785-AD61-B85710C60EB0} + Orchard.Tags + + + {CDE24A24-01D3-403C-84B9-37722E18DFB7} + Orchard.Themes + + + {79AED36E-ABD0-4747-93D3-8722B042454B} + Orchard.Users + + + {194D3CCC-1153-474D-8176-FDE8D7D0D0BD} + Orchard.Widgets + + + {954CA994-D204-468B-9D69-51F6AD3E1C29} + TinyMce + {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Web.Debug.config b/src/Orchard.Azure/Orchard.Azure.Web/Web.Debug.config index 5b18590d2..3a38cc0c5 100644 --- a/src/Orchard.Azure/Orchard.Azure.Web/Web.Debug.config +++ b/src/Orchard.Azure/Orchard.Azure.Web/Web.Debug.config @@ -1,9 +1,9 @@  - + \ No newline at end of file diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Web.Release.config b/src/Orchard.Azure/Orchard.Azure.Web/Web.Release.config index 5b18590d2..3a38cc0c5 100644 --- a/src/Orchard.Azure/Orchard.Azure.Web/Web.Release.config +++ b/src/Orchard.Azure/Orchard.Azure.Web/Web.Release.config @@ -1,9 +1,9 @@  - + \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogController.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogController.cs index 5523068e1..524ed60c2 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogController.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogController.cs @@ -6,7 +6,7 @@ using System.Xml.Linq; using Orchard.Blogs.Models; using Orchard.Blogs.Routing; using Orchard.Blogs.Services; -using Orchard.Blogs.ViewModels; +using Orchard.ContentManagement; using Orchard.DisplayManagement; using Orchard.Logging; using Orchard.Themes; @@ -53,25 +53,27 @@ namespace Orchard.Blogs.Controllers { if (correctedSlug == null) return HttpNotFound(); - BlogPart blog = _blogService.Get(correctedSlug); - if (blog == null) + var blogPart = _blogService.Get(correctedSlug); + if (blogPart == null) return HttpNotFound(); - var blogPosts = _blogPostService.Get(blog, (page - 1)*pageSize, pageSize).Select(b => _services.ContentManager.BuildDisplay(b, "Summary")); + var blogPosts = _blogPostService.Get(blogPart, (page - 1) * pageSize, pageSize) + .Select(b => _services.ContentManager.BuildDisplay(b, "Summary")); + + blogPart.As().Page = page; + blogPart.As().PageSize = pageSize; + blogPart.As().BlogSlug = correctedSlug; + blogPart.As().ThereIsANextPage = _blogPostService.Get(blogPart, (page) * pageSize, pageSize).Any(); + + var blog = _services.ContentManager.BuildDisplay(blogPart); var list = Shape.List(); list.AddRange(blogPosts); - var blogShape = _services.ContentManager.BuildDisplay(blog); - var model = new DisplayBlogViewModel { - Blog = blogShape, - BlogPostList = list, - Page = page, - PageSize = pageSize - }; - - return View(model); + blog.ContentItem = blogPart; + blog.Content.Add(Shape.Parts_Blogs_BlogPost_List(ContentItems: list), "5"); + return View("Display", blog); } public ActionResult LiveWriterManifest(string blogSlug) { diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogArchivesPartDriver.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogArchivesPartDriver.cs index 44621999e..4bc0982fb 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogArchivesPartDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogArchivesPartDriver.cs @@ -1,6 +1,5 @@ using Orchard.Blogs.Models; using Orchard.Blogs.Services; -using Orchard.Blogs.ViewModels; using Orchard.ContentManagement; using Orchard.ContentManagement.Drivers; using Orchard.Core.ContentsLocation.Models; @@ -16,16 +15,17 @@ namespace Orchard.Blogs.Drivers { } protected override DriverResult Display(BlogArchivesPart part, string displayType, dynamic shapeHelper) { - BlogPart blog = null; - if (!string.IsNullOrWhiteSpace(part.ForBlog)) - blog = _blogService.Get(part.ForBlog); + return ContentShape("Parts_Blogs_BlogArchives", + () => { + BlogPart blog = null; + if (!string.IsNullOrWhiteSpace(part.ForBlog)) + blog = _blogService.Get(part.ForBlog); - if ( blog != null ) { - var model = new BlogPostArchiveViewModel {BlogPart = blog, Archives = _blogPostService.GetArchives(blog)}; - return ContentPartTemplate(model, "Parts/Blogs.BlogArchives"); - } + if (blog == null) + return null; - return null; + return shapeHelper.Parts_Blogs_BlogArchives(ContentItem: part, Blog: blog, Archives: _blogPostService.GetArchives(blog)); + }).Location("Content"); } protected override DriverResult Editor(BlogArchivesPart part, dynamic shapeHelper) { diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPagerPartDriver.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPagerPartDriver.cs new file mode 100644 index 000000000..727ff6b55 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPagerPartDriver.cs @@ -0,0 +1,11 @@ +using Orchard.Blogs.Models; +using Orchard.ContentManagement.Drivers; + +namespace Orchard.Blogs.Drivers { + public class BlogPagerPartDriver : ContentPartDriver { + protected override DriverResult Display(BlogPagerPart part, string displayType, dynamic shapeHelper) { + return ContentShape("Parts_Blogs_Blog_Pager", + () => shapeHelper.Parts_Blogs_Blog_Pager(ContentPart: part, Page: part.Page, PageSize: part.PageSize, BlogSlug: part.BlogSlug, ThereIsANextPage: part.ThereIsANextPage)); + } + } +} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPartDriver.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPartDriver.cs index f3cb14478..9ed222575 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPartDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPartDriver.cs @@ -38,13 +38,15 @@ namespace Orchard.Blogs.Drivers { () => shapeHelper.Parts_Blogs_Blog_Manage(ContentPart: part)), ContentShape("Parts_Blogs_Blog_Description", () => shapeHelper.Parts_Blogs_Blog_Description(ContentPart: part, Description: part.Description)), + // todo: (heskew) implement a paging solution that doesn't require blog posts to be tied to the blog within the controller ContentShape("Parts_Blogs_BlogPost_List", () => { _feedManager.Register(part); - var list = shapeHelper.List(); - list.AddRange(_blogPostService.Get(part) - .Select(bp => _contentManager.BuildDisplay(bp, "Summary"))); - return shapeHelper.Parts_Blogs_BlogPost_List(ContentPart: part, ContentItems: list); + return null; + // var list = shapeHelper.List(); + // list.AddRange(_blogPostService.Get(part) + // .Select(bp => _contentManager.BuildDisplay(bp, "Summary"))); + // return shapeHelper.Parts_Blogs_BlogPost_List(ContentPart: part, ContentItems: list); }), ContentShape("Parts_Blogs_BlogPost_List_Admin", () => { diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/RecentBlogPostsPartDriver.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/RecentBlogPostsPartDriver.cs index ed5cb1adf..ac7ec0313 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/RecentBlogPostsPartDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/RecentBlogPostsPartDriver.cs @@ -18,7 +18,7 @@ namespace Orchard.Blogs.Drivers { } protected override DriverResult Display(RecentBlogPostsPart part, string displayType, dynamic shapeHelper) { - IEnumerable blogPosts = null; + IEnumerable blogPosts; BlogPart blog = null; if (!string.IsNullOrWhiteSpace(part.ForBlog)) @@ -32,7 +32,6 @@ namespace Orchard.Blogs.Drivers { .Select(ci => ci.As()); } else { - var blogs = _blogService.Get().ToList(); blogPosts = _contentManager.Query(VersionOptions.Published, "BlogPost") .Join() .OrderByDescending(cr => cr.CreatedUtc) @@ -41,12 +40,11 @@ namespace Orchard.Blogs.Drivers { } var list = shapeHelper.List(); - list.AddRange(blogPosts.Select(bp => _contentManager.BuildDisplay(bp, "Summary.BlogPost"))); + list.AddRange(blogPosts.Select(bp => _contentManager.BuildDisplay(bp, "Summary"))); - var blogPostList = shapeHelper.Parts_Blogs_BlogPost_List(ContentPart: part, BlogPosts: list); - blogPostList.Metadata.Type = "Parts_Blogs_BlogPost.List"; + var blogPostList = shapeHelper.Parts_Blogs_BlogPost_List(ContentPart: part, ContentItems: list); - return ContentShape(blogPostList).Location("Primary"); + return ContentShape(shapeHelper.Parts_Blogs_RecentBlogPosts(ContentItem: part, ContentItems: blogPostList)); } protected override DriverResult Editor(RecentBlogPostsPart part, dynamic shapeHelper) { diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Migrations.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Migrations.cs index 51d8f85fb..5dd7888a5 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Migrations.cs @@ -89,5 +89,11 @@ namespace Orchard.Blogs { return 5; } + + public int UpdateFrom5() { + ContentDefinitionManager.AlterTypeDefinition("Blog", + cfg => cfg.WithPart("BlogPagerPart")); + return 6; + } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPagerPart.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPagerPart.cs new file mode 100644 index 000000000..e5e9b4132 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Models/BlogPagerPart.cs @@ -0,0 +1,10 @@ +using Orchard.ContentManagement; + +namespace Orchard.Blogs.Models { + public class BlogPagerPart : ContentPart { + public int Page { get; set; } + public int PageSize { get; set; } + public string BlogSlug { get; set; } + public bool ThereIsANextPage { get; set; } + } +} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj b/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj index f66a94a27..a3ef9685a 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj @@ -68,11 +68,13 @@ + + @@ -107,8 +109,7 @@ - - + @@ -161,7 +162,7 @@ Designer - + @@ -169,6 +170,8 @@ + + diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Placement.info b/src/Orchard.Web/Modules/Orchard.Blogs/Placement.info index 7a90c2c0e..107de8e35 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Placement.info +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Placement.info @@ -1,13 +1,23 @@  - - - - + + + + + + + - + + { +// var blog = created.Shape; +// blog.Content.Add(created.New.Parts_Blogs_BlogPost_List(ContentPart: blog.ContentItem, ContentItems: blog.)); +// }) +// .OnDisplaying(displaying => { +// ContentItem contentItem = displaying.Shape.ContentItem; +// if (contentItem != null) { +// var zoneName = contentItem.As().Zone; +// displaying.ShapeMetadata.Alternates.Add("Items_Widget__" + contentItem.ContentType); +// displaying.ShapeMetadata.Alternates.Add("Items_Widget__" + zoneName); +// } +// }); +// } +// } +//} diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogPostArchiveViewModel.cs b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogPostArchiveViewModel.cs deleted file mode 100644 index a2c6541ca..000000000 --- a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/BlogPostArchiveViewModel.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Collections.Generic; -using Orchard.Blogs.Models; - -namespace Orchard.Blogs.ViewModels { - public class BlogPostArchiveViewModel { - 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/DisplayBlogViewModel.cs b/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/DisplayBlogViewModel.cs deleted file mode 100644 index 9639d425e..000000000 --- a/src/Orchard.Web/Modules/Orchard.Blogs/ViewModels/DisplayBlogViewModel.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Orchard.Blogs.ViewModels { - public class DisplayBlogViewModel { - public dynamic Blog { get; set; } - public dynamic BlogPostList { get; set; } - public int Page { get; set; } - public int PageSize { get; set; } - } -} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Blog/Item.cshtml b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Blog/Item.cshtml index 7b03eeae4..6057ccc62 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Blog/Item.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Blog/Item.cshtml @@ -1,26 +1,2 @@ -@model Orchard.Blogs.ViewModels.DisplayBlogViewModel -@using Orchard.Blogs.Extensions; -@{ - Style.Include("pagination.css"); -} -@Display(Model.Blog) -@if (Model.BlogPostList.Items.Count > 0) { - @Display(Model.BlogPostList) - -
    - @if(Model.BlogPostList.Items.Count == Model.PageSize) { -
  • - @Html.ActionLink(T("Older Posts").Text, "Item", new { Area = "Orchard.Blogs", blogSlug = Model.Blog.Slug, page = Model.Page + 1 }) -
  • - } - - @if(Model.Page > 1) { -
  • - @Html.ActionLink(T("Newer Posts").Text, "Item", new { Area = "Orchard.Blogs", blogSlug = Model.Blog.Slug, page = Model.Page - 1 }) -
  • - } -
-} -else { -

@T("There are no posts for this blog.")

-} \ No newline at end of file +@Display(Model.Meta) +@Display(Model.Content) \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Parts/Blogs.BlogArchives.cshtml b/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Parts/Blogs.BlogArchives.cshtml index 3f67d5472..1f29a1f88 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Parts/Blogs.BlogArchives.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Parts/Blogs.BlogArchives.cshtml @@ -3,6 +3,6 @@
@Html.LabelFor(m => m.ForBlog) @Html.TextBoxFor(m => m.ForBlog) - @T("The blog's slug to display the archives for.") + @T("Show the archives for which blog? Note: specify the blog's slug.")
\ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.Blog.Pager.cshtml b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.Blog.Pager.cshtml new file mode 100644 index 000000000..925ad6eef --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.Blog.Pager.cshtml @@ -0,0 +1,18 @@ +@using Orchard.Blogs.Extensions; +@{ + Style.Include("pagination.css"); +} +@if (Model.ThereIsANextPage || Model.Page > 1) { +
    + @if(Model.ThereIsANextPage) { +
  • + @Html.ActionLink(T("Older Posts").Text, "Item", new { Area = "Orchard.Blogs", blogSlug = Model.BlogSlug, page = Model.Page + 1 }) +
  • + } + @if(Model.Page > 1) { +
  • + @Html.ActionLink(T("Newer Posts").Text, "Item", new { Area = "Orchard.Blogs", blogSlug = Model.BlogSlug, page = Model.Page - 1 }) +
  • + } +
+} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.BlogArchives.cshtml b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.BlogArchives.cshtml similarity index 50% rename from src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.BlogArchives.cshtml rename to src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.BlogArchives.cshtml index 072dda3bd..9b6c5910b 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.BlogArchives.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.BlogArchives.cshtml @@ -1,23 +1,20 @@ -@model Orchard.Blogs.ViewModels.BlogPostArchiveViewModel -@using Orchard.Blogs.Extensions; - +@using Orchard.Blogs.Extensions; +@using Orchard.Blogs.Models; @{ Style.Require("BlogsArchives"); Script.Require("BlogsArchives"); + IEnumerable> archives = Model.Archives; } -

@T("Archives")

- @if (Model.Archives.Count() > 20) { + @if (archives.Count() > 20) {
    @{ - int lastYear = Model.Archives.First().Key.Year; - int firstYear = Model.Archives.Last().Key.Year; + int lastYear = archives.First().Key.Year; + int firstYear = archives.Last().Key.Year; } - - @for (int year = lastYear; year >= firstYear; year--) { - var yearMonths = Model.Archives.Where(m => m.Key.Year == year); + var yearMonths = archives.Where(m => m.Key.Year == year); if (year == lastYear) {
  • @@ -28,15 +25,14 @@ if (year != lastYear) {
  • } } -
} - else if (Model.Archives.Count() > 0) { - @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 if (archives.Count() > 0) { + @Html.UnorderedList(archives, (t, i) => Html.Link(string.Format("{0:MMMM yyyy} ({1})", t.Key.ToDateTime(), t.Value), Url.BlogArchiveMonth((string)Model.BlogPart.Slug, t.Key.Year, t.Key.Month)), "archiveMonthList") } else {
@T("None found")
diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.BlogPost.List.cshtml b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.BlogPost.List.cshtml index 86506523a..c5ad057ad 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.BlogPost.List.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.BlogPost.List.cshtml @@ -1,9 +1,7 @@ @{ - IEnumerable blogPosts = Model.BlogPosts; + IEnumerable blogPosts = Model.ContentItems; } -@Display(ContentItems) +@Display(Model.ContentItems) @if (blogPosts == null || blogPosts.Count() < 1) {

@T("There are no posts for this blog.")

-} - -hi \ No newline at end of file +} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.RecentBlogPosts.cshtml b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.RecentBlogPosts.cshtml new file mode 100644 index 000000000..46e0c33a4 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.RecentBlogPosts.cshtml @@ -0,0 +1 @@ +@Display(Model.ContentItems) \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Views/Parts/Comments.Comments.cshtml b/src/Orchard.Web/Modules/Orchard.Comments/Views/Parts/Comments.Comments.cshtml index a8a7206ab..0b4162ba8 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Views/Parts/Comments.Comments.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Comments/Views/Parts/Comments.Comments.cshtml @@ -42,10 +42,12 @@ using (Html.BeginForm("Create", "Comment", new { area = "Orchard.Comments" }, Fo @Html.Hidden("Name", WorkContext.CurrentUser.UserName ?? "") @Html.Hidden("Email", WorkContext.CurrentUser.Email ?? "") } + +

@if (Request.IsAuthenticated) { @T("Hi, {0}!", Html.Encode(WorkContext.CurrentUser.UserName))}

  1. - +
  2. diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Commands/FeatureCommands.cs b/src/Orchard.Web/Modules/Orchard.Modules/Commands/FeatureCommands.cs index e44d71829..5fadbcd3c 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Commands/FeatureCommands.cs +++ b/src/Orchard.Web/Modules/Orchard.Modules/Commands/FeatureCommands.cs @@ -79,7 +79,7 @@ namespace Orchard.Modules.Commands { [CommandName("feature disable")] public void Disable(params string[] featureNames) { Context.Output.WriteLine(T("Disabling features {0}", string.Join(",", featureNames))); - _moduleService.DisableFeatures(featureNames); + _moduleService.DisableFeatures(featureNames, true); Context.Output.WriteLine(T("Disabled features {0}", string.Join(",", featureNames))); } } diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs b/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs index 446c4d66a..59807fd95 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs +++ b/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs @@ -95,9 +95,10 @@ namespace Orchard.Modules.Services { public void DisableFeatures(IEnumerable features, bool force) { var shellDescriptor = _shellDescriptorManager.GetShellDescriptor(); var enabledFeatures = shellDescriptor.Features.ToList(); + var availableFeatures = GetAvailableFeatures().ToList(); var featuresToDisable = - features.Select(s => DisableFeature(s, GetAvailableFeatures(), force)).SelectMany( + features.Select(s => DisableFeature(s, availableFeatures, force)).SelectMany( ies => ies.Select(s => s)); if (featuresToDisable.Count() == 0) diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Drivers/TagsPartDriver.cs b/src/Orchard.Web/Modules/Orchard.Tags/Drivers/TagsPartDriver.cs index 2b63945e2..dde0560c6 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Drivers/TagsPartDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Tags/Drivers/TagsPartDriver.cs @@ -2,7 +2,6 @@ using JetBrains.Annotations; using Orchard.ContentManagement; using Orchard.ContentManagement.Drivers; -using Orchard.Core.ContentsLocation.Models; using Orchard.Security; using Orchard.Tags.Helpers; using Orchard.Tags.Models; @@ -12,6 +11,7 @@ using Orchard.Tags.ViewModels; namespace Orchard.Tags.Drivers { [UsedImplicitly] public class TagsPartDriver : ContentPartDriver { + private const string TemplateName = "Parts/Tags"; private readonly ITagService _tagService; private readonly IAuthorizationService _authorizationService; @@ -23,6 +23,10 @@ namespace Orchard.Tags.Drivers { public virtual IUser CurrentUser { get; set; } + protected override string Prefix { + get { return "Tags"; } + } + protected override DriverResult Display(TagsPart part, string displayType, dynamic shapeHelper) { return ContentShape("Parts_Tags_ShowTags", () => shapeHelper.Parts_Tags_ShowTags(ContentPart: part, Tags: part.CurrentTags)); @@ -35,7 +39,9 @@ namespace Orchard.Tags.Drivers { var model = new EditTagsViewModel { Tags = string.Join(", ", part.CurrentTags.Select((t, i) => t.TagName).ToArray()) }; - return ContentPartTemplate(model, "Parts/Tags.EditTags").Location(part.GetLocation("Editor")); + + return ContentShape("Parts_Tags_Editor", + () => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: model, Prefix: Prefix)); } protected override DriverResult Editor(TagsPart part, IUpdateModel updater, dynamic shapeHelper) { @@ -50,7 +56,8 @@ namespace Orchard.Tags.Drivers { _tagService.UpdateTagsForContentItem(part.ContentItem.Id, tagNames); } - return ContentPartTemplate(model, "Parts/Tags.EditTags").Location(part.GetLocation("Editor")); + return ContentShape("Parts_Tags_Editor", + () => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: model, Prefix: Prefix)); } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Orchard.Tags.csproj b/src/Orchard.Web/Modules/Orchard.Tags/Orchard.Tags.csproj index 819b7050b..045ae63fc 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Orchard.Tags.csproj +++ b/src/Orchard.Web/Modules/Orchard.Tags/Orchard.Tags.csproj @@ -98,7 +98,7 @@ - + diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Placement.info b/src/Orchard.Web/Modules/Orchard.Tags/Placement.info index cc123898e..8fecfe31d 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Placement.info +++ b/src/Orchard.Web/Modules/Orchard.Tags/Placement.info @@ -1,3 +1,4 @@  + diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Views/EditorTemplates/Parts/Tags.EditTags.cshtml b/src/Orchard.Web/Modules/Orchard.Tags/Views/EditorTemplates/Parts/Tags.cshtml similarity index 100% rename from src/Orchard.Web/Modules/Orchard.Tags/Views/EditorTemplates/Parts/Tags.EditTags.cshtml rename to src/Orchard.Web/Modules/Orchard.Tags/Views/EditorTemplates/Parts/Tags.cshtml diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.cshtml index 80f10f300..0c5f3a985 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.cshtml @@ -5,21 +5,23 @@ @Html.ValidationSummary(T("Login was unsuccessful. Please correct the errors and try again.").ToString()) @using (Html.BeginFormAntiForgeryPost(Url.Action("LogOn", new {ReturnUrl = Request.QueryString["ReturnUrl"]}))) { -
  3. +
  4. @Html.Password("password") @Html.ValidationMessage("password") - -
    +
  5. +
  6. @Html.CheckBox("rememberMe") - +
  7. +
} \ No newline at end of file diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css index 3ecadbd85..bd44928bd 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css +++ b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css @@ -401,12 +401,16 @@ button:focus, .button:focus { /* For testing purposes */ -#comments { +#comments, #commenter { font-size:1.6em; font-weight:600; margin:1.2em 0 1.8em 1.2em; } +#commenter { + margin:1.2em 0 0 1em; +} + ul.comments, form.comment { margin:1.2em 0 1.2em 1.8em; list-style: none; diff --git a/src/Orchard.sln b/src/Orchard.sln index b21c15219..7f33dc2ef 100644 --- a/src/Orchard.sln +++ b/src/Orchard.sln @@ -44,6 +44,9 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Tests", "Tools\Orchard.Tests\Orchard.Tests.csproj", "{0DFA2E10-96C8-4E05-BC10-B710B97ECCDE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Notes", "_Notes", "{8A49DB66-40B2-4B6A-BFF0-D4839A240D00}" + ProjectSection(SolutionItems) = preProject + Shapes.txt = Shapes.txt + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Modules", "Orchard.Web\Modules\Orchard.Modules\Orchard.Modules.csproj", "{17F86780-9A1F-4AA1-86F1-875EEC2730C7}" EndProject