mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Finishing up edit blog post to match new templating.
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043665
This commit is contained in:
@@ -145,8 +145,10 @@ namespace Orchard.Blogs.Controllers {
|
||||
if (post == null)
|
||||
return new NotFoundResult();
|
||||
|
||||
var model = new BlogPostEditViewModel { Blog = blog, BlogPost = null };
|
||||
//model.EditorModel = _contentManager.BuildEditorModel(model.Post.ContentItem, null);
|
||||
var model = new BlogPostEditViewModel {
|
||||
BlogPost = _contentManager.BuildEditorModel(post, null)
|
||||
};
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
@@ -166,8 +168,9 @@ namespace Orchard.Blogs.Controllers {
|
||||
if (post == null)
|
||||
return new NotFoundResult();
|
||||
|
||||
var model = new BlogPostEditViewModel { Blog = blog, BlogPost = null };
|
||||
//model.EditorModel = _contentManager.UpdateEditorModel(model.Post, null, this);
|
||||
var model = new BlogPostEditViewModel {
|
||||
BlogPost = _contentManager.UpdateEditorModel(post, null, this)
|
||||
};
|
||||
|
||||
IValueProvider values = input.ToValueProvider();
|
||||
TryUpdateModel(model, values);
|
||||
|
@@ -4,7 +4,6 @@ using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.Blogs.ViewModels {
|
||||
public class BlogPostEditViewModel : AdminViewModel {
|
||||
public Blog Blog { get; set; }
|
||||
public ItemEditorModel<BlogPost> BlogPost { get; set; }
|
||||
}
|
||||
}
|
@@ -6,6 +6,6 @@
|
||||
<h2>Edit Post</h2>
|
||||
<% using (Html.BeginForm()) { %>
|
||||
<%=Html.ValidationSummary() %>
|
||||
<%=Html.EditorForModel() %>
|
||||
<%=Html.EditorForItem(m => m.BlogPost) %>
|
||||
<% } %>
|
||||
<% Html.Include("AdminFoot"); %>
|
Reference in New Issue
Block a user