mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
Some naming and text changes
- make name of implicit part on type to hold type fields not lower-cased\ - give type's a more friendly default display name --HG-- branch : dev
This commit is contained in:
@@ -223,7 +223,7 @@ namespace Orchard.ContentTypes.Services {
|
||||
if (name.Length > 128)
|
||||
name = name.Substring(0, 128);
|
||||
|
||||
return name.ToLowerInvariant();
|
||||
return name;
|
||||
}
|
||||
|
||||
private static string VersionName(string name) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.ContentTypes.ViewModels.AddFieldViewModel>" %>
|
||||
<%
|
||||
Html.RegisterStyle("admin.css"); %>
|
||||
<h1><%:Html.TitleForPage(T("Add a new field to \"{0}\"", Model.Part.DisplayName).ToString())%></h1><%
|
||||
<h1><%:Html.TitleForPage(T("Add New Field To \"{0}\"", Model.Part.DisplayName).ToString())%></h1><%
|
||||
using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%:Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.ContentTypes.ViewModels.AddPartsViewModel>" %>
|
||||
<%
|
||||
Html.RegisterStyle("admin.css"); %>
|
||||
<h1><%:Html.TitleForPage(T("Add parts to \"{0}\"", Model.Type.DisplayName).ToString())%></h1><%
|
||||
<h1><%:Html.TitleForPage(T("Add Parts To \"{0}\"", Model.Type.DisplayName).ToString())%></h1><%
|
||||
using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%:Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
|
@@ -192,13 +192,11 @@ namespace Orchard.Setup.Services {
|
||||
|
||||
var contentDefinitionManager = environment.Resolve<IContentDefinitionManager>();
|
||||
contentDefinitionManager.AlterTypeDefinition("BlogPost", cfg => cfg
|
||||
.DisplayedAs("Blog Post")
|
||||
.WithPart("CommentsPart")
|
||||
.WithPart("TagsPart")
|
||||
.WithPart("LocalizationPart")
|
||||
.Indexed());
|
||||
contentDefinitionManager.AlterTypeDefinition("Page", cfg => cfg
|
||||
.DisplayedAs("Page")
|
||||
.WithPart("CommonPart")
|
||||
.WithPart("PublishLaterPart")
|
||||
.WithPart("RoutePart")
|
||||
|
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.ContentManagement.MetaData.Builders;
|
||||
using Orchard.ContentManagement.MetaData.Models;
|
||||
using Orchard.Utility.Extensions;
|
||||
|
||||
namespace Orchard.ContentManagement.MetaData {
|
||||
public interface IContentDefinitionManager : IDependency {
|
||||
@@ -18,7 +19,7 @@ namespace Orchard.ContentManagement.MetaData {
|
||||
|
||||
public static class ContentDefinitionManagerExtensions{
|
||||
public static void AlterTypeDefinition(this IContentDefinitionManager manager, string name, Action<ContentTypeDefinitionBuilder> alteration) {
|
||||
var typeDefinition = manager.GetTypeDefinition(name) ?? new ContentTypeDefinition(name, name);
|
||||
var typeDefinition = manager.GetTypeDefinition(name) ?? new ContentTypeDefinition(name, name.CamelFriendly());
|
||||
var builder = new ContentTypeDefinitionBuilder(typeDefinition);
|
||||
alteration(builder);
|
||||
manager.StoreTypeDefinition(builder.Build());
|
||||
|
Reference in New Issue
Block a user