Giving page titles to the Contents Create and Edit pages and cleaning up the Orchard.ContentTypes type list a little

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-07-23 14:32:55 -07:00
parent a0227384ca
commit 53520f1d32
3 changed files with 12 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<CreateItemViewModel>" %>
<%@ Import Namespace="Orchard.Core.Contents.ViewModels" %>
<% Html.AddTitleParts(T("Create Content").ToString()); %>
<h1><%:Html.TitleForPage((string.IsNullOrEmpty(Model.Content.Item.TypeDefinition.DisplayName) ? T("Create Content") : T("Create {0}", Model.Content.Item.TypeDefinition.DisplayName)).ToString()) %></h1>
<% using (Html.BeginFormAntiForgeryPost()) { %>
<%:Html.ValidationSummary() %>
<%:Html.EditorForItem(m=>m.Content) %>

View File

@@ -1,6 +1,6 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<EditItemViewModel>" %>
<%@ Import Namespace="Orchard.Core.Contents.ViewModels" %>
<h1><%:Html.TitleForPage(T("Edit Content").ToString())%></h1>
<h1><%:Html.TitleForPage((string.IsNullOrEmpty(Model.Content.Item.TypeDefinition.DisplayName) ? T("Edit Content") : T("Edit {0}", Model.Content.Item.TypeDefinition.DisplayName)).ToString()) %></h1>
<% using (Html.BeginFormAntiForgeryPost()) { %>
<%:Html.ValidationSummary() %>
<%:Html.EditorForItem(m=>m.Content) %>

View File

@@ -1,11 +1,17 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.ContentTypes.ViewModels.EditTypeViewModel>" %>
<%@ Import Namespace="Orchard.Core.Contents.Settings" %>
<div class="summary">
<div class="properties">
<h3><%:Model.DisplayName%></h3>
<p class="pageStatus"><%:Html.ActionLink(T("Create a new {0}", Model.DisplayName).Text, "Create", new {area = "Contents", id = Model.Name}) %></p>
<h3><%:Model.DisplayName%></h3><%
var creatable = Model.Settings.GetModel<ContentTypeSettings>().Creatable;
if (creatable) { %>
<p class="pageStatus"><%:Html.ActionLink(T("Create a new {0}", Model.DisplayName).Text, "Create", new {area = "Contents", id = Model.Name}) %></p><%
} %>
</div>
<div class="related">
<%:Html.ActionLink(T("List Items").ToString(), "List", new {area = "Contents", id = Model.Name})%><%:T(" | ")%>
<div class="related"><%
if (creatable) { %>
<%:Html.ActionLink(T("List Items").ToString(), "List", new {area = "Contents", id = Model.Name})%><%:T(" | ")%><%
} %>
<%:Html.ActionLink(T("Edit").ToString(), "Edit", new {area = "Orchard.ContentTypes", id = Model.Name})%>
</div>
</div>