More blogs admin UI work (making /admin/blogs look more betterer)

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043103
This commit is contained in:
skewed
2009-12-03 20:11:54 +00:00
parent a13df76497
commit 5645d55958
6 changed files with 59 additions and 21 deletions

View File

@@ -112,11 +112,10 @@ namespace Orchard.Blogs.Controllers {
_notifier.Information(T("Blog information updated"));
//TODO: (erikpo) This should redirect to the blog homepage in the admin once that page is created
return Redirect(Url.BlogsForAdmin());
}
[HttpPost]
//[HttpPost] <- todo: (heskew) make all add/edit/remove POST only and verify the AntiForgeryToken
public ActionResult Delete(string blogSlug) {
//TODO: (erikpo) Move looking up the current blog up into a modelbinder
Blog blog = _blogService.Get(blogSlug);
@@ -128,7 +127,7 @@ namespace Orchard.Blogs.Controllers {
_notifier.Information(T("Blog was successfully deleted"));
return Redirect(Url.Blogs());
return Redirect(Url.BlogsForAdmin());
}
bool IUpdateModel.TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) {

View File

@@ -2,16 +2,15 @@
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h3><a href="<%=Url.BlogForAdmin(Model.Slug) %>"><%=Html.Encode(Model.Name) %></a></h3>
<div class="meta"><%=Model.PostCount %> posts</div>
<div class="meta"><a href="<%=Url.BlogForAdmin(Model.Slug) %>"><%=Model.PostCount %> posts</a> | <a href="#"><%=(new Random()).Next(0, 1000) %> comments</a></div>
<%--<p>[list of authors] [modify blog access]</p>--%>
<p><%=Model.Description %></p>
<p class="actions">
<%-- todo: (heskew) make into a ul --%>
<span class="construct">
<a href="<%=Url.BlogForAdmin(Model.Slug) %>">All Posts</a>
| <a href="<%=Url.BlogEdit(Model.Slug) %>">Edit</a>
| <a href="<%=Url.Blog(Model.Slug) %>">View</a>
| <a href="<%=Url.BlogPostCreate(Model.Slug) %>">Create a Blog Post</a>
<a href="<%=Url.BlogEdit(Model.Slug) %>" class="ibutton edit" title="Edit Blog">Edit Blog</a>
<a href="<%=Url.Blog(Model.Slug) %>" class="ibutton view" title="View Blog">View Blog</a>
<a href="<%=Url.BlogPostCreate(Model.Slug) %>" class="ibutton add page" title="Create a Blog Post">Create a Blog Post</a>
</span>
<span class="destruct"><a href="#">Delete Blog</a></span>
<span class="destruct"><a href="<%=Url.BlogDelete(Model.Slug) %>" class="ibutton remove" title="Delete Blog">Remove Blog</a></span>
</p>