mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
More blogs admin UI work (mostly on /admin/blogs/<blog name>)
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043110
This commit is contained in:
@@ -409,27 +409,32 @@ button:focus, .button:focus {
|
|||||||
/* Icon buttons
|
/* Icon buttons
|
||||||
----------------------------------------------------------*/
|
----------------------------------------------------------*/
|
||||||
a.ibutton {
|
a.ibutton {
|
||||||
background:url(images/icons.png) 20px 20px;
|
background:url(images/icons.png) 0 -20px;
|
||||||
border:none;
|
border:none;
|
||||||
display:inline;
|
display:inline;
|
||||||
float:left;
|
float:left;
|
||||||
height:16px;
|
height:17px;
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
padding:0 0 0 16px;
|
padding:0 0 0 17px;
|
||||||
width:0;
|
width:0;
|
||||||
}
|
}
|
||||||
a.ibutton.add.page:hover,
|
a.ibutton:hover,
|
||||||
a.ibutton.add.page:focus { background-position:-40px 0; }
|
a.ibutton:focus { background-position:0 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:hover,
|
||||||
a.ibutton.remove:focus { background-position:0 0; }
|
a.ibutton.remove:focus { background-position:-20px 0; }
|
||||||
a.ibutton.remove { background-position:0 -20px; }
|
a.ibutton.remove { background-position:-20px -20px; }
|
||||||
a.ibutton.view:hover,
|
a.ibutton.view:hover,
|
||||||
a.ibutton.view:focus { background-position:-20px 0; }
|
a.ibutton.view:focus { background-position:-40px 0; }
|
||||||
a.ibutton.view { background-position:-20px -20px; }
|
a.ibutton.view { background-position:-40px -20px; }
|
||||||
|
a.ibutton.add.page:hover,
|
||||||
|
a.ibutton.add.page:focus { background-position:-60px 0; }
|
||||||
|
a.ibutton.add.page { background-position:-60px -20px; }
|
||||||
|
a.ibutton.edit:hover,
|
||||||
|
a.ibutton.edit:focus { background-position:-80px 0; }
|
||||||
|
a.ibutton.edit { background-position:-80px -20px; }
|
||||||
|
a.ibutton.publish:hover,
|
||||||
|
a.ibutton.publish:focus { background-position:-100px 0; }
|
||||||
|
a.ibutton.publish { background-position:-100px -20px; }
|
||||||
|
|
||||||
|
|
||||||
/* todo: (heskew) needs attention */
|
/* todo: (heskew) needs attention */
|
||||||
@@ -461,8 +466,48 @@ ol.actions label {
|
|||||||
margin:10px 2px 0 0;
|
margin:10px 2px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Content item lists
|
||||||
|
----------------------------------------------------------*/
|
||||||
|
ul.contentItems {
|
||||||
|
background:#FFF;
|
||||||
|
border:1px solid #B0B083;
|
||||||
|
margin:1.4em 0;
|
||||||
|
padding:2px;
|
||||||
|
}
|
||||||
|
ul.contentItems li {
|
||||||
|
background:#FFF;
|
||||||
|
border-bottom:1px solid #EAE9D9;
|
||||||
|
margin:0;
|
||||||
|
overflow:hidden;
|
||||||
|
padding:.7em 1.4em;
|
||||||
|
}
|
||||||
|
ul.contentItems li.last {
|
||||||
|
border-bottom:0;
|
||||||
|
}
|
||||||
|
#main ul.contentItems li h3 {
|
||||||
|
margin:0 0 .1em;
|
||||||
|
}
|
||||||
|
/* todo: (heskew) clean up since this is a bit of a hack specific to a single page */
|
||||||
|
#main ul.contentItems li .actions {
|
||||||
|
color:#EAE9D9;
|
||||||
|
height:auto;
|
||||||
|
margin:-1.3em 0 0;
|
||||||
|
padding:0 0 .1em;
|
||||||
|
}
|
||||||
|
#main ul.contentItems li .actions .ibutton {
|
||||||
|
margin-right:6px;
|
||||||
|
}
|
||||||
|
#main ul.contentItems li .actions .destruct .ibutton {
|
||||||
|
margin-left:8px;
|
||||||
|
margin-right:0;
|
||||||
|
}
|
||||||
|
#main ul.contentItems li:hover { background:#fafbed; }
|
||||||
|
#main ul.contentItems li:hover a.ibutton { background-position:0 0; }
|
||||||
|
#main ul.contentItems li:hover a.ibutton.remove { background-position:-20px 0; }
|
||||||
|
#main ul.contentItems li:hover a.ibutton.view { background-position:-40px 0; }
|
||||||
|
#main ul.contentItems li:hover a.ibutton.add.page { background-position:-60px 0; }
|
||||||
|
#main ul.contentItems li:hover a.ibutton.edit { background-position:-80px 0; }
|
||||||
|
#main ul.contentItems li:hover a.ibutton.publish { background-position:-100px 0; }
|
||||||
|
|
||||||
/* Tables
|
/* Tables
|
||||||
----------------------------------------------------------*/
|
----------------------------------------------------------*/
|
||||||
@@ -558,50 +603,6 @@ todo: (heskew) pull out into relevant modules where appropriate
|
|||||||
width:70%;
|
width:70%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Blogs
|
|
||||||
----------------------------------------------------------*/
|
|
||||||
ul.blogs, ul.posts {
|
|
||||||
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:.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 .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;
|
|
||||||
}
|
|
||||||
#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 */
|
/* todo: (heskew) needs attention */
|
||||||
/* Extensions;
|
/* Extensions;
|
||||||
@@ -620,10 +621,10 @@ ul.blogs li.last, ul.posts li.last {
|
|||||||
.separator {border-bottom:1px dashed #E4E7DC; margin-bottom:8px; padding-bottom:2px;}
|
.separator {border-bottom:1px dashed #E4E7DC; margin-bottom:8px; padding-bottom:2px;}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* todo: (heskew) remove roundCorners class */
|
/* todo: (heskew) remove roundCorners class and anything else that shouldn't be used (inputText*, linkButton, .<something>.message -> .message */
|
||||||
#content, #navigation li,
|
#content, #navigation li,
|
||||||
table, textarea, .button, input.text, input.text-box, .inputTextLarge,
|
table, textarea, .button, input.text, ul.contentItems,
|
||||||
.inputTextPermalink, .linkButton, .confirmation.message,
|
input.text-box, .inputTextLarge, .inputTextPermalink, .linkButton, .confirmation.message,
|
||||||
.warning.message, .critical.message, .roundCorners {
|
.warning.message, .critical.message, .roundCorners {
|
||||||
-moz-border-radius:4px;
|
-moz-border-radius:4px;
|
||||||
-webkit-border-top-radius:4px;
|
-webkit-border-top-radius:4px;
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 6.5 KiB |
Binary file not shown.
@@ -121,7 +121,7 @@
|
|||||||
<Content Include="Views\Blog\DisplayTemplates\BlogsViewModel.ascx" />
|
<Content Include="Views\Blog\DisplayTemplates\BlogsViewModel.ascx" />
|
||||||
<Content Include="Views\Blog\EditorTemplates\CreateBlogViewModel.ascx" />
|
<Content Include="Views\Blog\EditorTemplates\CreateBlogViewModel.ascx" />
|
||||||
<Content Include="Views\Blog\Item.aspx" />
|
<Content Include="Views\Blog\Item.aspx" />
|
||||||
<Content Include="Views\Shared\BlogPostPreviewForAdmin.ascx" />
|
<Content Include="Views\Shared\DisplayTemplates\BlogPostPreviewForAdmin.ascx" />
|
||||||
<Content Include="Views\Shared\Messages.ascx" />
|
<Content Include="Views\Shared\Messages.ascx" />
|
||||||
<Content Include="Web.config" />
|
<Content Include="Web.config" />
|
||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
<span class="construct">
|
<span class="construct">
|
||||||
<a href="<%=Url.BlogEdit(Model.Slug) %>" class="ibutton edit" title="Edit Blog">Edit Blog</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.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>
|
<a href="<%=Url.BlogPostCreate(Model.Slug) %>" class="ibutton add page" title="Add Post">Add Post</a>
|
||||||
</span>
|
</span>
|
||||||
<span class="destruct"><a href="<%=Url.BlogDelete(Model.Slug) %>" class="ibutton remove" title="Delete Blog">Remove Blog</a></span>
|
<span class="destruct"><a href="<%=Url.BlogDelete(Model.Slug) %>" class="ibutton remove" title="Delete Blog">Remove Blog</a></span>
|
||||||
</p>
|
</p>
|
@@ -1,19 +1,15 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogForAdminViewModel>" %>
|
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogForAdminViewModel>" %>
|
||||||
|
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
||||||
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
||||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||||
<h2><a href="<%=Url.BlogForAdmin(Model.Blog.Slug) %>"><%=Html.Encode(Model.Blog.Name) %></a></h2>
|
<h2><a href="<%=Url.BlogForAdmin(Model.Blog.Slug) %>"><%=Html.Encode(Model.Blog.Name) %></a></h2>
|
||||||
<div class="manage">
|
<div class="manage">
|
||||||
<a href="<%=Url.BlogEdit(Model.Blog.Slug) %>" class="button">Edit Blog</a>
|
<a href="<%=Url.BlogEdit(Model.Blog.Slug) %>" class="button">Edit Blog</a>
|
||||||
<a href="<%=Url.BlogPostCreate(Model.Blog.Slug) %>" class="button">Add a Post</a>
|
<a href="<%=Url.BlogPostCreate(Model.Blog.Slug) %>" class="add button">Add Post</a>
|
||||||
</div>
|
</div>
|
||||||
<p><a href="<%=Url.BlogsForAdmin() %>">Manage Blogs</a> > <%=Html.Encode(Model.Blog.Name) %></p>
|
<%--<p><a href="<%=Url.BlogsForAdmin() %>">Manage Blogs</a> > <%=Html.Encode(Model.Blog.Name) %></p>--%>
|
||||||
<p><%=Model.Blog.Description %></p><%
|
<p><%=Model.Blog.Description %></p><%
|
||||||
//TODO: (erikpo) Move this into a helper
|
|
||||||
if (Model.Posts.Count() > 0) { %>
|
if (Model.Posts.Count() > 0) { %>
|
||||||
<ul class="posts"><%
|
<%=Html.UnorderedList(Model.Posts, (p, i) => Html.DisplayFor(blog => p, "BlogPostPreviewForAdmin").ToHtmlString(), "contentItems")%><%
|
||||||
foreach (BlogPost post in Model.Posts) { %>
|
} %>
|
||||||
<li><% Html.RenderPartial("BlogPostPreviewForAdmin", post); %></li><%
|
|
||||||
} %>
|
|
||||||
</ul><%
|
|
||||||
} %>
|
|
@@ -3,8 +3,8 @@
|
|||||||
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
||||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"
|
<%@ Import Namespace="Orchard.Blogs.ViewModels"
|
||||||
%><div class="actions"><a class="add button" href="<%=Url.BlogCreate() %>">Create a Blog</a></div><%
|
%><div class="actions"><a class="add button" href="<%=Url.BlogCreate() %>">Add Blog</a></div><%
|
||||||
if (Model.Blogs.Count() > 0) { %>
|
if (Model.Blogs.Count() > 0) { %>
|
||||||
<%=Html.UnorderedList(Model.Blogs, (b, i) => Html.DisplayFor(blog => b, "BlogForAdmin").ToHtmlString(), "blogs") %>
|
<%=Html.UnorderedList(Model.Blogs, (b, i) => Html.DisplayFor(blog => b, "BlogForAdmin").ToHtmlString(), "contentItems") %>
|
||||||
<div class="actions"><a class="add button" href="<%=Url.BlogCreate() %>">Create a Blog</a></div><%
|
<div class="actions"><a class="add button" href="<%=Url.BlogCreate() %>">Add Blog</a></div><%
|
||||||
} %>
|
} %>
|
@@ -9,11 +9,11 @@
|
|||||||
<p class="actions">
|
<p class="actions">
|
||||||
<%-- todo: (heskew) make into a ul --%>
|
<%-- todo: (heskew) make into a ul --%>
|
||||||
<span class="construct">
|
<span class="construct">
|
||||||
<a href="<%=Url.BlogPostEdit(Model.Blog.Slug, Model.Slug) %>">Edit</a>
|
<a href="<%=Url.BlogPostEdit(Model.Blog.Slug, Model.Slug) %>" class="ibutton edit" title="Edit Post">Edit Post</a>
|
||||||
| <a href="<%=Url.BlogPost(Model.Blog.Slug, Model.Slug) %>">View</a><%
|
<a href="<%=Url.BlogPost(Model.Blog.Slug, Model.Slug) %>" class="ibutton view" title="View Post">View Post</a><%
|
||||||
if (Model.Published == null) { // todo: (heskew) be smart about this and maybe have other contextual actions - including view/preview for view up there ^^ %>
|
if (Model.Published == null) { // todo: (heskew) be smart about this and maybe have other contextual actions - including view/preview for view up there ^^ %>
|
||||||
| <a href="<%=Url.BlogPost(Model.Blog.Slug, Model.Slug) %>">Publish Now</a>
|
<a href="<%=Url.BlogPost(Model.Blog.Slug, Model.Slug) %>" class="ibutton publish" title="Publish Post Now">Publish Post Now</a>
|
||||||
<% } %>
|
<% } %>
|
||||||
</span>
|
</span>
|
||||||
<span class="destruct"><a href="#">Delete Post</a></span>
|
<span class="destruct"><a href="#" class="ibutton remove" title="Remove Post">Remove Post</a></span>
|
||||||
</p>
|
</p>
|
Reference in New Issue
Block a user