Changing content type names to PascalCase

Became clear while editing metadata the names the only lowercase value and stick out pretty badly
especially when used as {id} in urls

--HG--
branch : dev
This commit is contained in:
Louis DeJardin
2010-06-24 16:34:10 -07:00
parent 61395c8ad8
commit 57566aaa6a
30 changed files with 55 additions and 51 deletions

View File

@@ -61,7 +61,7 @@ namespace Orchard.Core.Tests.Common.Providers {
public TestHandler() { public TestHandler() {
Filters.Add(new ActivatingFilter<CommonAspect>("test-item")); Filters.Add(new ActivatingFilter<CommonAspect>("test-item"));
Filters.Add(new ActivatingFilter<ContentPart<CommonVersionRecord>>("test-item")); Filters.Add(new ActivatingFilter<ContentPart<CommonVersionRecord>>("test-item"));
Filters.Add(new ActivatingFilter<TestUser>("user")); Filters.Add(new ActivatingFilter<TestUser>("User"));
} }
} }
@@ -87,12 +87,12 @@ namespace Orchard.Core.Tests.Common.Providers {
var contentManager = _container.Resolve<IContentManager>(); var contentManager = _container.Resolve<IContentManager>();
var updateModel = new Mock<IUpdateModel>(); var updateModel = new Mock<IUpdateModel>();
var user = contentManager.New<IUser>("user"); var user = contentManager.New<IUser>("User");
_authn.Setup(x => x.GetAuthenticatedUser()).Returns(user); _authn.Setup(x => x.GetAuthenticatedUser()).Returns(user);
var createUtc = _clock.UtcNow; var createUtc = _clock.UtcNow;
var item = contentManager.Create<ICommonAspect>("test-item", VersionOptions.Draft, init => { }); var item = contentManager.Create<ICommonAspect>("test-item", VersionOptions.Draft, init => { });
var viewModel = new OwnerEditorViewModel() { Owner = "user" }; var viewModel = new OwnerEditorViewModel() { Owner = "User" };
updateModel.Setup(x => x.TryUpdateModel(viewModel, "", null, null)).Returns(true); updateModel.Setup(x => x.TryUpdateModel(viewModel, "", null, null)).Returns(true);
contentManager.UpdateEditorModel(item.ContentItem, updateModel.Object); contentManager.UpdateEditorModel(item.ContentItem, updateModel.Object);
} }
@@ -125,7 +125,7 @@ namespace Orchard.Core.Tests.Common.Providers {
var item = contentManager.Create<ICommonAspect>("test-item", VersionOptions.Draft, init => { }); var item = contentManager.Create<ICommonAspect>("test-item", VersionOptions.Draft, init => { });
var user = contentManager.New<IUser>("user"); var user = contentManager.New<IUser>("User");
_authn.Setup(x => x.GetAuthenticatedUser()).Returns(user); _authn.Setup(x => x.GetAuthenticatedUser()).Returns(user);
_authz.Setup(x => x.TryCheckAccess(Permissions.ChangeOwner, user, item)).Returns(true); _authz.Setup(x => x.TryCheckAccess(Permissions.ChangeOwner, user, item)).Returns(true);
@@ -143,7 +143,7 @@ namespace Orchard.Core.Tests.Common.Providers {
var item = contentManager.Create<ICommonAspect>("test-item", VersionOptions.Draft, init => { }); var item = contentManager.Create<ICommonAspect>("test-item", VersionOptions.Draft, init => { });
var user = contentManager.New<IUser>("user"); var user = contentManager.New<IUser>("User");
_authn.Setup(x => x.GetAuthenticatedUser()).Returns(user); _authn.Setup(x => x.GetAuthenticatedUser()).Returns(user);
_authz.Setup(x => x.TryCheckAccess(Permissions.ChangeOwner, user, item)).Returns(true); _authz.Setup(x => x.TryCheckAccess(Permissions.ChangeOwner, user, item)).Returns(true);

View File

@@ -57,15 +57,15 @@ namespace Orchard.Tests.Modules.Users.Controllers {
var manager = _container.Resolve<IContentManager>(); var manager = _container.Resolve<IContentManager>();
var userOne = manager.New<User>("user"); var userOne = manager.New<User>("User");
userOne.Record = new UserRecord { UserName = "one" }; userOne.Record = new UserRecord { UserName = "one" };
manager.Create(userOne.ContentItem); manager.Create(userOne.ContentItem);
var userTwo = manager.New<User>("user"); var userTwo = manager.New<User>("User");
userTwo.Record = new UserRecord { UserName = "two" }; userTwo.Record = new UserRecord { UserName = "two" };
manager.Create(userTwo.ContentItem); manager.Create(userTwo.ContentItem);
var userThree = manager.New<User>("user"); var userThree = manager.New<User>("User");
userThree.Record = new UserRecord { UserName = "three" }; userThree.Record = new UserRecord { UserName = "three" };
manager.Create(userThree.ContentItem); manager.Create(userThree.ContentItem);

View File

@@ -10,7 +10,7 @@ namespace Orchard.Core.Navigation.Drivers {
private readonly IAuthorizationService _authorizationService; private readonly IAuthorizationService _authorizationService;
public readonly static ContentType ContentType = new ContentType { public readonly static ContentType ContentType = new ContentType {
Name = "menuitem", Name = "MenuItem",
DisplayName = "Menu Item" DisplayName = "Menu Item"
}; };

View File

@@ -8,9 +8,9 @@ namespace Orchard.Core.Navigation.Handlers {
[UsedImplicitly] [UsedImplicitly]
public class MenuPartHandler : ContentHandler { public class MenuPartHandler : ContentHandler {
public MenuPartHandler(IRepository<MenuPartRecord> menuPartRepository) { public MenuPartHandler(IRepository<MenuPartRecord> menuPartRepository) {
Filters.Add(new ActivatingFilter<MenuPart>("blog")); Filters.Add(new ActivatingFilter<MenuPart>("Blog"));
Filters.Add(new ActivatingFilter<MenuPart>("page")); Filters.Add(new ActivatingFilter<MenuPart>("Page"));
Filters.Add(new ActivatingFilter<MenuPart>("menuitem")); Filters.Add(new ActivatingFilter<MenuPart>("MenuItem"));
Filters.Add(StorageFilter.For(menuPartRepository)); Filters.Add(StorageFilter.For(menuPartRepository));
OnInitializing<MenuPart>((ctx, x) => { OnInitializing<MenuPart>((ctx, x) => {

View File

@@ -7,7 +7,7 @@ namespace Orchard.Core.Settings.Handlers {
[UsedImplicitly] [UsedImplicitly]
public class SiteSettingsHandler : ContentHandler { public class SiteSettingsHandler : ContentHandler {
public SiteSettingsHandler(IRepository<SiteSettingsRecord> repository){ public SiteSettingsHandler(IRepository<SiteSettingsRecord> repository){
Filters.Add(new ActivatingFilter<SiteSettings>("site")); Filters.Add(new ActivatingFilter<SiteSettings>("Site"));
Filters.Add(StorageFilter.For(repository)); Filters.Add(StorageFilter.For(repository));
} }
} }

View File

@@ -3,7 +3,7 @@ using Orchard.Settings;
namespace Orchard.Core.Settings.Models { namespace Orchard.Core.Settings.Models {
public sealed class SiteSettings : ContentPart<SiteSettingsRecord>, ISite { public sealed class SiteSettings : ContentPart<SiteSettingsRecord>, ISite {
public static readonly ContentType ContentType = new ContentType { Name = "site", DisplayName = "Site Settings" }; public static readonly ContentType ContentType = new ContentType { Name = "Site", DisplayName = "Site Settings" };
public string PageTitleSeparator { public string PageTitleSeparator {
get { return Record.PageTitleSeparator; } get { return Record.PageTitleSeparator; }

View File

@@ -27,12 +27,12 @@ namespace Orchard.Core.Settings.Services {
public ISite GetSiteSettings() { public ISite GetSiteSettings() {
var siteId = _cacheManager.Get("SiteId", ctx => { var siteId = _cacheManager.Get("SiteId", ctx => {
var site = _contentManager.Query("site") var site = _contentManager.Query("Site")
.Slice(0, 1) .Slice(0, 1)
.FirstOrDefault(); .FirstOrDefault();
if (site == null) { if (site == null) {
site = _contentManager.Create<SiteSettings>("site", item => { site = _contentManager.Create<SiteSettings>("Site", item => {
item.Record.SiteSalt = Guid.NewGuid().ToString("N"); item.Record.SiteSalt = Guid.NewGuid().ToString("N");
item.Record.SiteName = "My Orchard Project Application"; item.Record.SiteName = "My Orchard Project Application";
item.Record.PageTitleSeparator = " - "; item.Record.PageTitleSeparator = " - ";

View File

@@ -13,8 +13,8 @@ namespace Futures.Widgets.Controllers {
IRepository<HasWidgetsRecord> hasWidgetRepository, IRepository<HasWidgetsRecord> hasWidgetRepository,
IRepository<WidgetRecord> widgetRepository) { IRepository<WidgetRecord> widgetRepository) {
// marking the "site" content type as a widget container // marking the "Site" content type as a widget container
Filters.Add(new ActivatingFilter<HasWidgets>("site")); Filters.Add(new ActivatingFilter<HasWidgets>("Site"));
// adding parts to the "HtmlWidget" content type // adding parts to the "HtmlWidget" content type
Filters.Add(new ActivatingFilter<Widget>("HtmlWidget")); Filters.Add(new ActivatingFilter<Widget>("HtmlWidget"));

View File

@@ -53,7 +53,7 @@ namespace Orchard.Blogs.Commands {
return "Invalid Slug provided. Blog creation failed."; return "Invalid Slug provided. Blog creation failed.";
} }
var blog = _contentManager.New("blog"); var blog = _contentManager.New("Blog");
blog.As<ICommonAspect>().Owner = admin; blog.As<ICommonAspect>().Owner = admin;
blog.As<RoutableAspect>().Slug = Slug; blog.As<RoutableAspect>().Slug = Slug;
blog.As<RoutableAspect>().Title = Title; blog.As<RoutableAspect>().Title = Title;
@@ -95,7 +95,7 @@ namespace Orchard.Blogs.Commands {
string postName = item.Element("title").Value; string postName = item.Element("title").Value;
Context.Output.WriteLine("Adding post: {0}...", postName.Substring(0, Math.Min(postName.Length, 40))); Context.Output.WriteLine("Adding post: {0}...", postName.Substring(0, Math.Min(postName.Length, 40)));
var post = _contentManager.New("blogpost"); var post = _contentManager.New("BlogPost");
post.As<ICommonAspect>().Owner = admin; post.As<ICommonAspect>().Owner = admin;
post.As<ICommonAspect>().Container = blog; post.As<ICommonAspect>().Container = blog;
post.As<RoutableAspect>().Slug = Slugify(postName); post.As<RoutableAspect>().Slug = Slugify(postName);

View File

@@ -20,7 +20,7 @@ namespace Orchard.Blogs.Drivers {
public IOrchardServices Services { get; set; } public IOrchardServices Services { get; set; }
public readonly static ContentType ContentType = new ContentType { public readonly static ContentType ContentType = new ContentType {
Name = "blog", Name = "Blog",
DisplayName = "Blog" DisplayName = "Blog"
}; };

View File

@@ -16,7 +16,7 @@ namespace Orchard.Blogs.Drivers {
private readonly IRoutableService _routableService; private readonly IRoutableService _routableService;
public readonly static ContentType ContentType = new ContentType { public readonly static ContentType ContentType = new ContentType {
Name = "blogpost", Name = "BlogPost",
DisplayName = "Blog Post" DisplayName = "Blog Post"
}; };

View File

@@ -7,7 +7,7 @@ namespace Orchard.Comments.Drivers {
[UsedImplicitly] [UsedImplicitly]
public class CommentDriver : ContentItemDriver<Comment> { public class CommentDriver : ContentItemDriver<Comment> {
public readonly static ContentType ContentType = new ContentType { public readonly static ContentType ContentType = new ContentType {
Name = "comment", Name = "Comment",
DisplayName = "Comment" DisplayName = "Comment"
}; };

View File

@@ -7,7 +7,7 @@ namespace Orchard.Comments.Handlers {
[UsedImplicitly] [UsedImplicitly]
public class CommentSettingsHandler : ContentHandler { public class CommentSettingsHandler : ContentHandler {
public CommentSettingsHandler(IRepository<CommentSettingsRecord> repository) { public CommentSettingsHandler(IRepository<CommentSettingsRecord> repository) {
Filters.Add(new ActivatingFilter<CommentSettings>("site")); Filters.Add(new ActivatingFilter<CommentSettings>("Site"));
Filters.Add(StorageFilter.For(repository)); Filters.Add(StorageFilter.For(repository));
Filters.Add(new TemplateFilterForRecord<CommentSettingsRecord>("CommentSettings", "Parts/Comments.SiteSettings")); Filters.Add(new TemplateFilterForRecord<CommentSettingsRecord>("CommentSettings", "Parts/Comments.SiteSettings"));
} }

View File

@@ -6,7 +6,7 @@ namespace Orchard.Comments.Handlers {
[UsedImplicitly] [UsedImplicitly]
public class HasCommentsContainerHandler : ContentHandler { public class HasCommentsContainerHandler : ContentHandler {
public HasCommentsContainerHandler() { public HasCommentsContainerHandler() {
Filters.Add(new ActivatingFilter<HasCommentsContainer>("blog")); Filters.Add(new ActivatingFilter<HasCommentsContainer>("Blog"));
} }
} }
} }

View File

@@ -42,7 +42,7 @@ namespace Orchard.ContentTypes.Services {
//just giving the new type some default parts for now //just giving the new type some default parts for now
_contentDefinitionManager.AlterTypeDefinition( _contentDefinitionManager.AlterTypeDefinition(
typeName, typeName,
cfg => cfg.Named(typeName, contentTypeDefinition.DisplayName) cfg => cfg.DisplayedAs(contentTypeDefinition.DisplayName)
.WithPart("CommonAspect") .WithPart("CommonAspect")
//.WithPart("RoutableAspect") //need to go the new routable route //.WithPart("RoutableAspect") //need to go the new routable route
.WithPart("BodyAspect")); .WithPart("BodyAspect"));

View File

@@ -24,7 +24,7 @@ namespace Orchard.DevTools.Commands {
for (var index = 0; index != 5; ++index) { for (var index = 0; index != 5; ++index) {
var pageName = "page" + index; var pageName = "page" + index;
var page = _contentManager.Create("page", VersionOptions.Draft); var page = _contentManager.Create("Page", VersionOptions.Draft);
page.As<ICommonAspect>().Owner = admin; page.As<ICommonAspect>().Owner = admin;
page.As<RoutableAspect>().Slug = pageName; page.As<RoutableAspect>().Slug = pageName;
page.As<RoutableAspect>().Title = pageName; page.As<RoutableAspect>().Title = pageName;
@@ -35,7 +35,7 @@ namespace Orchard.DevTools.Commands {
_contentManager.Publish(page); _contentManager.Publish(page);
var blogName = "blog" + index; var blogName = "blog" + index;
var blog = _contentManager.New("blog"); var blog = _contentManager.New("Blog");
blog.As<ICommonAspect>().Owner = admin; blog.As<ICommonAspect>().Owner = admin;
blog.As<RoutableAspect>().Slug = blogName; blog.As<RoutableAspect>().Slug = blogName;
blog.As<RoutableAspect>().Title = blogName; blog.As<RoutableAspect>().Title = blogName;
@@ -44,10 +44,10 @@ namespace Orchard.DevTools.Commands {
blog.As<MenuPart>().MenuText = blogName; blog.As<MenuPart>().MenuText = blogName;
_contentManager.Create(blog); _contentManager.Create(blog);
// "blogpost" content type can't be created w/out http context at the moment // "BlogPost" content type can't be created w/out http context at the moment
//for (var index2 = 0; index2 != 5; ++index2) { //for (var index2 = 0; index2 != 5; ++index2) {
// var postName = "post" + index; // var postName = "post" + index;
// var post = _contentManager.New("blogpost"); // var post = _contentManager.New("BlogPost");
// post.As<ICommonAspect>().Owner = admin; // post.As<ICommonAspect>().Owner = admin;
// post.As<ICommonAspect>().Container = blog; // post.As<ICommonAspect>().Container = blog;
// post.As<RoutableAspect>().Slug = postName; // post.As<RoutableAspect>().Slug = postName;

View File

@@ -7,7 +7,7 @@ namespace Orchard.Media.Handlers {
[UsedImplicitly] [UsedImplicitly]
public class MediaSettingsHandler : ContentHandler { public class MediaSettingsHandler : ContentHandler {
public MediaSettingsHandler(IRepository<MediaSettingsRecord> repository) { public MediaSettingsHandler(IRepository<MediaSettingsRecord> repository) {
Filters.Add(new ActivatingFilter<MediaSettings>("site")); Filters.Add(new ActivatingFilter<MediaSettings>("Site"));
Filters.Add(StorageFilter.For(repository) ); Filters.Add(StorageFilter.For(repository) );
OnInitializing<MediaSettings>(DefaultSettings); OnInitializing<MediaSettings>(DefaultSettings);
} }

View File

@@ -20,7 +20,7 @@ namespace Orchard.Pages.Drivers {
private readonly IRoutableService _routableService; private readonly IRoutableService _routableService;
public readonly static ContentType ContentType = new ContentType { public readonly static ContentType ContentType = new ContentType {
Name = "page", Name = "Page",
DisplayName = "Page" DisplayName = "Page"
}; };

View File

@@ -25,8 +25,8 @@ namespace Orchard.Pages {
"{*slug}", "{*slug}",
new RouteValueDictionary { new RouteValueDictionary {
{"area", "Orchard.Pages"}, {"area", "Orchard.Pages"},
{"controller", "page"}, {"controller", "Page"},
{"action", "item"} {"action", "Item"}
}, },
new RouteValueDictionary { new RouteValueDictionary {
{"slug", _pageSlugConstraint} {"slug", _pageSlugConstraint}

View File

@@ -12,7 +12,7 @@ namespace Orchard.Roles.Handlers {
public UserRolesHandler(IRepository<UserRolesRecord> userRolesRepository) { public UserRolesHandler(IRepository<UserRolesRecord> userRolesRepository) {
_userRolesRepository = userRolesRepository; _userRolesRepository = userRolesRepository;
Filters.Add(new ActivatingFilter<UserRoles>("user")); Filters.Add(new ActivatingFilter<UserRoles>("User"));
OnLoaded<UserRoles>((context, userRoles) => { OnLoaded<UserRoles>((context, userRoles) => {
userRoles.Roles = _userRolesRepository userRoles.Roles = _userRolesRepository
.Fetch(x => x.UserId == context.ContentItem.Id) .Fetch(x => x.UserId == context.ContentItem.Id)

View File

@@ -7,7 +7,7 @@ using Orchard.Security;
namespace Orchard.Roles.Models { namespace Orchard.Roles.Models {
public static class UserSimulation { public static class UserSimulation {
public static IUser Create(string role) { public static IUser Create(string role) {
var simulationType = new ContentTypeDefinitionBuilder().Named("user").Build(); var simulationType = new ContentTypeDefinitionBuilder().Named("User").Build();
var simulation = new ContentItemBuilder(simulationType) var simulation = new ContentItemBuilder(simulationType)
.Weld<SimulatedUser>() .Weld<SimulatedUser>()
.Weld<SimulatedUserRoles>() .Weld<SimulatedUserRoles>()

View File

@@ -10,7 +10,7 @@ namespace Orchard.Sandbox.Drivers {
[UsedImplicitly] [UsedImplicitly]
public class SandboxPageDriver : ContentItemDriver<SandboxPage> { public class SandboxPageDriver : ContentItemDriver<SandboxPage> {
public readonly static ContentType ContentType = new ContentType { public readonly static ContentType ContentType = new ContentType {
Name = "sandboxpage", Name = "SandboxPage",
DisplayName = "Sandbox Page" DisplayName = "Sandbox Page"
}; };

View File

@@ -10,7 +10,7 @@ namespace Orchard.Sandbox.Handlers {
[UsedImplicitly] [UsedImplicitly]
public class SandboxContentHandler : ContentHandler { public class SandboxContentHandler : ContentHandler {
public SandboxContentHandler(IRepository<SandboxPageRecord> pageRepository, IRepository<SandboxSettingsRecord> settingsRepository) { public SandboxContentHandler(IRepository<SandboxPageRecord> pageRepository, IRepository<SandboxSettingsRecord> settingsRepository) {
// define the "sandboxpage" content type // define the "SandboxPage" content type
Filters.Add(new ActivatingFilter<SandboxPage>(SandboxPageDriver.ContentType.Name)); Filters.Add(new ActivatingFilter<SandboxPage>(SandboxPageDriver.ContentType.Name));
Filters.Add(new ActivatingFilter<CommonAspect>(SandboxPageDriver.ContentType.Name)); Filters.Add(new ActivatingFilter<CommonAspect>(SandboxPageDriver.ContentType.Name));
Filters.Add(new ActivatingFilter<RoutableAspect>(SandboxPageDriver.ContentType.Name)); Filters.Add(new ActivatingFilter<RoutableAspect>(SandboxPageDriver.ContentType.Name));
@@ -18,7 +18,7 @@ namespace Orchard.Sandbox.Handlers {
Filters.Add(StorageFilter.For(pageRepository) ); Filters.Add(StorageFilter.For(pageRepository) );
// add settings to site, and simple record-template gui // add settings to site, and simple record-template gui
Filters.Add(new ActivatingFilter<ContentPart<SandboxSettingsRecord>>("site")); Filters.Add(new ActivatingFilter<ContentPart<SandboxSettingsRecord>>("Site"));
Filters.Add(StorageFilter.For(settingsRepository)); Filters.Add(StorageFilter.For(settingsRepository));
Filters.Add(new TemplateFilterForRecord<SandboxSettingsRecord>("SandboxSettings", "Parts/Sandbox.SiteSettings")); Filters.Add(new TemplateFilterForRecord<SandboxSettingsRecord>("SandboxSettings", "Parts/Sandbox.SiteSettings"));
} }

View File

@@ -7,7 +7,7 @@ namespace Orchard.Search.Handlers {
[UsedImplicitly] [UsedImplicitly]
public class SearchSettingsHandler : ContentHandler { public class SearchSettingsHandler : ContentHandler {
public SearchSettingsHandler(IRepository<SearchSettingsRecord> repository) { public SearchSettingsHandler(IRepository<SearchSettingsRecord> repository) {
Filters.Add(new ActivatingFilter<SearchSettings>("site")); Filters.Add(new ActivatingFilter<SearchSettings>("Site"));
Filters.Add(StorageFilter.For(repository)); Filters.Add(StorageFilter.For(repository));
Filters.Add(new TemplateFilterForRecord<SearchSettingsRecord>("CommentSettings", "Parts/Search.SiteSettings")); Filters.Add(new TemplateFilterForRecord<SearchSettingsRecord>("CommentSettings", "Parts/Search.SiteSettings"));
} }

View File

@@ -147,12 +147,12 @@ namespace Orchard.Setup.Services {
//hackInstallationGenerator.GenerateInstallEvents(); //hackInstallationGenerator.GenerateInstallEvents();
var contentDefinitionManager = environment.Resolve<IContentDefinitionManager>(); var contentDefinitionManager = environment.Resolve<IContentDefinitionManager>();
contentDefinitionManager.AlterTypeDefinition("blogpost", cfg => cfg.Named("blogpost", "Blog Post").WithPart("HasComments").WithPart("HasTags").WithPart("Localized")); contentDefinitionManager.AlterTypeDefinition("BlogPost", cfg => cfg.DisplayedAs("Blog Post").WithPart("HasComments").WithPart("HasTags").WithPart("Localized"));
contentDefinitionManager.AlterTypeDefinition("page", cfg => cfg.Named("page", "Page").WithPart("HasComments").WithPart("HasTags").WithPart("Localized")); contentDefinitionManager.AlterTypeDefinition("Page", cfg => cfg.DisplayedAs("Page").WithPart("HasComments").WithPart("HasTags").WithPart("Localized"));
contentDefinitionManager.AlterTypeDefinition("sandboxpage", cfg => cfg.Named("sandboxpage", "Sandbox Page").WithPart("HasComments").WithPart("HasTags").WithPart("Localized")); contentDefinitionManager.AlterTypeDefinition("SandboxPage", cfg => cfg.DisplayedAs("Sandbox Page").WithPart("HasComments").WithPart("HasTags").WithPart("Localized"));
// create home page as a CMS page // create home page as a CMS page
var page = contentManager.Create("page", VersionOptions.Draft); var page = contentManager.Create("Page", VersionOptions.Draft);
page.As<BodyAspect>().Text = "<p>Welcome to Orchard!</p><p>Congratulations, you've successfully set-up your Orchard site.</p><p>This is the home page of your new site. We've taken the liberty to write here about a few things you could look at next in order to get familiar with the application. Once you feel confident you don't need this anymore, just click <a href=\"Admin/Pages/Edit/3\">Edit</a> to go into edit mode and replace this with whatever you want on your home page to make it your own.</p><p>One thing you could do (but you don't have to) is go into <a href=\"Admin/Settings\">Manage Settings</a> (follow the <a href=\"Admin\">Admin</a> link and then look for it under \"Settings\" in the menu on the left) and check that everything is configured the way you want.</p><p>You probably want to make the site your own. One of the ways you can do that is by clicking <a href=\"Admin/Themes\">Manage Themes</a> in the admin menu. A theme is a packaged look and feel that affects the whole site.</p><p>Next, you can start playing with the content types that we installed. For example, go ahead and click <a href=\"Admin/Pages/Create\">Add New Page</a> in the admin menu and create an \"about\" page. Then, add it to the navigation menu by going to <a href=\"Admin/Navigation\">Manage Menu</a>. You can also click <a href=\"Admin/Blogs/Create\">Add New Blog</a> and start posting by clicking \"Add New Post\".</p><p>Finally, Orchard has been designed to be extended. It comes with a few built-in modules such as pages and blogs or themes. You can install new themes by going to <a href=\"Admin/Themes\">Manage Themes</a> and clicking <a href=\"Admin/Themes/Install\">Install a new Theme</a>. Like for themes, modules are created by other users of Orchard just like you so if you feel up to it, please <a href=\"http://www.orchardproject.net/\">consider participating</a>.</p><p>--The Orchard Crew</p>"; page.As<BodyAspect>().Text = "<p>Welcome to Orchard!</p><p>Congratulations, you've successfully set-up your Orchard site.</p><p>This is the home page of your new site. We've taken the liberty to write here about a few things you could look at next in order to get familiar with the application. Once you feel confident you don't need this anymore, just click <a href=\"Admin/Pages/Edit/3\">Edit</a> to go into edit mode and replace this with whatever you want on your home page to make it your own.</p><p>One thing you could do (but you don't have to) is go into <a href=\"Admin/Settings\">Manage Settings</a> (follow the <a href=\"Admin\">Admin</a> link and then look for it under \"Settings\" in the menu on the left) and check that everything is configured the way you want.</p><p>You probably want to make the site your own. One of the ways you can do that is by clicking <a href=\"Admin/Themes\">Manage Themes</a> in the admin menu. A theme is a packaged look and feel that affects the whole site.</p><p>Next, you can start playing with the content types that we installed. For example, go ahead and click <a href=\"Admin/Pages/Create\">Add New Page</a> in the admin menu and create an \"about\" page. Then, add it to the navigation menu by going to <a href=\"Admin/Navigation\">Manage Menu</a>. You can also click <a href=\"Admin/Blogs/Create\">Add New Blog</a> and start posting by clicking \"Add New Post\".</p><p>Finally, Orchard has been designed to be extended. It comes with a few built-in modules such as pages and blogs or themes. You can install new themes by going to <a href=\"Admin/Themes\">Manage Themes</a> and clicking <a href=\"Admin/Themes/Install\">Install a new Theme</a>. Like for themes, modules are created by other users of Orchard just like you so if you feel up to it, please <a href=\"http://www.orchardproject.net/\">consider participating</a>.</p><p>--The Orchard Crew</p>";
page.As<RoutableAspect>().Slug = "home"; page.As<RoutableAspect>().Slug = "home";
page.As<RoutableAspect>().Title = T("Home").ToString(); page.As<RoutableAspect>().Title = T("Home").ToString();
@@ -164,7 +164,7 @@ namespace Orchard.Setup.Services {
siteSettings.Record.HomePage = "PageHomePageProvider;" + page.Id; siteSettings.Record.HomePage = "PageHomePageProvider;" + page.Id;
// add a menu item for the shiny new home page // add a menu item for the shiny new home page
var menuItem = contentManager.Create("menuitem"); var menuItem = contentManager.Create("MenuItem");
menuItem.As<MenuPart>().MenuPosition = "1"; menuItem.As<MenuPart>().MenuPosition = "1";
menuItem.As<MenuPart>().MenuText = T("Home").ToString(); menuItem.As<MenuPart>().MenuText = T("Home").ToString();
menuItem.As<MenuPart>().OnMainMenu = true; menuItem.As<MenuPart>().OnMainMenu = true;

View File

@@ -91,7 +91,7 @@ namespace Orchard.Setup {
class SafeModeSiteService : ISiteService { class SafeModeSiteService : ISiteService {
public ISite GetSiteSettings() { public ISite GetSiteSettings() {
var siteType = new ContentTypeDefinitionBuilder().Named("site").Build(); var siteType = new ContentTypeDefinitionBuilder().Named("Site").Build();
var site = new ContentItemBuilder(siteType) var site = new ContentItemBuilder(siteType)
.Weld<SafeModeSite>() .Weld<SafeModeSite>()
.Build(); .Build();

View File

@@ -7,7 +7,7 @@ namespace Orchard.Themes.Handlers {
[UsedImplicitly] [UsedImplicitly]
public class ThemeSiteSettingsHandler : ContentHandler { public class ThemeSiteSettingsHandler : ContentHandler {
public ThemeSiteSettingsHandler(IRepository<ThemeSiteSettingsRecord> repository) { public ThemeSiteSettingsHandler(IRepository<ThemeSiteSettingsRecord> repository) {
Filters.Add(new ActivatingFilter<ThemeSiteSettings>("site")); Filters.Add(new ActivatingFilter<ThemeSiteSettings>("Site"));
Filters.Add(StorageFilter.For(repository)); Filters.Add(StorageFilter.For(repository));
} }
} }

View File

@@ -8,7 +8,7 @@ namespace Orchard.Users.Drivers {
[UsedImplicitly] [UsedImplicitly]
public class UserDriver : ContentItemDriver<User> { public class UserDriver : ContentItemDriver<User> {
public readonly static ContentType ContentType = new ContentType { public readonly static ContentType ContentType = new ContentType {
Name = "user", Name = "User",
DisplayName = "User Profile" DisplayName = "User Profile"
}; };

View File

@@ -35,9 +35,13 @@ namespace Orchard.ContentManagement.MetaData.Builders {
return new ContentTypeDefinition(_name, _displayName, _parts, _settings); return new ContentTypeDefinition(_name, _displayName, _parts, _settings);
} }
public ContentTypeDefinitionBuilder Named(string name, string displayName = null) { public ContentTypeDefinitionBuilder Named(string name) {
_name = name; _name = name;
_displayName = displayName ?? name; return this;
}
public ContentTypeDefinitionBuilder DisplayedAs(string displayName ) {
_displayName = displayName;
return this; return this;
} }

View File

@@ -2,7 +2,7 @@ using Orchard.ContentManagement;
namespace Orchard.Security { namespace Orchard.Security {
/// <summary> /// <summary>
/// Interface provided by the "user" model. /// Interface provided by the "User" model.
/// </summary> /// </summary>
public interface IUser : IContent { public interface IUser : IContent {
int Id { get; } int Id { get; }