mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Getting The Admin theme put together (instead of all admin pages including AdminHead and AdminFoot)
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4044218
This commit is contained in:
@@ -3,23 +3,21 @@
|
||||
<%@ Import Namespace="Orchard.Utility"%>
|
||||
<%@ Import Namespace="Orchard.CmsPages.Services.Templates"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html" %>
|
||||
<% Html.Include("AdminHead"); %>
|
||||
<h2>Delete pages</h2>
|
||||
<p>Are you sure you want to delete the pages?</p>
|
||||
<% using (Html.BeginForm()) { %>
|
||||
<%= Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
<input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkAction)%>" value="<%=PageIndexBulkAction.Delete%>" />
|
||||
<input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkDeleteConfirmed)%>" value="true" />
|
||||
<input class="button" type="submit" name="submit.BulkEdit" value="Delete" />
|
||||
<%
|
||||
int pageIndex = 0;
|
||||
foreach (var pageEntry in Model.PageEntries.Where(e => e.IsChecked)) {
|
||||
var pi = pageIndex;
|
||||
%><input type="hidden" value="<%=pageEntry.PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pi].PageId)%>"/>
|
||||
<input type="hidden" value="<%=pageEntry.IsChecked %>" name="<%=Html.NameOf(m => m.PageEntries[pi].IsChecked)%>"/><%
|
||||
pageIndex++;
|
||||
} %>
|
||||
</fieldset>
|
||||
<% } %>
|
||||
<% Html.Include("AdminFoot"); %>
|
||||
<h2>Delete pages</h2>
|
||||
<p>Are you sure you want to delete the pages?</p>
|
||||
<% using (Html.BeginForm()) { %>
|
||||
<%= Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
<input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkAction)%>" value="<%=PageIndexBulkAction.Delete%>" />
|
||||
<input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkDeleteConfirmed)%>" value="true" />
|
||||
<input class="button" type="submit" name="submit.BulkEdit" value="Delete" />
|
||||
<%
|
||||
int pageIndex = 0;
|
||||
foreach (var pageEntry in Model.PageEntries.Where(e => e.IsChecked)) {
|
||||
var pi = pageIndex;
|
||||
%><input type="hidden" value="<%=pageEntry.PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pi].PageId)%>"/>
|
||||
<input type="hidden" value="<%=pageEntry.IsChecked %>" name="<%=Html.NameOf(m => m.PageEntries[pi].IsChecked)%>"/><%
|
||||
pageIndex++;
|
||||
} %>
|
||||
</fieldset>
|
||||
<% } %>
|
||||
@@ -3,23 +3,21 @@
|
||||
<%@ Import Namespace="Orchard.Utility"%>
|
||||
<%@ Import Namespace="Orchard.CmsPages.Services.Templates"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html" %>
|
||||
<% Html.Include("AdminHead"); %>
|
||||
<% using (Html.BeginForm()) { %>
|
||||
<h2>Publish later</h2>
|
||||
<p>Enter the scheduled publication date:</p>
|
||||
<%=Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
<%=Html.EditorFor(m => m.Options.BulkPublishLaterDate)%>
|
||||
<input class="button" type="submit" name="submit.BulkEdit" value="Publish later" />
|
||||
<input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkAction)%>" value="<%=PageIndexBulkAction.PublishLater%>" />
|
||||
<%
|
||||
int pageIndex = 0;
|
||||
foreach (var pageEntry in Model.PageEntries.Where(e => e.IsChecked)) {
|
||||
var pi = pageIndex;
|
||||
%><input type="hidden" value="<%=pageEntry.PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pi].PageId)%>"/>
|
||||
<input type="hidden" value="<%=pageEntry.IsChecked %>" name="<%=Html.NameOf(m => m.PageEntries[pi].IsChecked)%>"/><%
|
||||
pageIndex++;
|
||||
} %>
|
||||
</fieldset>
|
||||
<% } %>
|
||||
<% Html.Include("AdminFoot"); %>
|
||||
<% using (Html.BeginForm()) { %>
|
||||
<h2>Publish later</h2>
|
||||
<p>Enter the scheduled publication date:</p>
|
||||
<%=Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
<%=Html.EditorFor(m => m.Options.BulkPublishLaterDate)%>
|
||||
<input class="button" type="submit" name="submit.BulkEdit" value="Publish later" />
|
||||
<input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkAction)%>" value="<%=PageIndexBulkAction.PublishLater%>" />
|
||||
<%
|
||||
int pageIndex = 0;
|
||||
foreach (var pageEntry in Model.PageEntries.Where(e => e.IsChecked)) {
|
||||
var pi = pageIndex;
|
||||
%><input type="hidden" value="<%=pageEntry.PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pi].PageId)%>"/>
|
||||
<input type="hidden" value="<%=pageEntry.IsChecked %>" name="<%=Html.NameOf(m => m.PageEntries[pi].IsChecked)%>"/><%
|
||||
pageIndex++;
|
||||
} %>
|
||||
</fieldset>
|
||||
<% } %>
|
||||
@@ -1,23 +1,21 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.CmsPages.ViewModels.ChooseTemplateViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.CmsPages.Services.Templates"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html" %>
|
||||
<% Html.Include("AdminHead"); %>
|
||||
<h2>Change Template</h2>
|
||||
<p>Select your layout from one of the templates below.</p>
|
||||
<% using (Html.BeginForm()) {
|
||||
%><%= Html.ValidationSummary() %>
|
||||
<ul class="templates"><%
|
||||
foreach (var template in Model.Templates) {
|
||||
var t = template; %>
|
||||
<li><%=
|
||||
Html.EditorFor(m => t) %>
|
||||
</li><%
|
||||
} %>
|
||||
</ul>
|
||||
<p>
|
||||
<input class="button" type="submit" value="Save Template Change" />
|
||||
<%-- todo: (heskew) should pull to give the browser some chance of rehydrating the edit page form state --%>
|
||||
<%=Html.ActionLink("Cancel", "Edit", new { Id = ViewContext.RouteData.GetRequiredString("id") }, new { @class = "cancel" })%>
|
||||
</p><%
|
||||
} %>
|
||||
<% Html.Include("AdminFoot"); %>
|
||||
<h2>Change Template</h2>
|
||||
<p>Select your layout from one of the templates below.</p>
|
||||
<% using (Html.BeginForm()) {
|
||||
%><%= Html.ValidationSummary() %>
|
||||
<ul class="templates"><%
|
||||
foreach (var template in Model.Templates) {
|
||||
var t = template; %>
|
||||
<li><%=
|
||||
Html.EditorFor(m => t) %>
|
||||
</li><%
|
||||
} %>
|
||||
</ul>
|
||||
<p>
|
||||
<input class="button" type="submit" value="Save Template Change" />
|
||||
<%-- todo: (heskew) should pull to give the browser some chance of rehydrating the edit page form state --%>
|
||||
<%=Html.ActionLink("Cancel", "Edit", new { Id = ViewContext.RouteData.GetRequiredString("id") }, new { @class = "cancel" })%>
|
||||
</p><%
|
||||
} %>
|
||||
@@ -1,10 +1,8 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.CmsPages.ViewModels.PageCreateViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html" %>
|
||||
<% Html.Include("AdminHead"); %>
|
||||
<h2>Add a Page</h2>
|
||||
<p>Select your layout from one of the templates below.</p>
|
||||
<% using (Html.BeginForm()) { %>
|
||||
<%=Html.ValidationSummary() %>
|
||||
<%=Html.EditorForModel() %>
|
||||
<% } %>
|
||||
<% Html.Include("AdminFoot"); %>
|
||||
<h2>Add a Page</h2>
|
||||
<p>Select your layout from one of the templates below.</p>
|
||||
<% using (Html.BeginForm()) { %>
|
||||
<%=Html.ValidationSummary() %>
|
||||
<%=Html.EditorForModel() %>
|
||||
<% } %>
|
||||
@@ -1,50 +1,48 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<Orchard.CmsPages.ViewModels.PageEditViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.CmsPages.Models" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html" %>
|
||||
<% Html.Include("AdminHead"); %>
|
||||
<h2><%=_Encoded("Edit Page") %></h2>
|
||||
<p class="bottomSpacer"><%=_Encoded("about setting up a page") %></p>
|
||||
<%=Html.ValidationSummary() %>
|
||||
<div class="sections">
|
||||
<% using (Html.BeginForm()) { %>
|
||||
<div class="primary">
|
||||
<h3><%=_Encoded("Page Content") %></h3>
|
||||
<%-- todo: (heskew) change the editors to be self-contained (fieldset > editor) --%>
|
||||
<%=Html.EditorFor(m => m.Revision.Title, "inputTextLarge") %>
|
||||
<%=Html.EditorFor(m => m.Revision.Slug, "inputTextPermalink") %>
|
||||
<% foreach (ContentItem content in Model.Revision.Contents) {
|
||||
%><fieldset>
|
||||
<label for="<%="Revision.Contents[" + content.ZoneName + "].Content" %>"><%=_Encoded("Zone Name") %>: <%= content.ZoneName %></label>
|
||||
<% if (Model.Template != null && Model.Template.Zones.Contains(content.ZoneName) == false) {
|
||||
%><span class="warning message">These contents are assigned to a zone that does not exist in the current template. Please delete it or copy it to another zone.</span><%
|
||||
} %>
|
||||
<%= Html.TextArea("Revision.Contents[" + content.ZoneName + "].Content", content.Content, new { @class = "html" }) %>
|
||||
</fieldset><%
|
||||
<h2><%=_Encoded("Edit Page") %></h2>
|
||||
<p class="bottomSpacer"><%=_Encoded("about setting up a page") %></p>
|
||||
<%=Html.ValidationSummary() %>
|
||||
<div class="sections">
|
||||
<% using (Html.BeginForm()) { %>
|
||||
<div class="primary">
|
||||
<h3><%=_Encoded("Page Content") %></h3>
|
||||
<%-- todo: (heskew) change the editors to be self-contained (fieldset > editor) --%>
|
||||
<%=Html.EditorFor(m => m.Revision.Title, "inputTextLarge") %>
|
||||
<%=Html.EditorFor(m => m.Revision.Slug, "inputTextPermalink") %>
|
||||
<% foreach (ContentItem content in Model.Revision.Contents) {
|
||||
%><fieldset>
|
||||
<label for="<%="Revision.Contents[" + content.ZoneName + "].Content" %>"><%=_Encoded("Zone Name") %>: <%= content.ZoneName %></label>
|
||||
<% if (Model.Template != null && Model.Template.Zones.Contains(content.ZoneName) == false) {
|
||||
%><span class="warning message">These contents are assigned to a zone that does not exist in the current template. Please delete it or copy it to another zone.</span><%
|
||||
} %>
|
||||
<fieldset>
|
||||
<p><strong>Current layout:</strong>
|
||||
<%=Html.Encode(Model.Revision.TemplateName) %>
|
||||
<%=Html.ActionLink("Change Template", "ChooseTemplate", new { Model.Revision.Page.Id }, new { @class = "button" }) %>
|
||||
</p>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="secondary">
|
||||
<h3><%=_Encoded("Publish Settings") %></h3>
|
||||
<fieldset>
|
||||
<label for="Command_PublishNow"><%=Html.RadioButton("Command", "PublishNow", new { id = "Command_PublishNow" }) %> Publish Now</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="Command_PublishLater"><%=Html.RadioButton("Command", "PublishLater", new { id = "Command_PublishLater" }) %> Publish Later</label>
|
||||
<%=Html.EditorFor(m => m.PublishLaterDate) %>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="Command_SaveDraft"><%=Html.RadioButton("Command", "SaveDraft", new { id = "Command_SaveDraft" }) %> Save Draft</label></li>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input class="button" type="submit" name="submit.Save" value="Save"/>
|
||||
<input class="delete button" type="submit" name="submit.DeleteDraft" value="Delete Draft" <%=Model.CanDeleteDraft ? "" : "disabled" %>/>
|
||||
</fieldset>
|
||||
</div>
|
||||
<% } %>
|
||||
<%= Html.TextArea("Revision.Contents[" + content.ZoneName + "].Content", content.Content, new { @class = "html" }) %>
|
||||
</fieldset><%
|
||||
} %>
|
||||
<fieldset>
|
||||
<p><strong>Current layout:</strong>
|
||||
<%=Html.Encode(Model.Revision.TemplateName) %>
|
||||
<%=Html.ActionLink("Change Template", "ChooseTemplate", new { Model.Revision.Page.Id }, new { @class = "button" }) %>
|
||||
</p>
|
||||
</fieldset>
|
||||
</div>
|
||||
<% Html.Include("AdminFoot"); %>
|
||||
<div class="secondary">
|
||||
<h3><%=_Encoded("Publish Settings") %></h3>
|
||||
<fieldset>
|
||||
<label for="Command_PublishNow"><%=Html.RadioButton("Command", "PublishNow", new { id = "Command_PublishNow" }) %> Publish Now</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="Command_PublishLater"><%=Html.RadioButton("Command", "PublishLater", new { id = "Command_PublishLater" }) %> Publish Later</label>
|
||||
<%=Html.EditorFor(m => m.PublishLaterDate) %>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="Command_SaveDraft"><%=Html.RadioButton("Command", "SaveDraft", new { id = "Command_SaveDraft" }) %> Save Draft</label></li>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input class="button" type="submit" name="submit.Save" value="Save"/>
|
||||
<input class="delete button" type="submit" name="submit.DeleteDraft" value="Delete Draft" <%=Model.CanDeleteDraft ? "" : "disabled" %>/>
|
||||
</fieldset>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
@@ -1,19 +1,17 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Orchard.CmsPages.Models.Page>>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html" %>
|
||||
<% Html.Include("AdminHead"); %>
|
||||
<h2>Export</h2>
|
||||
<p>Possible text about setting up a page goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla erat turpis, blandit eget feugiat nec, tempus vel quam. Mauris et neque eget justo suscipit blandit.</p>
|
||||
<ol>
|
||||
<% foreach (var page in Model) {
|
||||
%><li>Page Id <%=page.Id %>
|
||||
<ol>
|
||||
<% foreach (var revision in page.Revisions) {
|
||||
%><li>Revision <%=revision.Number %> <strong><%=revision.Title %></strong> ~/<%=revision.Slug %>
|
||||
<br />Modified: <%=revision.ModifiedDate %>
|
||||
<br />Published: <%=revision.PublishedDate %></li><%
|
||||
} %>
|
||||
</ol>
|
||||
</li><%
|
||||
} %>
|
||||
</ol>
|
||||
<% Html.Include("AdminFoot"); %>
|
||||
<h2>Export</h2>
|
||||
<p>Possible text about setting up a page goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla erat turpis, blandit eget feugiat nec, tempus vel quam. Mauris et neque eget justo suscipit blandit.</p>
|
||||
<ol>
|
||||
<% foreach (var page in Model) {
|
||||
%><li>Page Id <%=page.Id %>
|
||||
<ol>
|
||||
<% foreach (var revision in page.Revisions) {
|
||||
%><li>Revision <%=revision.Number %> <strong><%=revision.Title %></strong> ~/<%=revision.Slug %>
|
||||
<br />Modified: <%=revision.ModifiedDate %>
|
||||
<br />Published: <%=revision.PublishedDate %></li><%
|
||||
} %>
|
||||
</ol>
|
||||
</li><%
|
||||
} %>
|
||||
</ol>
|
||||
@@ -3,98 +3,96 @@
|
||||
<%@ Import Namespace="Orchard.CmsPages.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html" %>
|
||||
<%-- todo: (heskew) localize --%>
|
||||
<% Html.Include("AdminHead"); %>
|
||||
<h2>Manage Pages</h2>
|
||||
<p>Possible text about setting up a page goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla erat turpis, blandit eget feugiat nec, tempus vel quam. Mauris et neque eget justo suscipit blandit.</p>
|
||||
<% using (Html.BeginForm()) { %>
|
||||
<%=Html.ValidationSummary() %>
|
||||
<fieldset class="actions bulk">
|
||||
<label for="publishActions">Actions: </label>
|
||||
<select id="publishActions" name="<%=Html.NameOf(m => m.Options.BulkAction) %>">
|
||||
<%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.None, "Choose action...") %>
|
||||
<%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.PublishNow, "Publish Now") %>
|
||||
<%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.PublishLater, "Publish Later") %>
|
||||
<%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.Unpublish, "Unpublish") %>
|
||||
<%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.Delete, "Delete") %>
|
||||
</select>
|
||||
<input class="button" type="submit" name="submit.BulkEdit" value="Apply" />
|
||||
</fieldset>
|
||||
<fieldset class="actions bulk">
|
||||
<label for="filterResults">Filter: </label>
|
||||
<select id="filterResults" name="<%=Html.NameOf(m => m.Options.Filter) %>">
|
||||
<%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.All, "All Pages") %>
|
||||
<%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.Published, "Published Pages") %>
|
||||
<%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.Offline, "Offline Pages") %>
|
||||
<%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.Scheduled, "Publish Pending") %>
|
||||
</select>
|
||||
<input class="button" type="submit" name="submit.Filter" value="Apply"/>
|
||||
</fieldset>
|
||||
<div class="manage"><%=Html.ActionLink("Add a page", "Create", new {}, new { @class = "button" }) %></div>
|
||||
<fieldset>
|
||||
<table class="items" summary="This is a table of the PageEntries currently available for use in your application.">
|
||||
<colgroup>
|
||||
<col id="Actions" />
|
||||
<col id="Status" />
|
||||
<col id="Title" />
|
||||
<col id="Author" />
|
||||
<col id="LastUpdated" />
|
||||
<col id="Draft" />
|
||||
<col id="Timer" />
|
||||
<col id="Edit" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"> ↓<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col">Title</th>
|
||||
<th scope="col">Slug</th>
|
||||
<th scope="col">Author</th>
|
||||
<th scope="col">Last Updated</th>
|
||||
<th scope="col">Draft</th>
|
||||
<th scope="col">Scheduled</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<%
|
||||
int pageIndex = 0;
|
||||
foreach (var pageEntry in Model.PageEntries)
|
||||
{
|
||||
var revision = pageEntry.Page.Revisions.LastOrDefault();
|
||||
|
||||
if (revision == null) continue;
|
||||
|
||||
%><tr>
|
||||
<td>
|
||||
<input type="hidden" value="<%=Model.PageEntries[pageIndex].PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pageIndex].PageId) %>"/>
|
||||
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.PageEntries[pageIndex].IsChecked) %>"/>
|
||||
</td>
|
||||
<td>
|
||||
<% if (pageEntry.IsPublished) {
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/online.gif") %>" alt="Online" title="The page is currently online" />
|
||||
<% } else {
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/offline.gif") %>" alt="Offline" title="The page is currently offline" />
|
||||
<% } %>
|
||||
</td>
|
||||
<td><%=Html.ActionLink(revision.Title ?? "(no title)", "Show", new { Controller = "Templates", revision.Slug }) %></td>
|
||||
<td><%=Html.ActionLink(revision.Slug ?? "(no slug)", "Show", new { Controller = "Templates", revision.Slug }) %></td>
|
||||
<td>By Unk</td>
|
||||
<td><%=string.Format("{0:d}<br />{0:t}", revision.ModifiedDate) %></td>
|
||||
<td>
|
||||
<% if (pageEntry.HasDraft) {
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/draft.gif") %>" alt="Draft" title="The page has a draft" />
|
||||
<% }
|
||||
if (revision.Page.Scheduled.Any()) {
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/scheduled.gif") %>" alt="Scheduled" title="The draft is scheduled for publishing" />
|
||||
<% } %>
|
||||
</td>
|
||||
<td><%=revision.Page.Scheduled.Any() ? string.Format("{0:d}<br />{0:t}", revision.Page.Scheduled.First().ScheduledDate.Value) : "" %></td>
|
||||
<td><%=Html.ActionLink("Edit", "Edit", new { revision.Page.Id }) %></td>
|
||||
<h2>Manage Pages</h2>
|
||||
<p>Possible text about setting up a page goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla erat turpis, blandit eget feugiat nec, tempus vel quam. Mauris et neque eget justo suscipit blandit.</p>
|
||||
<% using (Html.BeginForm()) { %>
|
||||
<%=Html.ValidationSummary() %>
|
||||
<fieldset class="actions bulk">
|
||||
<label for="publishActions">Actions: </label>
|
||||
<select id="publishActions" name="<%=Html.NameOf(m => m.Options.BulkAction) %>">
|
||||
<%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.None, "Choose action...") %>
|
||||
<%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.PublishNow, "Publish Now") %>
|
||||
<%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.PublishLater, "Publish Later") %>
|
||||
<%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.Unpublish, "Unpublish") %>
|
||||
<%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.Delete, "Delete") %>
|
||||
</select>
|
||||
<input class="button" type="submit" name="submit.BulkEdit" value="Apply" />
|
||||
</fieldset>
|
||||
<fieldset class="actions bulk">
|
||||
<label for="filterResults">Filter: </label>
|
||||
<select id="filterResults" name="<%=Html.NameOf(m => m.Options.Filter) %>">
|
||||
<%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.All, "All Pages") %>
|
||||
<%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.Published, "Published Pages") %>
|
||||
<%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.Offline, "Offline Pages") %>
|
||||
<%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.Scheduled, "Publish Pending") %>
|
||||
</select>
|
||||
<input class="button" type="submit" name="submit.Filter" value="Apply"/>
|
||||
</fieldset>
|
||||
<div class="manage"><%=Html.ActionLink("Add a page", "Create", new {}, new { @class = "button" }) %></div>
|
||||
<fieldset>
|
||||
<table class="items" summary="This is a table of the PageEntries currently available for use in your application.">
|
||||
<colgroup>
|
||||
<col id="Actions" />
|
||||
<col id="Status" />
|
||||
<col id="Title" />
|
||||
<col id="Author" />
|
||||
<col id="LastUpdated" />
|
||||
<col id="Draft" />
|
||||
<col id="Timer" />
|
||||
<col id="Edit" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"> ↓<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col">Title</th>
|
||||
<th scope="col">Slug</th>
|
||||
<th scope="col">Author</th>
|
||||
<th scope="col">Last Updated</th>
|
||||
<th scope="col">Draft</th>
|
||||
<th scope="col">Scheduled</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
<%
|
||||
pageIndex++;
|
||||
}%>
|
||||
</table>
|
||||
</fieldset>
|
||||
<div class="manage"><%=Html.ActionLink("Add a page", "Create", new {}, new { @class = "button"}) %></div>
|
||||
<% } %>
|
||||
<% Html.Include("AdminFoot"); %>
|
||||
</thead>
|
||||
<%
|
||||
int pageIndex = 0;
|
||||
foreach (var pageEntry in Model.PageEntries)
|
||||
{
|
||||
var revision = pageEntry.Page.Revisions.LastOrDefault();
|
||||
|
||||
if (revision == null) continue;
|
||||
|
||||
%><tr>
|
||||
<td>
|
||||
<input type="hidden" value="<%=Model.PageEntries[pageIndex].PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pageIndex].PageId) %>"/>
|
||||
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.PageEntries[pageIndex].IsChecked) %>"/>
|
||||
</td>
|
||||
<td>
|
||||
<% if (pageEntry.IsPublished) {
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/online.gif") %>" alt="Online" title="The page is currently online" />
|
||||
<% } else {
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/offline.gif") %>" alt="Offline" title="The page is currently offline" />
|
||||
<% } %>
|
||||
</td>
|
||||
<td><%=Html.ActionLink(revision.Title ?? "(no title)", "Show", new { Controller = "Templates", revision.Slug }) %></td>
|
||||
<td><%=Html.ActionLink(revision.Slug ?? "(no slug)", "Show", new { Controller = "Templates", revision.Slug }) %></td>
|
||||
<td>By Unk</td>
|
||||
<td><%=string.Format("{0:d}<br />{0:t}", revision.ModifiedDate) %></td>
|
||||
<td>
|
||||
<% if (pageEntry.HasDraft) {
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/draft.gif") %>" alt="Draft" title="The page has a draft" />
|
||||
<% }
|
||||
if (revision.Page.Scheduled.Any()) {
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/scheduled.gif") %>" alt="Scheduled" title="The draft is scheduled for publishing" />
|
||||
<% } %>
|
||||
</td>
|
||||
<td><%=revision.Page.Scheduled.Any() ? string.Format("{0:d}<br />{0:t}", revision.Page.Scheduled.First().ScheduledDate.Value) : "" %></td>
|
||||
<td><%=Html.ActionLink("Edit", "Edit", new { revision.Page.Id }) %></td>
|
||||
</tr>
|
||||
<%
|
||||
pageIndex++;
|
||||
}%>
|
||||
</table>
|
||||
</fieldset>
|
||||
<div class="manage"><%=Html.ActionLink("Add a page", "Create", new {}, new { @class = "button"}) %></div>
|
||||
<% } %>
|
||||
Reference in New Issue
Block a user