A little cleanup in the content management UI

- using content type display names on the creatable type list
- removed the readonly Name field on the content type edit page
- removed the "Edit global part config" link from content parts on the content type edit page
- changed the Create (Contents) page to an ascx

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-07-14 08:57:07 -07:00
parent a8634a5ca3
commit 1d20556a83
5 changed files with 4 additions and 8 deletions

View File

@@ -3,5 +3,5 @@
<h1><%:Html.TitleForPage(T("Create New Content").ToString())%></h1>
<%:Html.UnorderedList(
Model.Types,
(ctd, i) => MvcHtmlString.Create(string.Format("<p>{0}</p>", Html.ActionLink(ctd.Name, "Create", new { Area = "Contents", Id = ctd.Name }))),
(ctd, i) => MvcHtmlString.Create(string.Format("<p>{0}</p>", Html.ActionLink(ctd.DisplayName, "Create", new { Area = "Contents", Id = ctd.Name }))),
"contentTypes")%>

View File

@@ -1,8 +1,7 @@
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<CreateItemViewModel>" %>
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<CreateItemViewModel>" %>
<%@ Import Namespace="Orchard.Core.Contents.ViewModels" %>
<% Html.AddTitleParts(T("Create Content").ToString()); %>
<% using (Html.BeginFormAntiForgeryPost()) { %>
<%:Html.ValidationSummary() %>
<%:Html.EditorForItem(m=>m.Content) %>
<%} %>
<%} %>

View File

@@ -254,7 +254,7 @@
<Content Include="Contents\Module.txt" />
<Content Include="Contents\Views\Admin\Edit.ascx" />
<Content Include="Contents\Views\Admin\CreatableTypeList.ascx" />
<Content Include="Contents\Views\Admin\Create.aspx" />
<Content Include="Contents\Views\Admin\Create.ascx" />
<Content Include="Contents\Views\Admin\List.ascx" />
<Content Include="Contents\Views\DisplayTemplates\Items\Contents.Item.ascx" />
<Content Include="Contents\Views\DisplayTemplates\Items\Contents.Item.SummaryAdmin.ascx" />

View File

@@ -11,8 +11,6 @@ using (Html.BeginFormAntiForgeryPost()) { %>
<%--// todo: if we continue to go down the midrodata route, some helpers would be nice--%>
<meta itemprop="DisplayName" content="<%:Model.DisplayName %>" /><%--
// has unintended consequences (renamging the type) - changing the name creates a new type of that name--%>
<label for="Name" itemprop="name"><%:T("Name") %></label>
<%:Html.TextBoxFor(m => m.Name, new { @class = "textMedium", disabled = "disabled" })%>
<meta itemprop="Name" content="<%:Model.Name %>" />
<%:Html.HiddenFor(m => m.Name) %>
</fieldset><%

View File

@@ -9,7 +9,6 @@
Html.RenderTemplates(Model.Templates); %>
</div><%
} %>
<div class="manage minor"><%:Html.ActionLink(T("Edit global part config").Text, "EditPart", new { area = "Orchard.ContentTypes", id = Model.PartDefinition.Name })%></div>
<%:Html.DisplayFor(m => m.PartDefinition.Settings, "Settings", "PartDefinition")
%><%:Html.EditorFor(m => m.PartDefinition.Fields, "TypePartFields", "PartDefinition")
%><%:Html.HiddenFor(m => m.PartDefinition.Name)