Added icons to blogs and updated html/CSS to match the new design.

This commit is contained in:
jowall
2010-02-11 15:54:56 -08:00
parent d013ff0d66
commit fd0e034ea6
12 changed files with 139 additions and 39 deletions

View File

@@ -231,6 +231,7 @@
<Content Include="Themes\TheAdminClassic\Views\Layout.ascx" /> <Content Include="Themes\TheAdminClassic\Views\Layout.ascx" />
<Content Include="Themes\TheAdminClassic\Views\Menu.ascx" /> <Content Include="Themes\TheAdminClassic\Views\Menu.ascx" />
<Content Include="Themes\TheAdminClassic\Views\User.ascx" /> <Content Include="Themes\TheAdminClassic\Views\User.ascx" />
<Content Include="Themes\TheAdmin\Styles\images\backgroundGradient.gif" />
<Content Include="Themes\TheAdmin\Styles\images\backgroundHeader.gif" /> <Content Include="Themes\TheAdmin\Styles\images\backgroundHeader.gif" />
<Content Include="Themes\TheAdmin\Styles\images\orchardLogo.gif" /> <Content Include="Themes\TheAdmin\Styles\images\orchardLogo.gif" />
<Content Include="Themes\TheAdmin\Views\Menu.ascx" /> <Content Include="Themes\TheAdmin\Views\Menu.ascx" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 642 B

View File

@@ -5,19 +5,19 @@
<h1 class="withActions"> <h1 class="withActions">
<a href="<%=Url.BlogForAdmin(Model.Item.Slug) %>"><%=Html.TitleForPage(Model.Item.Name) %></a> <a href="<%=Url.BlogForAdmin(Model.Item.Slug) %>"><%=Html.TitleForPage(Model.Item.Name) %></a>
</h1> </h1>
<ul class="actions">
<li class="construct"> <%--<form>
<a href="<%=Url.BlogEdit(Model.Item.Slug) %>" class="ibutton edit" title="<%=_Encoded("Edit Blog") %>"></a> <fieldset class="actions bulk">
</li> <label for="filterResults"><%=_Encoded("Filter:")%></label>
<li class="destruct"> <select id="filterResults" name="">
<% using (Html.BeginFormAntiForgeryPost(Url.BlogDelete(Model.Item.Slug), FormMethod.Post, new { @class = "inline" })) { %> <option value="">All Posts</option>
<fieldset> <option value="">Published Posts</option>
<button type="submit" class="ibutton remove" title="<%=_Encoded("Remove Blog") %>"><%=_Encoded("Remove Blog") %></button> </select>
</fieldset><% <input class="button" type="submit" name="submit.Filter" value="<%=_Encoded("Apply") %>"/>
} %> </fieldset>
</li> </form>--%>
</ul>
<p><%=Html.Encode(Model.Item.Description) %></p>
<div class="actions"><a href="<%=Url.BlogPostCreate(Model.Item.Slug) %>" class="add button"><%=_Encoded("New Post")%></a></div> <div class="actions"><a href="<%=Url.BlogPostCreate(Model.Item.Slug) %>" class="add button"><%=_Encoded("New Post")%></a></div>
<% Html.Zone("primary"); <% Html.Zone("primary");
Html.ZonesAny(); %> Html.ZonesAny(); %>

View File

@@ -6,26 +6,69 @@
<%@ Import Namespace="Orchard.Mvc.ViewModels"%> <%@ Import Namespace="Orchard.Mvc.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%> <%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%> <%@ Import Namespace="Orchard.Blogs.Models"%>
<h2><%=Html.Link(Html.Encode(Model.Item.Title), Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Id)) %></h2>
<div class="meta"><%=Html.PublishedState(Model.Item) %> | <%Html.Zone("meta");%></div> <ul>
<div class="content"><%=Model.Item.As<BodyAspect>().Text ?? string.Format("<p><em>{0}</em></p>", _Encoded("there's no content for this blog post"))%></div> <li class="properties">
<ul class="actions"> <h3><%=Html.Link(Html.Encode(Model.Item.Title), Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Id))%></h3>
<li class="construct">
<a href="<%=Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Id) %>" class="ibutton edit" title="<%=_Encoded("Edit Post")%>"><%=_Encoded("Edit Post")%></a> <ul>
<a href="<%=Url.BlogPost(Model.Item.Blog.Slug, Model.Item.Slug) %>" class="ibutton view" title="<%=_Encoded("View Post")%>"><%=_Encoded("View Post")%></a><% <li>
if (Model.Item.ContentItem.VersionRecord.Published == false) { // todo: (heskew) be smart about this and maybe have other contextual actions - including view/preview for view up there ^^ <%if (Model.IsPublished)
using (Html.BeginFormAntiForgeryPost(Url.BlogPostPublish(Model.Item.Blog.Slug, Model.Item.Id), FormMethod.Post, new { @class = "inline" })) { %> { %>
<fieldset> <img class="icon" src="<%=ResolveUrl("~/Packages/Orchard.Blogs/Content/Admin/images/online.gif") %>" alt="<%=_Encoded("Online") %>" title="<%=_Encoded("The page is currently online") %>" /><%=_Encoded(" Published")%>
<button type="submit" class="ibutton publish" title="<%=_Encoded("Publish Post Now") %>"><%=_Encoded("Publish Post Now")%></button> <% }
</fieldset><% else
} { %>
} %> <img class="icon" src="<%=ResolveUrl("~/Packages/Orchard.Blogs/Content/Admin/images/offline.gif") %>" alt="<%=_Encoded("Offline") %>" title="<%=_Encoded("The page is currently offline") %>" /><%=_Encoded(" Not Published")%>
<% } %>
&nbsp;&#124;&nbsp;
</li>
<li>
<% if (Model.IsDraft) { %>
<img class="icon" src="<%=ResolveUrl("~/Packages/Orchard.Blogs/Content/Admin/images/draft.gif") %>" alt="<%=_Encoded("Draft") %>" title="<%=_Encoded("The post has a draft") %>" /><%=Html.PublishedState(Model.Item)%>
<% }
else
{ %>
<%=_Encoded("No draft")%>
<% } %>
&nbsp;&#124;&nbsp;
</li>
<%--This should show publised date, last modified, or scheduled.
<li>
<img class="icon" src="<%=ResolveUrl("~/Packages/Orchard.Blogs/Content/Admin/images/scheduled.gif") %>" alt="<%=_Encoded("Scheduled") %>" title="<%=_Encoded("The post is scheduled for publishing") %>" /><%=_Encoded("Scheduled")%>
&nbsp;&#124;&nbsp;
</li>--%>
<li>
<%=_Encoded("By {0}", Model.Item.Creator.UserName)%>
</li>
</ul>
</li> </li>
<li class="destruct">
<li class="related">
<%if (Model.IsPublished){ %>
<a href="<%=Url.BlogPost(Model.Item.Blog.Slug, Model.Item.Slug) %>" title="<%=_Encoded("View Post")%>"><%=_Encoded("View")%></a><%=_Encoded(" | ")%>
<% } %>
<a href="<%=Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Id) %>" title="<%=_Encoded("Edit Post")%>"><%=_Encoded("Edit")%></a><%=_Encoded(" | ")%>
<%if (Model.Item.ContentItem.VersionRecord.Published == false) { // todo: (heskew) be smart about this and maybe have other contextual actions - including view/preview for view up there ^^
using (Html.BeginFormAntiForgeryPost(Url.BlogPostPublish(Model.Item.Blog.Slug, Model.Item.Id), FormMethod.Post, new { @class = "inline" })) { %>
<button type="submit" class="linkButton" title="<%=_Encoded("Publish") %>"><%=_Encoded("Publish")%></button><%=_Encoded(" | ")%><%
}
} %>
<% using (Html.BeginFormAntiForgeryPost(Url.BlogPostDelete(Model.Item.Blog.Slug, Model.Item.Id), FormMethod.Post, new { @class = "inline" })) { %> <% using (Html.BeginFormAntiForgeryPost(Url.BlogPostDelete(Model.Item.Blog.Slug, Model.Item.Id), FormMethod.Post, new { @class = "inline" })) { %>
<fieldset> <button type="submit" class="linkButton" title="<%=_Encoded("Delete") %>"><%=_Encoded("Delete") %></button>
<button type="submit" class="ibutton remove" title="<%=_Encoded("Remove Post") %>"><%=_Encoded("Remove Post") %></button> <%
</fieldset><% } %>
} %>
<br /><%Html.Zone("meta");%>
</li> </li>
<li style="clear:both;"></li>
</ul> </ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 365 B

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

View File

@@ -567,19 +567,18 @@ button.ibutton {
----------------------------------------------------------*/ ----------------------------------------------------------*/
.contentItems { .contentItems {
background:#FFF; background:#FFF;
border:1px solid #B0B083;
margin:1.4em 0; margin:1.4em 0;
padding:2px; padding:2px;
} }
.contentItems li { .contentItems li {
background:#FFF; background:#FFF;
border-bottom:1px solid #EAE9D9; border-bottom:1px solid #eaeaea;
margin:0; margin:0;
overflow:hidden; overflow:hidden;
padding:.7em 1.4em; padding:.4em 1.4em;
} }
.contentItems li.last { .contentItems li.first {
border-bottom:0; background:#fff url(images/backgroundGradient.gif) repeat-x top left;
} }
#main .contentItems li h3 { #main .contentItems li h3 {
border-bottom:0; border-bottom:0;
@@ -598,7 +597,7 @@ button.ibutton {
margin-left:8px; margin-left:8px;
margin-right:0; margin-right:0;
} }
#main .contentItems li:hover { background:#fafbed; } #main .contentItems li:hover { background:#f8f8f8; }
#main .contentItems li:hover .ibutton { background-position:0 0; } #main .contentItems li:hover .ibutton { background-position:0 0; }
#main .contentItems li:hover .ibutton.remove { background-position:-20px 0; } #main .contentItems li:hover .ibutton.remove { background-position:-20px 0; }
#main .contentItems li:hover .ibutton.view { background-position:-40px 0; } #main .contentItems li:hover .ibutton.view { background-position:-40px 0; }
@@ -696,4 +695,61 @@ table.items, textarea, input.text, input.text-box,
-moz-border-radius:3px 3px 0 0; -moz-border-radius:3px 3px 0 0;
-webkit-border-radius:3px 3px 0 0; -webkit-border-radius:3px 3px 0 0;
border-radius:3px 3px 0 0; border-radius:3px 3px 0 0;
}*/ }*/
/* Added classes for new blog list layout
---------------------------------------------------------- */
.actions {
height:auto;
overflow:visible;
padding:0;
text-align:right;
}
.contentItems {
padding:0;
}
.contentItems li ul li {
border:0;
background:inherit;
}
li.properties {
float:left;
}
#main .contentItems li.properties h3 {
border-bottom:none;
margin:0;
padding:0;
}
li.related{
font-size:1.4em;
float:right;
padding:.4em 0;
text-align:right;
}
li.related .commentcount{
line-height:2em;
}
li.properties ul li{
border:0;
float:left;
padding:.8em 0;
font-size:1.4em;
background:inherit;
}
.icon {
margin:0 0 -2px 4px;
margin:0 .2em -.2em .2em;
}
.linkButton {
border:none;
padding:0;
background:none;
color:#1E5D7D;
}
.linkButton:hover {
background-color:Transparent;
text-decoration:underline;
color:#1E5D7D;
}