Finishing up initial cleanup pass on the CMSPages admin UI

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4042066
This commit is contained in:
skewed
2009-11-24 16:36:01 +00:00
parent 3907af6ca2
commit 654298dd23
6 changed files with 55 additions and 78 deletions

View File

@@ -1,37 +1,25 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.CmsPages.ViewModels.PageIndexViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<PageIndexViewModel>" %>
<%@ Import Namespace="Orchard.CmsPages.ViewModels"%> <%@ Import Namespace="Orchard.CmsPages.ViewModels"%>
<%@ Import Namespace="Orchard.Utility"%> <%@ Import Namespace="Orchard.Utility"%>
<%@ Import Namespace="Orchard.CmsPages.Services.Templates"%> <%@ Import Namespace="Orchard.CmsPages.Services.Templates"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("Head"); %> <% Html.Include("Head"); %>
<div class="yui-u"> <h2>Delete pages</h2>
<h2>Delete pages</h2> <p>Are you sure you want to delete the pages?</p>
<p class="bottomSpacer"> <% using (Html.BeginForm()) { %>
Are you sure you want to delete the pages?</p>
</div>
<div class="yui-u">
<%using (Html.BeginForm()) { %>
<%= Html.ValidationSummary() %> <%= Html.ValidationSummary() %>
<fieldset>
<div class="yui-u first"> <input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkAction)%>" value="<%=PageIndexBulkAction.Delete%>" />
<ol> <input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkDeleteConfirmed)%>" value="true" />
<li class="clearLayout"> <input class="button" type="submit" name="submit.BulkEdit" value="Delete" />
<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" />
</li>
</ol>
</div>
<% <%
int pageIndex = 0; int pageIndex = 0;
foreach (var pageEntry in Model.PageEntries.Where(e => e.IsChecked)) { 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[pageIndex].PageId)%>"/> %><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[pageIndex].IsChecked)%>"/> <input type="hidden" value="<%=pageEntry.IsChecked %>" name="<%=Html.NameOf(m => m.PageEntries[pi].IsChecked)%>"/><%
<% pageIndex++; pageIndex++;
}%> } %>
<%}/*EndForm*/%> </fieldset>
</div> <% } %>
<% Html.Include("Foot"); %> <% Html.Include("Foot"); %>

View File

@@ -1,36 +1,25 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.CmsPages.ViewModels.PageIndexViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<PageIndexViewModel>" %>
<%@ Import Namespace="Orchard.CmsPages.ViewModels"%> <%@ Import Namespace="Orchard.CmsPages.ViewModels"%>
<%@ Import Namespace="Orchard.Utility"%> <%@ Import Namespace="Orchard.Utility"%>
<%@ Import Namespace="Orchard.CmsPages.Services.Templates"%> <%@ Import Namespace="Orchard.CmsPages.Services.Templates"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("Head"); %> <% Html.Include("Head"); %>
<%using (Html.BeginForm()) { %> <% using (Html.BeginForm()) { %>
<div class="yui-u">
<h2>Publish later</h2> <h2>Publish later</h2>
<p class="bottomSpacer">Enter the scheduled publication date:</p> <p>Enter the scheduled publication date:</p>
<%=Html.EditorFor(m => m.Options.BulkPublishLaterDate)%> <%=Html.ValidationSummary() %>
</div> <fieldset>
<%=Html.EditorFor(m => m.Options.BulkPublishLaterDate)%>
<div class="yui-u"> <input class="button" type="submit" name="submit.BulkEdit" value="Publish later" />
<%= Html.ValidationSummary() %> <input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkAction)%>" value="<%=PageIndexBulkAction.PublishLater%>" />
<div class="yui-u first">
<ol>
<li class="clearLayout">
<input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkAction)%>" value="<%=PageIndexBulkAction.PublishLater%>" />
<input class="button" type="submit" name="submit.BulkEdit" value="Publish later" />
</li>
</ol>
</div>
<% <%
int pageIndex = 0; int pageIndex = 0;
foreach (var pageEntry in Model.PageEntries.Where(e => e.IsChecked)) { 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[pageIndex].PageId)%>"/> %><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[pageIndex].IsChecked)%>"/> <input type="hidden" value="<%=pageEntry.IsChecked %>" name="<%=Html.NameOf(m => m.PageEntries[pi].IsChecked)%>"/><%
<% pageIndex++; pageIndex++;
}%> } %>
</div> </fieldset>
<%}/*EndForm*/%> <% } %>
<% Html.Include("Foot"); %> <% Html.Include("Foot"); %>

View File

@@ -7,13 +7,13 @@
<% using (Html.BeginForm()) { <% using (Html.BeginForm()) {
%><%= Html.ValidationSummary() %> %><%= Html.ValidationSummary() %>
<fieldset> <fieldset>
<ol class="templates"> <ol class="templates"><%
<% foreach (var template in Model.Templates) { foreach (var template in Model.Templates) {
var t = template; %> var t = template; %>
<li> <li><%=
<%=Html.EditorFor(m => t) %> Html.EditorFor(m => t) %>
</li> </li><%
<% } %> } %>
</ol> </ol>
</fieldset> </fieldset>
<div> <div>

View File

@@ -31,18 +31,18 @@
<div class="secondary"> <div class="secondary">
<h3><%=_Encoded("Publish Settings") %></h3> <h3><%=_Encoded("Publish Settings") %></h3>
<fieldset> <fieldset>
<ol class="formList"> <label for="Command_PublishNow"><%=Html.RadioButton("Command", "PublishNow", new { id = "Command_PublishNow" }) %> Publish Now</label>
<li><label for="Command_PublishNow"><%=Html.RadioButton("Command", "PublishNow", new { id = "Command_PublishNow" }) %> Publish Now</label></li> </fieldset>
<li> <fieldset>
<label for="Command_PublishLater"><%=Html.RadioButton("Command", "PublishLater", new { id = "Command_PublishLater" }) %> Publish Later</label> <label for="Command_PublishLater"><%=Html.RadioButton("Command", "PublishLater", new { id = "Command_PublishLater" }) %> Publish Later</label>
<%=Html.EditorFor(m => m.PublishLaterDate) %> <%=Html.EditorFor(m => m.PublishLaterDate) %>
</li> </fieldset>
<li><label for="Command_SaveDraft"><%=Html.RadioButton("Command", "SaveDraft", new { id = "Command_SaveDraft" }) %> Save Draft</label></li> <fieldset>
<li> <label for="Command_SaveDraft"><%=Html.RadioButton("Command", "SaveDraft", new { id = "Command_SaveDraft" }) %> Save Draft</label></li>
<input class="button" type="submit" name="submit.Save" value="Save"/> </fieldset>
<input class="button" type="submit" name="submit.DeleteDraft" value="Delete Draft" <%=Model.CanDeleteDraft ? "" : "disabled" %>/> <fieldset>
</li> <input class="button" type="submit" name="submit.Save" value="Save"/>
</ol> <input class="button" type="submit" name="submit.DeleteDraft" value="Delete Draft" <%=Model.CanDeleteDraft ? "" : "disabled" %>/>
</fieldset> </fieldset>
</div> </div>
<%}/*EndForm*/%> <%}/*EndForm*/%>

View File

@@ -8,8 +8,8 @@
var t = template; %> var t = template; %>
<li> <li>
<%=Html.EditorFor(m => t) %> <%=Html.EditorFor(m => t) %>
</li> </li><%
<% } %> } %>
</ol> </ol>
</fieldset> </fieldset>
<div><input class="button" type="submit" value="Create" /></div> <div><input class="button" type="submit" value="Create" /></div>

View File

@@ -1,5 +1,5 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TemplateDescriptor>" %> <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TemplateDescriptor>" %>
<%@ Import Namespace="Orchard.CmsPages.Services.Templates"%> <%@ Import Namespace="Orchard.CmsPages.Services.Templates" %>
<ul> <ul>
<li> <li>
<h3><%=Html.Encode(Model.DisplayName)%></h3> <h3><%=Html.Encode(Model.DisplayName)%></h3>
@@ -7,7 +7,7 @@
<li> <li>
<label title="<%=Html.Encode(Model.DisplayName)%>" for="TemplateName_<%=Model.Name%>"> <label title="<%=Html.Encode(Model.DisplayName)%>" for="TemplateName_<%=Model.Name%>">
<%-- todo: (heskew) need to know if this template descriptor is what's currently set. view model? --%> <%-- todo: (heskew) need to know if this template descriptor is what's currently set. view model? --%>
<%=Html.RadioButton("TemplateName", Model.Name, "" == Model.Name, new { id="TemplateName_" + Model.Name })%> <input type="radio" name="TemplateName" checked="<%="" == Model.Name ? "checked" : ""%>" value="<%=Model.Name %>" id="<%=string.Format("TemplateName_{0}", Model.Name) %>" />
Select this template</label> Select this template</label>
</li> </li>
<li> <li>