More blogs admin UI work (blog posts)

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043018
This commit is contained in:
skewed
2009-12-03 05:22:33 +00:00
parent 3a60f63e95
commit 04cb321de5
5 changed files with 27 additions and 13 deletions

View File

@@ -155,6 +155,7 @@ h6, p, label, input, select, .button, .cancel /* todo: (heskew) need to do somet
.message, th, td { font-size:1.5em; line-height:1.5em; } /* 15px */
p .button,
td *, .mceLayout td { font-size:inherit; }
.meta { font-size:1.2em; }
h3 span { font-size:.57em; } /* 12px */
@@ -257,6 +258,10 @@ a:hover, a:active, a:focus {
#main p {
margin:0 0 1.5em;
}
#main .meta {
font-style:italic;
margin:0 0 .75em;
}
#main form {
margin:.345em 0 1.5em;
}
@@ -536,25 +541,25 @@ todo: (heskew) pull out into relevant modules where appropriate
/* Blogs
----------------------------------------------------------*/
ul.blogs {
margin:1.4em 0;
ul.blogs, ul.posts {
margin:0 0 1.4em;
}
ul.blogs li {
ul.blogs li, ul.posts li {
margin:0;
overflow:hidden;
padding:0 0 .4em;
}
#main ul.blogs li h3 {
#main ul.blogs li h3, #main ul.posts li h3 {
margin:0 0 .5em;
}
/* todo: (heskew) clean up since this is a bit of a hack specific to a single page */
#main ul.blogs li .actions {
#main ul.blogs li .actions, #main ul.posts li .actions {
height:auto;
margin:-1.5em 0 0;
padding:0 0 .1em;
visibility:hidden;
}
#main ul.blogs li:hover .actions {
#main ul.blogs li:hover .actions, #main ul.posts li:hover .actions {
visibility:visible;
}

View File

@@ -2,6 +2,7 @@
<%@ 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>
<%--<p>[list of authors] [modify blog access]</p>--%>
<p><%=Model.Description %></p>
<p class="actions">

View File

@@ -3,11 +3,11 @@
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h2><a href="<%=Url.BlogForAdmin(Model.Blog.Slug) %>"><%=Html.Encode(Model.Blog.Name) %></a></h2>
<p><%=Model.Blog.Description %></p>
<div><a href="<%=Url.BlogEdit(Model.Blog.Slug) %>">(edit)</a></div><%
<div class="manage"><a href="<%=Url.BlogEdit(Model.Blog.Slug) %>" class="button">Edit</a></div>
<p><%=Model.Blog.Description %></p><%
//TODO: (erikpo) Move this into a helper
if (Model.Posts.Count() > 0) { %>
<ul><%
<ul class="posts"><%
foreach (BlogPost post in Model.Posts) { %>
<li><% Html.RenderPartial("BlogPostPreviewForAdmin", post); %></li><%
} %>

View File

@@ -3,8 +3,8 @@
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"
%><div class="actions"><a class="add button" href="<%=Url.BlogCreate() %>">Create a New Blog</a></div><%
%><div class="actions"><a class="add button" href="<%=Url.BlogCreate() %>">Create a Blog</a></div><%
if (Model.Blogs.Count() > 0) { %>
<%=Html.UnorderedList(Model.Blogs, (b, i) => Html.DisplayFor(blog => b, "BlogForAdmin").ToHtmlString(), "blogs") %>
<div class="actions"><a class="add button" href="<%=Url.BlogCreate() %>">Create a New Blog</a></div><%
<div class="actions"><a class="add button" href="<%=Url.BlogCreate() %>">Create a Blog</a></div><%
} %>

View File

@@ -4,5 +4,13 @@
<%@ Import Namespace="Orchard.Core.Common.Models"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h3><a href="<%=Url.BlogPostEdit(Model.Blog.Slug, Model.As<RoutableAspect>().Slug) %>"><%=Html.Encode(Model.As<RoutableAspect>().Title) %></a></h3>
<div class="posted"><%=Html.Published() %></div>
<div class="content"><%=Model.Body %></div>
<div class="meta"><%=Html.Published() %></div>
<div class="content"><%=Model.Body ?? "<p><em>there's no content for this blog post</em></p>" %></div>
<p class="actions">
<%-- todo: (heskew) make into a ul --%>
<span class="construct">
<a href="<%=Url.BlogPostEdit(Model.Blog.Slug, Model.As<RoutableAspect>().Slug) %>">edit</a>
| <a href="<%=Url.BlogPost(Model.Blog.Slug, Model.As<RoutableAspect>().Slug) %>">view</a>
</span>
<span class="destruct"><a href="#">delete</a></span>
</p>