mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Added some info messages to /admin/blogs and /admin/blogs/<blog name> for when there are no items
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043129
This commit is contained in:
@@ -281,6 +281,9 @@ span.message {
|
||||
display:block;
|
||||
margin:4px 0 4px 4px;
|
||||
}
|
||||
.message a {
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.confirmation.message {
|
||||
background:#e6f1c9;
|
||||
@@ -296,9 +299,8 @@ span.message {
|
||||
color:#fff;
|
||||
}
|
||||
.info.message {
|
||||
background:#f8f8ff; /* GhostWhite :P */
|
||||
border-color:#ccc;
|
||||
border-style:dashed;
|
||||
background:#fff;
|
||||
border:1px dashed #D2D6C6;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
@@ -328,7 +330,7 @@ select, textarea, input.text, input.text-box, #PublishLaterDate {
|
||||
border:1px solid #d2d6c6;
|
||||
color:#5a5b32;
|
||||
}
|
||||
input.text {
|
||||
input.text, input.text-box {
|
||||
line-height:1.2em;
|
||||
}
|
||||
select:focus, textarea:focus, input.text:focus, input.text-box:focus, #PublishLaterDate:focus {
|
||||
@@ -508,7 +510,6 @@ ul.contentItems li.last {
|
||||
#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;
|
||||
@@ -638,15 +639,10 @@ todo: (heskew) pull out into relevant modules where appropriate
|
||||
.topSpacer{margin-top: 20px;}
|
||||
.bottomSpacer{margin-bottom: 20px;}
|
||||
.displayText {display:none;}
|
||||
/*
|
||||
.separator {border-bottom:1px dashed #E4E7DC; margin-bottom:8px; padding-bottom:2px;}
|
||||
*/
|
||||
|
||||
/* todo: (heskew) remove roundCorners class and anything else that shouldn't be used (inputText*, linkButton, .<something>.message -> .message */
|
||||
#content, #navigation li,
|
||||
table, textarea, .button, input.text, ul.contentItems,
|
||||
input.text-box, .inputTextLarge, .inputTextPermalink, .linkButton, .confirmation.message,
|
||||
.warning.message, .critical.message, .roundCorners {
|
||||
#content, #navigation li, button, .button,
|
||||
table, textarea, input.text, input.text-box,
|
||||
ul.contentItems, .message {
|
||||
-moz-border-radius:4px;
|
||||
-webkit-border-radius:4px;
|
||||
border-radius:4px;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<span class="construct">
|
||||
<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="Add Post">Add Post</a>
|
||||
<a href="<%=Url.BlogPostCreate(Model.Slug) %>" class="ibutton add page" title="New Post">New Post</a>
|
||||
</span>
|
||||
<span class="destruct"><a href="<%=Url.BlogDelete(Model.Slug) %>" class="ibutton remove" title="Delete Blog">Remove Blog</a></span>
|
||||
</p>
|
@@ -8,9 +8,11 @@
|
||||
<span class="construct"><a href="<%=Url.BlogEdit(Model.Blog.Slug) %>" class="button">Edit Blog</a></span>
|
||||
<span class="destruct"><a href="<%=Url.BlogDelete(Model.Blog.Slug) %>" class="remove button">Remove Blog</a></span>
|
||||
</div>
|
||||
<p><%=Model.Blog.Description %></p>
|
||||
<div class="actions"><a href="<%=Url.BlogPostCreate(Model.Blog.Slug) %>" class="add button">Add Post</a></div><%
|
||||
<p><%=Model.Blog.Description %></p><%
|
||||
if (Model.Posts.Count() > 0) { %>
|
||||
<div class="actions"><a href="<%=Url.BlogPostCreate(Model.Blog.Slug) %>" class="add button">New Post</a></div>
|
||||
<%=Html.UnorderedList(Model.Posts, (p, i) => Html.DisplayFor(blog => p, "BlogPostPreviewForAdmin").ToHtmlString(), "contentItems")%>
|
||||
<div class="actions"><a href="<%=Url.BlogPostCreate(Model.Blog.Slug) %>" class="add button">Add Post</a></div><%
|
||||
<div class="actions"><a href="<%=Url.BlogPostCreate(Model.Blog.Slug) %>" class="add button">New Post</a></div><%
|
||||
} else { %>
|
||||
<div class="info message">This blog is sad as it has no posts. But don't fret, you can add a new post right <a href="<%=Url.BlogPostCreate(Model.Blog.Slug) %>">here</a>!</div><%
|
||||
} %>
|
@@ -3,8 +3,11 @@
|
||||
<%@ 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() %>">Add Blog</a></div><%
|
||||
%><%
|
||||
if (Model.Blogs.Count() > 0) { %>
|
||||
<div class="actions"><a class="add button" href="<%=Url.BlogCreate() %>">New Blog</a></div>
|
||||
<%=Html.UnorderedList(Model.Blogs, (b, i) => Html.DisplayFor(blog => b, "BlogForAdmin").ToHtmlString(), "contentItems") %>
|
||||
<div class="actions"><a class="add button" href="<%=Url.BlogCreate() %>">Add Blog</a></div><%
|
||||
<div class="actions"><a class="add button" href="<%=Url.BlogCreate() %>">New Blog</a></div><%
|
||||
} else { %>
|
||||
<div class="info message">There are no blogs for you to see. Want to <a href="<%=Url.BlogCreate() %>">add one</a>?</div><%
|
||||
} %>
|
@@ -1,11 +1,11 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogEditViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
||||
<fieldset>
|
||||
<label for="">Blog Name:</label>
|
||||
<label for="Name">Blog Name:</label>
|
||||
<%=Html.EditorFor(m => m.Name) %>
|
||||
</fieldset>
|
||||
<%=Html.EditorFor(m => m.Slug, "BlogPermalink") %>
|
||||
<fieldset>
|
||||
<label for="">Description:</label>
|
||||
<label for="Description">Description:</label>
|
||||
<%=Html.TextAreaFor(m => m.Description, 5, 60, null) %>
|
||||
</fieldset>
|
Reference in New Issue
Block a user