Manage Pages: Indent status bar row (under title) and updated layout (html/CSS). Removed inline styles.

--HG--
branch : dev
This commit is contained in:
jowall
2010-03-02 14:06:19 -08:00
parent 6d86a752dc
commit 0d181118ce
2 changed files with 59 additions and 36 deletions

View File

@@ -3,7 +3,7 @@
<%@ Import Namespace="Orchard.Pages.ViewModels"%>
<h1><%=Html.TitleForPage(T("Manage Pages").ToString())%></h1>
<%-- todo: Add helper text here when ready. <p><%=_Encoded("Possible text about setting up a page goes here.")%></p>--%>
<div class="manage"><%=Html.ActionLink(T("Add a page").ToString(), "Create", new { }, new { @class = "button" })%></div>
<div class="manage"><%=Html.ActionLink(T("Add a page").ToString(), "Create", new { }, new { @class = "button primaryAction" })%></div>
<% using (Html.BeginFormAntiForgeryPost())
{ %>
<%=Html.ValidationSummary()%>
@@ -26,58 +26,64 @@
</select>
<input class="button" type="submit" name="submit.Filter" value="<%=_Encoded("Apply") %>"/>
</fieldset>
<fieldset>
<ul class="contentItems" style="margin-top:0;">
<fieldset class="pageList">
<ul class="contentItems">
<%
int pageIndex = 0;
foreach (var pageEntry in Model.PageEntries)
{
var pi = pageIndex; %>
<li style="padding:1em .5em;">
<div style="float:left;">
<input type="hidden" value="<%=Model.PageEntries[pageIndex].PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pi].PageId) %>"/>
<li>
<div class="summary">
<div class="properties">
<input type="hidden" value="<%=Model.PageEntries[pageIndex].PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pi].PageId) %>"/>
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.PageEntries[pi].IsChecked) %>"/>
<h3 style="border-bottom:none; margin:0; padding:0; display:inline;"><%=Html.Encode(pageEntry.Page.Title ?? T("(no title)").ToString())%></h3>
<h3 style="display:inline;"><%=Html.Encode(pageEntry.Page.Title ?? T("(no title)").ToString())%></h3>
<p style="margin:.5em 0;">
<%--Published or not--%>
<% if (pageEntry.Page.HasPublished)
<ul class="pageStatus">
<li><%--Published or not--%>
<% if (pageEntry.Page.HasPublished)
{ %>
<img src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/online.gif") %>" alt="<%=_Encoded("Online") %>" title="<%=_Encoded("The page is currently online") %>" style="<%=_Encoded("margin:0 0 -2px 0;") %>" /><%=_Encoded(" Published |") %>
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/online.gif") %>" alt="<%=_Encoded("Online") %>" title="<%=_Encoded("The page is currently online") %>" /><%=_Encoded("Published") %>&nbsp;&#124;&nbsp;
<% }
else
{ %>
<img src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/offline.gif") %>" alt="<%=_Encoded("Offline") %>" title="<%=_Encoded("The page is currently offline") %>" style="margin:0 0 -2px 0;" /><%=_Encoded(" Not Published |")%>
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/offline.gif") %>" alt="<%=_Encoded("Offline") %>" title="<%=_Encoded("The page is currently offline") %>" /><%=_Encoded("Not Published")%>&nbsp;&#124;&nbsp;
<% } %>
</li>
<%--Does the page have a draft--%>
<% if (pageEntry.Page.HasDraft)
<li><%--Does the page have a draft--%>
<% if (pageEntry.Page.HasDraft)
{ %>
<img src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/draft.gif") %>" alt="<%=_Encoded("Draft") %>" title="<%=_Encoded("The page has a draft") %>" style="margin:0 0 -2px 0;" /><%=_Encoded(" Draft")%>
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/draft.gif") %>" alt="<%=_Encoded("Draft") %>" title="<%=_Encoded("The page has a draft") %>" /><%=_Encoded("Draft")%>&nbsp;&#124;&nbsp;
<% }
else
{ %>
<%=_Encoded("No Draft")%>
<%=_Encoded("No Draft")%>&nbsp;&#124;&nbsp;
<% } %>
<%--Scheduled--%>
<% if (!pageEntry.Page.IsPublished)
{ %>
<%if (pageEntry.Page.ScheduledPublishUtc != null) { %>
<%=" | " %>
<img src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/scheduled.gif") %>" alt="<%=_Encoded("Scheduled") %>" title="<%=_Encoded("The page is scheduled for publishing") %>" style="margin:0 0 -2px 0;" />
<%=string.Format("Scheduled: {0:d}", pageEntry.Page.ScheduledPublishUtc.Value) %>
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/scheduled.gif") %>" alt="<%=_Encoded("Scheduled") %>" title="<%=_Encoded("The page is scheduled for publishing") %>" /><%=string.Format("Scheduled: {0:d}", pageEntry.Page.ScheduledPublishUtc.Value) %>&nbsp;&#124;&nbsp;
<% }%>
<% } %>
</li>
<%--Author--%>
<%=_Encoded(" | By {0}", pageEntry.Page.Creator.UserName)%>
</p>
</div>
<li>
<%--Author--%>
<%=_Encoded("By {0}", pageEntry.Page.Creator.UserName)%>
</li>
</ul>
</div>
<div class="related">
<div style="float:right;">
<span style="margin:0; text-align:right; font-size:1.4em;">
<% if (pageEntry.Page.HasPublished)
{ %>
<%=Html.ActionLink("View", "Item", new { controller = "Page", slug = pageEntry.Page.PublishedSlug })%>
@@ -90,11 +96,10 @@ foreach (var pageEntry in Model.PageEntries)
<%=Html.ActionLink(T("Edit").ToString(), "Edit", new { id = pageEntry.PageId })%>
</span>
</div>
<div style="clear:both;"></div>
</div>
</li>
<%
pageIndex++;
@@ -103,5 +108,4 @@ pageIndex++;
</fieldset>
<% } %>
<div class="manage"><%=Html.ActionLink(T("Add a page").ToString(), "Create", new { }, new { @class = "button" })%></div>
<div class="manage"><%=Html.ActionLink(T("Add a page").ToString(), "Create", new { }, new { @class = "button primaryAction" })%></div>

View File

@@ -795,3 +795,22 @@ table.items, textarea, input.text, input.text-box,
text-decoration:underline;
color:#1E5D7D;
}
/* Added classes for new page list layout
---------------------------------------------------------- */
.pageList {
margin:0;
padding:0;
background:#FFFFFF url(images/backgroundGradient.gif) repeat-x scroll left top;
}
.orchard-pages .contentItems {
margin:1em 0 0 0;
padding:0;
}
.contentItems .properties ul.pageStatus {
margin:0.8em 0 0 2em;
}
.contentItems .properties ul.pageStatus li {
margin:0;
padding:0 0 .1em 0;
}