2009-11-14 02:35:43 +00:00
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<Orchard.CmsPages.ViewModels.PageEditViewModel>" %>
2009-11-07 22:49:58 +00:00
<%@ Import Namespace="Orchard.CmsPages.Models"%>
<%@ Import Namespace="Orchard.Mvc.Html" %>
2009-11-22 08:46:22 +00:00
<% Html.Include("Head"); %>
2009-11-23 22:59:54 +00:00
<h2><%=_Encoded("Edit Page")%></h2>
<p class="bottomSpacer"><%=_Encoded("about setting up a page")%></p>
<%=Html.ValidationSummary() %>
<div class="sections">
2009-11-07 22:49:58 +00:00
<%using (Html.BeginForm()) {%>
2009-11-23 22:59:54 +00:00
<div class="primary">
2009-11-20 01:19:36 +00:00
<h3><%=_Encoded("Page Content") %></h3>
2009-11-23 22:59:54 +00:00
<%-- todo: (heskew) change the editors to be self-contained (fieldset > editor) --%>
2009-11-07 22:49:58 +00:00
<ol>
<%=Html.EditorFor(m => m.Revision.Title, "inputTextLarge")%>
<%=Html.EditorFor(m => m.Revision.Slug, "inputTextPermalink")%>
<%foreach (ContentItem content in Model.Revision.Contents) {%>
<label for="<%="Revision.Contents[" + content.ZoneName + "].Content" %>">
2009-11-20 01:19:36 +00:00
<%=_Encoded("Zone Name")%>: <%= content.ZoneName %></label>
2009-11-07 22:49:58 +00:00
<%if (Model.Template != null && Model.Template.Zones.Contains(content.ZoneName) == false) {%>
<div class="warning">These contents are assigned to a zone that does not exist in the current template. Please delete it or copy it to another zone.</div>
<%}%>
<%= Html.TextArea("Revision.Contents[" + content.ZoneName + "].Content", content.Content) %>
</li>
<%}%>
<li>
<%--<%=Html.LabelFor(m=>m.Revision.TemplateName) %>
<%=Html.DisplayFor(m=>m.Revision.TemplateName)%>--%>
<p>
<strong>Current layout:</strong>
<%=Html.Encode(Model.Revision.TemplateName)%>
<%=Html.ActionLink("Change Template", "ChooseTemplate", new { Model.Revision.Page.Id }, new { @class = "linkButton" })%>
</p>
</li>
</ol>
</div>
2009-11-23 22:59:54 +00:00
<div class="secondary">
2009-11-20 01:19:36 +00:00
<h3><%=_Encoded("Publish Settings")%></h3>
2009-11-07 22:49:58 +00:00
<fieldset>
<ol class="formList">
<li><label for="Command_PublishNow"><%=Html.RadioButton("Command", "PublishNow", new { id = "Command_PublishNow" })%> Publish Now</label></li>
<li>
<label for="Command_PublishLater"><%=Html.RadioButton("Command", "PublishLater", new { id = "Command_PublishLater" })%> Publish Later</label>
<%=Html.EditorFor(m => m.PublishLaterDate)%>
</li>
<li><label for="Command_SaveDraft"><%=Html.RadioButton("Command", "SaveDraft", new { id = "Command_SaveDraft" })%> Save Draft</label></li>
<li>
<input class="button" type="submit" name="submit.Save" value="Save"/>
<input class="button" type="submit" name="submit.DeleteDraft" value="Delete Draft" <%=Model.CanDeleteDraft ? "" : "disabled" %>/>
</li>
</ol>
</fieldset>
</div>
<%}/*EndForm*/%>
</div>
2009-11-22 08:46:22 +00:00
<% Html.Include("Foot"); %>