mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Updating the blogs admin to show unpublished blogs to fix the publish/unpublish workflow
work item: 16763 --HG-- branch : dev
This commit is contained in:
@@ -135,7 +135,7 @@ namespace Orchard.Blogs.Controllers {
|
||||
|
||||
public ActionResult List() {
|
||||
var list = Services.New.List();
|
||||
list.AddRange(_blogService.Get()
|
||||
list.AddRange(_blogService.Get(VersionOptions.Latest)
|
||||
.Select(b => {
|
||||
var blog = Services.ContentManager.BuildDisplay(b, "SummaryAdmin");
|
||||
blog.TotalPostCount = _blogPostService.Get(b, VersionOptions.Latest).Count();
|
||||
|
@@ -29,7 +29,11 @@ namespace Orchard.Blogs.Services {
|
||||
}
|
||||
|
||||
public IEnumerable<BlogPart> Get() {
|
||||
return _contentManager.Query<BlogPart, BlogPartRecord>()
|
||||
return Get(VersionOptions.Published);
|
||||
}
|
||||
|
||||
public IEnumerable<BlogPart> Get(VersionOptions versionOptions) {
|
||||
return _contentManager.Query<BlogPart, BlogPartRecord>(versionOptions)
|
||||
.Join<RoutePartRecord>()
|
||||
.OrderBy(br => br.Title)
|
||||
.List();
|
||||
|
@@ -7,6 +7,7 @@ namespace Orchard.Blogs.Services {
|
||||
BlogPart Get(string slug);
|
||||
ContentItem Get(int id, VersionOptions versionOptions);
|
||||
IEnumerable<BlogPart> Get();
|
||||
IEnumerable<BlogPart> Get(VersionOptions versionOptions);
|
||||
void Delete(ContentItem blog);
|
||||
}
|
||||
}
|
@@ -21,7 +21,6 @@
|
||||
</div>
|
||||
<div class="related">
|
||||
@Display(Model.Actions)
|
||||
<a href="@Url.Blog(blog)" title="@T("View")">@T("View")</a>@T(" | ")
|
||||
<a href="@Url.BlogForAdmin(blog)" title="@T("List Posts")">@T("List Posts")</a>@T(" | ")
|
||||
<a href="@Url.BlogPostCreate(blog)" title="@T("New Post")">@T("New Post")</a>@T(" | ")
|
||||
<a href="@Url.BlogEdit(blog)" title="@T("Edit")">@T("Edit")</a>@T(" | ")
|
||||
|
Reference in New Issue
Block a user