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

@@ -259,7 +259,6 @@ a:hover, a:active, a:focus {
margin:0 0 1.5em;
}
#main .meta {
font-style:italic;
margin:0 0 .4em;
}
#main form {
@@ -268,9 +267,6 @@ a:hover, a:active, a:focus {
#main h2 {
border-bottom:1px dashed #e4e7dc;
}
#main h3 {
border-bottom:2px solid #e4e7dc;
}
/* Confirmations, Messages and the like
----------------------------------------------------------*/
@@ -410,7 +406,30 @@ button:focus, .button:focus {
padding-top:.3em;
}
/* Icon buttons
----------------------------------------------------------*/
a.ibutton {
background:url(images/icons.png) 20px 20px;
border:none;
display:inline;
float:left;
height:16px;
overflow:hidden;
padding:0 0 0 16px;
width:0;
}
a.ibutton.add.page:hover,
a.ibutton.add.page:focus { background-position:-40px 0; }
a.ibutton.add.page { background-position:-40px -20px; }
a.ibutton.edit:hover,
a.ibutton.edit:focus { background-position:-60px 0; }
a.ibutton.edit { background-position:-60px -20px; }
a.ibutton.remove:hover,
a.ibutton.remove:focus { background-position:0 0; }
a.ibutton.remove { background-position:0 -20px; }
a.ibutton.view:hover,
a.ibutton.view:focus { background-position:-20px 0; }
a.ibutton.view { background-position:-20px -20px; }
/* todo: (heskew) needs attention */
@@ -480,7 +499,7 @@ caption {
text-indent:0;
}
col {
border-spacing:;
border-spacing:0;
display:table-column;
}
colgroup
@@ -542,26 +561,46 @@ todo: (heskew) pull out into relevant modules where appropriate
/* Blogs
----------------------------------------------------------*/
ul.blogs, ul.posts {
margin:0 0 1.4em;
background:#FFF;
border:1px solid #B0B083;
-moz-border-radius:4px;
-webkit-border-top-radius:4px;
border-radius:4px;
margin:1.4em 0;
padding:2px;
}
ul.blogs li, ul.posts li {
background:#FFF;
border-bottom:1px solid #EAE9D9;
margin:0;
overflow:hidden;
padding:0 0 1.4em;
padding:.7em 1.4em;
}
ul.blogs li.last, ul.posts li.last {
border-bottom:0;
}
#main ul.blogs li h3, #main ul.posts li h3 {
margin:0 0 .5em;
margin:0 0 .1em;
}
/* todo: (heskew) clean up since this is a bit of a hack specific to a single page */
#main ul.blogs li .actions, #main ul.posts li .actions {
color:#EAE9D9;
height:auto;
margin:-1.3em 0 0;
padding:0 0 .1em;
visibility:hidden;
}
#main ul.blogs li:hover .actions, #main ul.posts li:hover .actions {
visibility:visible;
#main ul.blogs li .actions .ibutton {
margin-right:8px;
}
#main ul.blogs li .actions .destruct .ibutton {
margin-left:8px;
margin-right:0;
}
#main ul.blogs li:hover a.ibutton.add.page { background-position:-40px 0; }
#main ul.blogs li:hover a.ibutton.edit { background-position:-60px 0; }
#main ul.blogs li:hover a.ibutton.remove { background-position:0 0; }
#main ul.blogs li:hover a.ibutton.view { background-position:-20px 0; }
/* todo: (heskew) needs attention */

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

View File

@@ -165,6 +165,7 @@
<ItemGroup>
<Content Include="Config\Diagnostics.config" />
<Content Include="Content\Admin\css\base.css" />
<Content Include="Content\Admin\css\images\icons.png" />
<Content Include="Content\Admin\css\Site.css" />
<Content Include="Content\Images\headerBackground.gif" />
<Content Include="Content\Images\header_background.gif" />

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>