Added an admin blog management page and changed some links throughout the blog admin to point to it instead of the blog edit page.

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043012
This commit is contained in:
ErikPorter
2009-12-03 04:30:34 +00:00
parent f5f9f5fa77
commit fe099c157a
10 changed files with 79 additions and 7 deletions

View File

@@ -51,6 +51,19 @@ namespace Orchard.Blogs.Controllers {
return View(new BlogViewModel { Blog = blog, Posts = posts });
}
//TODO: (erikpo) Should move the slug parameter and get call and null check up into a model binder
public ActionResult ItemForAdmin(string blogSlug)
{
Blog blog = _blogService.Get(blogSlug);
if (blog == null)
return new NotFoundResult();
IEnumerable<BlogPost> posts = _blogPostService.Get(blog);
return View(new BlogForAdminViewModel { Blog = blog, Posts = posts });
}
public ActionResult Create() {
return View(new CreateBlogViewModel());
}