mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-22 20:13:50 +08:00
A little page list cleanup
--HG-- branch : dev
This commit is contained in:
@@ -3,9 +3,8 @@
|
||||
<%@ 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 primaryAction" })%></div>
|
||||
<% using (Html.BeginFormAntiForgeryPost())
|
||||
{ %>
|
||||
<div class="manage"><%=Html.ActionLink(T("Add a page").ToString(), "Create", new { }, new { @class = "button primaryAction" })%></div><%
|
||||
using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%=Html.ValidationSummary()%>
|
||||
<fieldset class="actions bulk">
|
||||
<label for="publishActions"><%=_Encoded("Actions:")%></label>
|
||||
@@ -27,85 +26,58 @@
|
||||
<input class="button" type="submit" name="submit.Filter" value="<%=_Encoded("Apply") %>"/>
|
||||
</fieldset>
|
||||
<fieldset class="pageList">
|
||||
|
||||
|
||||
<ul class="contentItems">
|
||||
<%
|
||||
int pageIndex = 0;
|
||||
foreach (var pageEntry in Model.PageEntries)
|
||||
{
|
||||
var pi = pageIndex; %>
|
||||
<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><%=Html.ActionLink(pageEntry.Page.Title, "Edit", new { id = pageEntry.PageId })%></h3>
|
||||
|
||||
<ul class="pageStatus">
|
||||
<li><%--Published or not--%>
|
||||
<% if (pageEntry.Page.HasPublished)
|
||||
{ %>
|
||||
<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") %> |
|
||||
<% }
|
||||
else
|
||||
{ %>
|
||||
<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")%> |
|
||||
<% } %>
|
||||
</li>
|
||||
|
||||
|
||||
<li><%--Does the page have a draft--%>
|
||||
<% if (pageEntry.Page.HasDraft)
|
||||
{ %>
|
||||
<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")%> |
|
||||
<% }
|
||||
else
|
||||
{ %>
|
||||
<%=_Encoded("No Draft")%> |
|
||||
<% } %>
|
||||
<%--Scheduled--%>
|
||||
<% if (!pageEntry.Page.IsPublished)
|
||||
{ %>
|
||||
<%if (pageEntry.Page.ScheduledPublishUtc != null) { %>
|
||||
<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) %> |
|
||||
<% }%>
|
||||
<% } %>
|
||||
</li>
|
||||
|
||||
<ul class="contentItems"><%
|
||||
var pageIndex = 0;
|
||||
foreach (var pageEntry in Model.PageEntries) {
|
||||
var pi = pageIndex; %>
|
||||
<li>
|
||||
<%--Author--%>
|
||||
<%=_Encoded("By {0}", pageEntry.Page.Creator.UserName)%>
|
||||
</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><%=Html.ActionLink(pageEntry.Page.Title, "Edit", new { id = pageEntry.PageId })%></h3>
|
||||
<ul class="pageStatus">
|
||||
<li><%
|
||||
// Published or not
|
||||
if (pageEntry.Page.HasPublished) { %>
|
||||
<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") %> | <%
|
||||
}
|
||||
else { %>
|
||||
<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")%> | <%
|
||||
} %>
|
||||
</li>
|
||||
<li><%
|
||||
// Does the page have a draft
|
||||
if (pageEntry.Page.HasDraft) { %>
|
||||
<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")%> | <%
|
||||
}
|
||||
else { %>
|
||||
<%=_Encoded("No Draft")%> | <%
|
||||
}
|
||||
// Scheduled
|
||||
if (!pageEntry.Page.IsPublished) {
|
||||
if (pageEntry.Page.ScheduledPublishUtc != null) { %>
|
||||
<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) %> | <%
|
||||
}
|
||||
} %>
|
||||
</li>
|
||||
<li><%--Author--%>
|
||||
<%=_Encoded("By {0}", pageEntry.Page.Creator.UserName)%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="related"><%
|
||||
if (pageEntry.Page.HasPublished) { %>
|
||||
<%=Html.ActionLink("View", "Item", new { controller = "Page", slug = pageEntry.Page.PublishedSlug })%><%=_Encoded("|")%><%
|
||||
} %>
|
||||
<%=Html.ActionLink(T("Edit").ToString(), "Edit", new { id = pageEntry.PageId })%>
|
||||
</div>
|
||||
<div style="clear:both;"></div>
|
||||
</div>
|
||||
</li><%
|
||||
pageIndex++;
|
||||
} %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="related">
|
||||
|
||||
<% if (pageEntry.Page.HasPublished)
|
||||
{ %>
|
||||
<%=Html.ActionLink("View", "Item", new { controller = "Page", slug = pageEntry.Page.PublishedSlug })%>
|
||||
<%=_Encoded("|")%>
|
||||
<% }
|
||||
else
|
||||
{%>
|
||||
<%=""%>
|
||||
<% } %>
|
||||
|
||||
|
||||
<%=Html.ActionLink(T("Edit").ToString(), "Edit", new { id = pageEntry.PageId })%>
|
||||
</div>
|
||||
|
||||
<div style="clear:both;"></div>
|
||||
</div>
|
||||
</li>
|
||||
<%
|
||||
pageIndex++;
|
||||
</fieldset><%
|
||||
} %>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<% } %>
|
||||
|
||||
<div class="manage"><%=Html.ActionLink(T("Add a page").ToString(), "Create", new { }, new { @class = "button primaryAction" })%></div>
|
||||
|
Reference in New Issue
Block a user