mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-24 13:33:34 +08:00
Added all the infrastructure for deleting Blogs and BlogPosts.
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043102
This commit is contained in:
@@ -116,6 +116,21 @@ namespace Orchard.Blogs.Controllers {
|
||||
return Redirect(Url.BlogsForAdmin());
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult Delete(string blogSlug) {
|
||||
//TODO: (erikpo) Move looking up the current blog up into a modelbinder
|
||||
Blog blog = _blogService.Get(blogSlug);
|
||||
|
||||
if (blog == null)
|
||||
return new NotFoundResult();
|
||||
|
||||
_blogService.Delete(blog);
|
||||
|
||||
_notifier.Information(T("Blog was successfully deleted"));
|
||||
|
||||
return Redirect(Url.Blogs());
|
||||
}
|
||||
|
||||
bool IUpdateModel.TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) {
|
||||
return TryUpdateModel(model, prefix, includeProperties, excludeProperties);
|
||||
}
|
||||
|
Reference in New Issue
Block a user