From 279d9ce1842a61456e0e2f10bfda6a229ccd452c Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Fri, 1 Jul 2022 18:24:32 -0700 Subject: [PATCH 1/6] Move all module settings to Configuration > Settings --- .../OrchardCore.Admin/AdminMenu.cs | 3 +- .../Navigation/AuditTrailSettingsAdminMenu.cs | 5 +- .../OrchardCore.Cors/AdminMenu.cs | 17 +-- .../OrchardCore.CustomSettings/AdminMenu.cs | 4 +- .../OrchardCore.Email/AdminMenu.cs | 14 ++- .../OrchardCore.Facebook/AdminMenu.cs | 19 ++-- .../OrchardCore.Google/AdminMenu.cs | 46 +++++--- .../OrchardCore.Https/AdminMenu.cs | 17 +-- .../OrchardCore.Layers/AdminMenu.cs | 18 +-- .../OrchardCore.Localization/AdminMenu.cs | 28 ++--- .../OrchardCore.Lucene/AdminMenu.cs | 11 +- .../OrchardCore.OpenId/AdminMenu.cs | 107 ++++++++++-------- .../OrchardCore.ReCaptcha/AdminMenu.cs | 12 +- .../OrchardCore.ReverseProxy/AdminMenu.cs | 24 ++-- .../OrchardCore.Security/AdminMenu.cs | 19 +++- .../OrchardCore.Settings/AdminMenu.cs | 2 +- .../OrchardCore.Taxonomies/AdminMenu.cs | 9 +- .../OrchardCore.Twitter/AdminMenu.cs | 20 ++-- .../OrchardCore.Users/AdminMenu.cs | 75 +++++++----- 19 files changed, 270 insertions(+), 180 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.Admin/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Admin/AdminMenu.cs index 751f6d18905..89ad4157637 100644 --- a/src/OrchardCore.Modules/OrchardCore.Admin/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Admin/AdminMenu.cs @@ -31,7 +31,8 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Permission(PermissionsAdminSettings.ManageAdminSettings) .LocalNav() ) - )); + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailSettingsAdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailSettingsAdminMenu.cs index 7da292f7f83..a5bc0883c26 100644 --- a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailSettingsAdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailSettingsAdminMenu.cs @@ -29,7 +29,10 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .AddClass("audittrail").Id("audittrailSettings") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = AuditTrailSettingsGroup.Id }) .Permission(AuditTrailPermissions.ManageAuditTrailSettings) - .LocalNav()))); + .LocalNav() + ) + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Cors/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Cors/AdminMenu.cs index a15f77f223a..16b6c7d17a1 100644 --- a/src/OrchardCore.Modules/OrchardCore.Cors/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Cors/AdminMenu.cs @@ -22,14 +22,17 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Configuration"], configuration => configuration + .Add(S["Configuration"], design => design .Add(S["Settings"], settings => settings - .Add(S["CORS"], S["CORS"].PrefixPosition(), entry => entry - .AddClass("cors").Id("cors") - .Action("Index", "Admin", new { area = "OrchardCore.Cors" }) - .Permission(Permissions.ManageCorsSettings) - .LocalNav() - )) + .Add(S["Security"], security => security.Id("security") + .Add(S["CORS"], S["CORS"].PrefixPosition(), entry => entry + .AddClass("cors").Id("cors") + .Action("Index", "Admin", new { area = "OrchardCore.Cors" }) + .Permission(Permissions.ManageCorsSettings) + .LocalNav() + ) + ) + ) ); return Task.CompletedTask; diff --git a/src/OrchardCore.Modules/OrchardCore.CustomSettings/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.CustomSettings/AdminMenu.cs index 030b485ccf3..2777820af03 100644 --- a/src/OrchardCore.Modules/OrchardCore.CustomSettings/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.CustomSettings/AdminMenu.cs @@ -36,7 +36,9 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Permission(Permissions.CreatePermissionForType(type)) .Resource(type.Name) .LocalNav() - ))); + ) + ) + ); } return Task.CompletedTask; diff --git a/src/OrchardCore.Modules/OrchardCore.Email/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Email/AdminMenu.cs index 5666e724a1b..7223268bde5 100644 --- a/src/OrchardCore.Modules/OrchardCore.Email/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Email/AdminMenu.cs @@ -18,17 +18,21 @@ public AdminMenu(IStringLocalizer localizer) public Task BuildNavigationAsync(string name, NavigationBuilder builder) { if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) + { return Task.CompletedTask; + } builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Email"], S["Email"].PrefixPosition(), entry => entry - .AddClass("email").Id("email") - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = SmtpSettingsDisplayDriver.GroupId }) - .Permission(Permissions.ManageEmailSettings) - .LocalNav() - ))); + .AddClass("email").Id("email") + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = SmtpSettingsDisplayDriver.GroupId }) + .Permission(Permissions.ManageEmailSettings) + .LocalNav() + ) + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs index e993e4bc0a6..8cb33015293 100644 --- a/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs @@ -22,18 +22,23 @@ public AdminMenu( public Task BuildNavigationAsync(string name, NavigationBuilder builder) { - if (String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) + if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { - builder.Add(S["Configuration"], configuration => configuration - .Add(S["Settings"], settings => settings - .Add(S["Facebook App"], S["Facebook App"].PrefixPosition(), settings => settings + return Task.CompletedTask; + } + + builder + .Add(S["Configuration"], configuration => configuration + .Add(S["Settings"], settings => settings + .Add(S["Facebook App"], S["Facebook App"].PrefixPosition(), settings => settings .AddClass("facebookApp").Id("facebookApp") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = FacebookConstants.Features.Core }) .Permission(Permissions.ManageFacebookApp) - .LocalNav()) + .LocalNav() ) - ); - } + ) + ); + return Task.CompletedTask; } } diff --git a/src/OrchardCore.Modules/OrchardCore.Google/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Google/AdminMenu.cs index 87f659418c6..d9e7a635d80 100644 --- a/src/OrchardCore.Modules/OrchardCore.Google/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Google/AdminMenu.cs @@ -45,18 +45,23 @@ public GoogleAnalyticsAdminMenu(IStringLocalizer local public Task BuildNavigationAsync(string name, NavigationBuilder builder) { - if (String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) + if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { - builder.Add(S["Configuration"], configuration => configuration - .Add(S["Settings"], settings => settings - .Add(S["Google Analytics"], S["Google Analytics"].PrefixPosition(), settings => settings + return Task.CompletedTask; + } + + builder + .Add(S["Configuration"], configuration => configuration + .Add(S["Settings"], settings => settings + .Add(S["Google Analytics"], S["Google Analytics"].PrefixPosition(), settings => settings .AddClass("googleAnalytics").Id("googleAnalytics") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = GoogleConstants.Features.GoogleAnalytics }) - .Permission(Permissions.ManageGoogleAnalytics) - .LocalNav()) - ) - ); - } + .Permission(Permissions.ManageGoogleAnalytics) + .LocalNav() + ) + ) + ); + return Task.CompletedTask; } } @@ -73,18 +78,23 @@ public GoogleTagManagerAdminMenu(IStringLocalizer loc public Task BuildNavigationAsync(string name, NavigationBuilder builder) { - if (String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) + if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { - builder.Add(S["Configuration"], configuration => configuration - .Add(S["Settings"], settings => settings - .Add(S["Google Tag Manager"], S["Google Tag Manager"].PrefixPosition(), settings => settings + return Task.CompletedTask; + } + + builder + .Add(S["Configuration"], configuration => configuration + .Add(S["Settings"], settings => settings.Id("settings") + .Add(S["Google Tag Manager"], S["Google Tag Manager"].PrefixPosition(), settings => settings .AddClass("googleTagManager").Id("googleTagManager") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = GoogleConstants.Features.GoogleTagManager }) - .Permission(Permissions.ManageGoogleTagManager) - .LocalNav()) - ) - ); - } + .Permission(Permissions.ManageGoogleTagManager) + .LocalNav() + ) + ) + ); + return Task.CompletedTask; } } diff --git a/src/OrchardCore.Modules/OrchardCore.Https/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Https/AdminMenu.cs index a531a3bea33..345637eac6c 100644 --- a/src/OrchardCore.Modules/OrchardCore.Https/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Https/AdminMenu.cs @@ -22,13 +22,16 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Security"], security => security - .Add(S["Settings"], settings => settings - .Add(S["HTTPS"], S["HTTPS"].PrefixPosition(), entry => entry - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "Https" }) - .Permission(Permissions.ManageHttps) - .LocalNav() - )) + .Add(S["Configuration"], design => design + .Add(S["Settings"], settings => settings.Id("settings") + .Add(S["Security"], security => security.Id("security") + .Add(S["HTTPS"], S["HTTPS"].PrefixPosition(), entry => entry + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "Https" }) + .Permission(Permissions.ManageHttps) + .LocalNav() + ) + ) + ) ); return Task.CompletedTask; diff --git a/src/OrchardCore.Modules/OrchardCore.Layers/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Layers/AdminMenu.cs index 8a9561f7931..7fe56c2113b 100644 --- a/src/OrchardCore.Modules/OrchardCore.Layers/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Layers/AdminMenu.cs @@ -24,17 +24,21 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Design"], design => design - .Add(S["Settings"], settings => settings - .Add(S["Zones"], S["Zones"].PrefixPosition(), zones => zones - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = LayerSiteSettingsDisplayDriver.GroupId }) - .Permission(Permissions.ManageLayers) - .LocalNav() - )) .Add(S["Widgets"], S["Widgets"].PrefixPosition(), widgets => widgets .Permission(Permissions.ManageLayers) .Action("Index", "Admin", new { area = "OrchardCore.Layers" }) .LocalNav() - )); + ) + ) + .Add(S["Configuration"], design => design + .Add(S["Settings"], settings => settings.Id("settings") + .Add(S["Zones"], S["Zones"].PrefixPosition(), zones => zones + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = LayerSiteSettingsDisplayDriver.GroupId }) + .Permission(Permissions.ManageLayers) + .LocalNav() + ) + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Localization/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Localization/AdminMenu.cs index 4c51b1ee2d3..e4bf417439a 100644 --- a/src/OrchardCore.Modules/OrchardCore.Localization/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Localization/AdminMenu.cs @@ -27,21 +27,23 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) { if (String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { - builder - .Add(S["Configuration"], NavigationConstants.AdminMenuConfigurationPosition, localization => localization - .Add(S["Settings"], settings => settings - .Add(S["Localization"], localization => localization - .AddClass("localization").Id("localization") - .Add(S["Cultures"], S["Cultures"].PrefixPosition(), entry => entry - .AddClass("cultures").Id("cultures") - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = LocalizationSettingsDisplayDriver.GroupId }) - .Permission(Permissions.ManageCultures) - .LocalNav() - ) + return Task.CompletedTask; + } + + builder + .Add(S["Configuration"], NavigationConstants.AdminMenuConfigurationPosition, localization => localization + .Add(S["Settings"], settings => settings + .Add(S["Localization"], localization => localization + .AddClass("localization").Id("localization") + .Add(S["Cultures"], S["Cultures"].PrefixPosition(), entry => entry + .AddClass("cultures").Id("cultures") + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = LocalizationSettingsDisplayDriver.GroupId }) + .Permission(Permissions.ManageCultures) + .LocalNav() ) ) - ); - } + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs index d9ad832171d..a734f40e70b 100644 --- a/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs @@ -29,17 +29,22 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Lucene Indices"], S["Lucene Indices"].PrefixPosition(), indexes => indexes .Action("Index", "Admin", new { area = "OrchardCore.Lucene" }) .Permission(Permissions.ManageIndexes) - .LocalNav()) + .LocalNav() + ) .Add(S["Run Lucene Query"], S["Run Lucene Query"].PrefixPosition(), queries => queries .Action("Query", "Admin", new { area = "OrchardCore.Lucene" }) .Permission(Permissions.ManageIndexes) - .LocalNav())) + .LocalNav() + ) + ) .Add(S["Settings"], settings => settings .Add(S["Search"], S["Search"].PrefixPosition(), entry => entry .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = LuceneSettingsDisplayDriver.GroupId }) .Permission(Permissions.ManageIndexes) .LocalNav() - ))); + ) + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.OpenId/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.OpenId/AdminMenu.cs index b1b349e4783..1ece7699fbf 100644 --- a/src/OrchardCore.Modules/OrchardCore.OpenId/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.OpenId/AdminMenu.cs @@ -28,60 +28,69 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) return Task.CompletedTask; } - builder.Add(S["Security"], security => security - .Add(S["OpenID Connect"], S["OpenID Connect"].PrefixPosition(), category => - { - category.AddClass("openid").Id("openid"); + builder + .Add(S["Configuration"], design => design + .Add(S["Settings"], settings => settings + .Add(S["Security"], security => security + .Add(S["OpenID Connect"], S["OpenID Connect"].PrefixPosition(), category => + { + category.AddClass("openid").Id("openid"); + + var features = _shellDescriptor.Features.Select(feature => feature.Id).ToImmutableArray(); + if (features.Contains(OpenIdConstants.Features.Client) || + features.Contains(OpenIdConstants.Features.Server) || + features.Contains(OpenIdConstants.Features.Validation)) + { - var features = _shellDescriptor.Features.Select(feature => feature.Id).ToImmutableArray(); - if (features.Contains(OpenIdConstants.Features.Client) || - features.Contains(OpenIdConstants.Features.Server) || - features.Contains(OpenIdConstants.Features.Validation)) - { - category.Add(S["Settings"], "1", settings => - { - if (features.Contains(OpenIdConstants.Features.Client)) - { - settings.Add(S["Authentication client"], "1", client => client - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "OrchardCore.OpenId.Client" }) - .Permission(Permissions.ManageClientSettings) - .LocalNav()); - } + if (features.Contains(OpenIdConstants.Features.Client)) + { + category.Add(S["Authentication client"], "1", client => client + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "OrchardCore.OpenId.Client" }) + .Permission(Permissions.ManageClientSettings) + .LocalNav() + ); + } - if (features.Contains(OpenIdConstants.Features.Server)) - { - settings.Add(S["Authorization server"], "2", server => server - .Action("Index", "ServerConfiguration", "OrchardCore.OpenId") - .Permission(Permissions.ManageServerSettings) - .LocalNav()); - } + if (features.Contains(OpenIdConstants.Features.Server)) + { + category.Add(S["Authorization server"], "2", server => server + .Action("Index", "ServerConfiguration", "OrchardCore.OpenId") + .Permission(Permissions.ManageServerSettings) + .LocalNav() + ); + } - if (features.Contains(OpenIdConstants.Features.Validation)) - { - settings.Add(S["Token validation"], "3", validation => validation - .Action("Index", "ValidationConfiguration", "OrchardCore.OpenId") - .Permission(Permissions.ManageValidationSettings) - .LocalNav()); - } - }); - } + if (features.Contains(OpenIdConstants.Features.Validation)) + { + category.Add(S["Token validation"], "3", validation => validation + .Action("Index", "ValidationConfiguration", "OrchardCore.OpenId") + .Permission(Permissions.ManageValidationSettings) + .LocalNav() + ); + } + } - if (features.Contains(OpenIdConstants.Features.Management)) - { - category.Add(S["Management"], "2", management => - { - management.Add(S["Applications"], "1", applications => applications - .Action("Index", "Application", "OrchardCore.OpenId") - .Permission(Permissions.ManageApplications) - .LocalNav()); + if (features.Contains(OpenIdConstants.Features.Management)) + { + category.Add(S["Management"], "2", management => + { + management.Add(S["Applications"], "1", applications => applications + .Action("Index", "Application", "OrchardCore.OpenId") + .Permission(Permissions.ManageApplications) + .LocalNav() + ); - management.Add(S["Scopes"], "2", applications => applications - .Action("Index", "Scope", "OrchardCore.OpenId") - .Permission(Permissions.ManageScopes) - .LocalNav()); - }); - } - })); + management.Add(S["Scopes"], "2", applications => applications + .Action("Index", "Scope", "OrchardCore.OpenId") + .Permission(Permissions.ManageScopes) + .LocalNav() + ); + }); + } + }) + ) + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.ReCaptcha/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.ReCaptcha/AdminMenu.cs index 239b1583e02..412f9717d3f 100644 --- a/src/OrchardCore.Modules/OrchardCore.ReCaptcha/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.ReCaptcha/AdminMenu.cs @@ -23,13 +23,17 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Security"], security => security - .Add(S["Settings"], settings => settings - .Add(S["reCaptcha"], S["reCaptcha"].PrefixPosition(), registration => registration + .Add(S["Configuration"], design => design + .Add(S["Settings"], settings => settings.Id("settings") + .Add(S["Security"], security => security.Id("security") + .Add(S["reCaptcha"], S["reCaptcha"].PrefixPosition(), registration => registration .Permission(Permissions.ManageReCaptchaSettings) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ReCaptchaSettingsDisplayDriver.GroupId }) .LocalNav() - ))); + ) + ) + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs index e729c06cc0a..e780a5df4e4 100644 --- a/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs @@ -16,20 +16,22 @@ public AdminMenu(IStringLocalizer localizer) public Task BuildNavigationAsync(string name, NavigationBuilder builder) { - if (String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) + if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { - builder - .Add(S["Configuration"], configuration => configuration - .Add(S["Settings"], settings => settings - .Add(S["Reverse Proxy"], S["Reverse Proxy"].PrefixPosition(), entry => entry + return Task.CompletedTask; + } + + builder + .Add(S["Configuration"], configuration => configuration + .Add(S["Settings"], settings => settings + .Add(S["Reverse Proxy"], S["Reverse Proxy"].PrefixPosition(), entry => entry .AddClass("reverseproxy").Id("reverseproxy") - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "ReverseProxy" }) - .Permission(Permissions.ManageReverseProxySettings) - .LocalNav() - ) + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "ReverseProxy" }) + .Permission(Permissions.ManageReverseProxySettings) + .LocalNav() ) - ); - } + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs index 9f29e1cef98..cde2bb2f28d 100644 --- a/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs @@ -17,16 +17,23 @@ public AdminMenu(IStringLocalizer localizer) public Task BuildNavigationAsync(string name, NavigationBuilder builder) { - if (String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) + if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { - builder.Add(S["Security"], NavigationConstants.AdminMenuSecurityPosition, security => security - .AddClass("security").Id("security") - .Add(S["Settings"], settings => settings + return Task.CompletedTask; + } + + builder + .Add(S["Configuration"], design => design + .Add(S["Settings"], settings => settings + .Add(S["Security"], security => security.Id("security") .Add(S["Security Headers"], S["Security Headers"].PrefixPosition(), headers => headers .Permission(SecurityPermissions.ManageSecurityHeadersSettings) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = SecuritySettingsDisplayDriver.SettingsGroupId }) - .LocalNav()))); - } + .LocalNav() + ) + ) + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Settings/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Settings/AdminMenu.cs index 3fffbf6d711..822c9775062 100644 --- a/src/OrchardCore.Modules/OrchardCore.Settings/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Settings/AdminMenu.cs @@ -24,7 +24,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder.Add(S["Configuration"], configuration => configuration .Add(S["Settings"], "1", settings => settings .Add(S["General"], "1", entry => entry - .AddClass("general").Id("general") + .AddClass("general").Id("general") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "general" }) .Permission(Permissions.ManageGroupSettings) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs index fd49393ba4b..b72e8a6dd31 100644 --- a/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs @@ -22,14 +22,17 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) return Task.CompletedTask; } - builder.Add(S["Configuration"], configuration => configuration + builder + .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], "1", settings => settings .Add(S["Taxonomy Filters"], S["Taxonomy Filters"].PrefixPosition(), admt => admt - .AddClass("taxonomyfilters").Id("taxonomyfilters") + .AddClass("taxonomyfilters").Id("taxonomyfilters") .Permission(Permissions.ManageTaxonomies) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = TaxonomyContentsAdminListSettingsDisplayDriver.GroupId }) .LocalNav() - ))); + ) + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Twitter/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Twitter/AdminMenu.cs index cf3616820d3..ba19c48e88d 100644 --- a/src/OrchardCore.Modules/OrchardCore.Twitter/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Twitter/AdminMenu.cs @@ -45,17 +45,23 @@ public AdminMenu(IStringLocalizer localizer) public Task BuildNavigationAsync(string name, NavigationBuilder builder) { - if (String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) + if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { - builder.Add(S["Configuration"], configuration => configuration - .Add(S["Settings"], settings => settings - .Add(S["Twitter"], S["Twitter"].PrefixPosition(), settings => settings + return Task.CompletedTask; + } + + builder + .Add(S["Configuration"], configuration => configuration + .Add(S["Settings"], settings => settings + .Add(S["Twitter"], S["Twitter"].PrefixPosition(), settings => settings .AddClass("twitter").Id("twitter") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = TwitterConstants.Features.Twitter }) .Permission(Permissions.ManageTwitter) - .LocalNav()) - )); - } + .LocalNav() + ) + ) + ); + return Task.CompletedTask; } } diff --git a/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs index bc590dfebd7..439ad3d7b0b 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs @@ -24,23 +24,28 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) return Task.CompletedTask; } - builder.Add(S["Security"], NavigationConstants.AdminMenuSecurityPosition, security => security + builder + .Add(S["Security"], NavigationConstants.AdminMenuSecurityPosition, security => security .AddClass("security").Id("security") - .Add(S["Users"], S["Users"].PrefixPosition(), users => users - .AddClass("users").Id("users") - .Action("Index", "Admin", "OrchardCore.Users") - .Permission(Permissions.ViewUsers) - .Resource(new User()) - .LocalNav() - ) - .Add(S["Settings"], settings => settings + .Add(S["Users"], S["Users"].PrefixPosition(), users => users + .AddClass("users").Id("users") + .Action("Index", "Admin", "OrchardCore.Users") + .Permission(Permissions.ViewUsers) + .Resource(new User()) + .LocalNav() + ) + ) + .Add(S["Configuration"], design => design + .Add(S["Settings"], settings => settings + .Add(S["Security"], security => security.Id("security") .Add(S["User Login"], S["User Login"].PrefixPosition(), login => login .Permission(Permissions.ManageUsers) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = LoginSettingsDisplayDriver.GroupId }) .LocalNav() - ) ) - ); + ) + ) + ); return Task.CompletedTask; } @@ -64,13 +69,17 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Security"], security => security + .Add(S["Configuration"], design => design .Add(S["Settings"], settings => settings - .Add(S["User Change email"], S["User Change email"].PrefixPosition(), registration => registration - .Permission(Permissions.ManageUsers) - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ChangeEmailSettingsDisplayDriver.GroupId }) - .LocalNav() - ))); + .Add(S["Security"], security => security.Id("security") + .Add(S["User Change email"], S["User Change email"].PrefixPosition(), registration => registration + .Permission(Permissions.ManageUsers) + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ChangeEmailSettingsDisplayDriver.GroupId }) + .LocalNav() + ) + ) + ) + ); return Task.CompletedTask; } @@ -94,13 +103,17 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Security"], security => security + .Add(S["Configuration"], design => design .Add(S["Settings"], settings => settings - .Add(S["User Registration"], S["User Registration"].PrefixPosition(), registration => registration - .Permission(Permissions.ManageUsers) - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = RegistrationSettingsDisplayDriver.GroupId }) - .LocalNav() - ))); + .Add(S["Security"], security => security.Id("security") + .Add(S["User Registration"], S["User Registration"].PrefixPosition(), registration => registration + .Permission(Permissions.ManageUsers) + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = RegistrationSettingsDisplayDriver.GroupId }) + .LocalNav() + ) + ) + ) + ); return Task.CompletedTask; } @@ -124,13 +137,17 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Security"], security => security + .Add(S["Configuration"], design => design .Add(S["Settings"], settings => settings - .Add(S["User Reset password"], S["User Reset password"].PrefixPosition(), password => password - .Permission(Permissions.ManageUsers) - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ResetPasswordSettingsDisplayDriver.GroupId }) - .LocalNav() - ))); + .Add(S["Security"], security => security.Id("security") + .Add(S["User Reset password"], S["User Reset password"].PrefixPosition(), password => password + .Permission(Permissions.ManageUsers) + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ResetPasswordSettingsDisplayDriver.GroupId }) + .LocalNav() + ) + ) + ) + ); return Task.CompletedTask; } From ead6134f85190a4b92d0cd12b4810527796088bc Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Fri, 1 Jul 2022 22:29:10 -0700 Subject: [PATCH 2/6] Updating Menu formats to march the others --- .../OrchardCore.Admin/AdminMenu.cs | 2 +- .../OrchardCore.AdminMenu/AdminMenu.cs | 2 +- .../OrchardCore.Apis.GraphQL/AdminMenu.cs | 4 +-- .../AdminMenu.cs | 2 +- .../OrchardCore.ContentTypes/AdminMenu.cs | 26 ++++++++++------- .../OrchardCore.Cors/AdminMenu.cs | 4 +-- .../OrchardCore.Demo/AdminMenu.cs | 25 ++++++++++------ .../OrchardCore.Email/AdminMenu.cs | 2 +- .../OrchardCore.Features/AdminMenu.cs | 2 +- .../OrchardCore.GitHub/AdminMenu.cs | 22 +++++++++----- .../OrchardCore.Google/AdminMenu.cs | 2 +- .../OrchardCore.Https/AdminMenu.cs | 4 +-- .../OrchardCore.Layers/AdminMenu.cs | 2 +- .../OrchardCore.Localization/AdminMenu.cs | 6 ++-- .../OrchardCore.Lucene/AdminMenu.cs | 2 +- .../OrchardCore.Media.Azure/AdminMenu.cs | 17 ++++++----- .../OrchardCore.Media/AdminMenu.cs | 29 +++++++++++-------- .../OrchardCore.Menu/AdminMenu.cs | 6 ++-- .../AdminMenu.cs | 20 ++++++++----- .../OrchardCore.OpenId/AdminMenu.cs | 2 +- .../OrchardCore.Placements/AdminMenu.cs | 2 +- .../OrchardCore.Queries/AdminMenu.cs | 15 ++++++---- .../OrchardCore.ReCaptcha/AdminMenu.cs | 4 +-- .../OrchardCore.ReverseProxy/AdminMenu.cs | 2 +- .../OrchardCore.Roles/AdminMenu.cs | 16 +++++----- .../OrchardCore.Security/AdminMenu.cs | 2 +- .../OrchardCore.Sitemaps/AdminMenu.cs | 8 +++-- .../OrchardCore.Themes/AdminMenu.cs | 2 +- .../OrchardCore.Users/AdminMenu.cs | 2 +- .../OrchardCore.Workflows/AdminMenu.cs | 8 +++-- 30 files changed, 142 insertions(+), 100 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.Admin/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Admin/AdminMenu.cs index 89ad4157637..3ebcf8fd6df 100644 --- a/src/OrchardCore.Modules/OrchardCore.Admin/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Admin/AdminMenu.cs @@ -23,7 +23,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Configuration"], design => design + .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Admin"], S["Admin"].PrefixPosition(), admin => admin .AddClass("admin").Id("admin") diff --git a/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs index fea93084ffd..a63e82e8e6a 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs @@ -27,7 +27,7 @@ public async Task BuildNavigationAsync(string name, NavigationBuilder builder) // Configuration and settings menus for the AdminMenu module builder.Add(S["Configuration"], configuration => configuration - .Add(S["Admin Menus"], S["Admin Menus"].PrefixPosition(), admt => admt + .Add(S["Admin Menus"], S["Admin Menus"].PrefixPosition(), admin => admin .Permission(Permissions.ManageAdminMenu) .Action("List", "Menu", new { area = "OrchardCore.AdminMenu" }) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Apis.GraphQL/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Apis.GraphQL/AdminMenu.cs index 08c0f4a2a3f..af57d70bbe4 100644 --- a/src/OrchardCore.Modules/OrchardCore.Apis.GraphQL/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Apis.GraphQL/AdminMenu.cs @@ -22,9 +22,9 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Configuration"], NavigationConstants.AdminMenuConfigurationPosition, design => design + .Add(S["Configuration"], NavigationConstants.AdminMenuConfigurationPosition, configuration => configuration .AddClass("menu-configuration").Id("configuration") - .Add(S["GraphiQL"], S["GraphiQL"].PrefixPosition(), deployment => deployment + .Add(S["GraphiQL"], S["GraphiQL"].PrefixPosition(), graphic => graphic .Action("Index", "Admin", new { area = "OrchardCore.Apis.GraphQL" }) .Permission(Permissions.ExecuteGraphQL) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs index bfcb06f967b..67c4fff5218 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs @@ -25,7 +25,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Configuration"], localization => localization + .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Localization"], localization => localization .Add(S["Content Request Culture Provider"], S["Content Request Culture Provider"].PrefixPosition(), registration => registration diff --git a/src/OrchardCore.Modules/OrchardCore.ContentTypes/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.ContentTypes/AdminMenu.cs index 69dcfe1ef63..e9f2c4c7eb6 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentTypes/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentTypes/AdminMenu.cs @@ -25,17 +25,21 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) var adminControllerName = typeof(AdminController).ControllerName(); - builder.Add(S["Content"], content => content - .Add(S["Content Definition"], S["Content Definition"].PrefixPosition("9"), contentDefinition => contentDefinition - .Add(S["Content Types"], S["Content Types"].PrefixPosition("1"), contentTypes => contentTypes - .Action(nameof(AdminController.List), adminControllerName, new { area = "OrchardCore.ContentTypes" }) - .Permission(Permissions.ViewContentTypes) - .LocalNav()) - .Add(S["Content Parts"], S["Content Parts"].PrefixPosition("2"), contentParts => contentParts - .Action(nameof(AdminController.ListParts), adminControllerName, new { area = "OrchardCore.ContentTypes" }) - .Permission(Permissions.ViewContentTypes) - .LocalNav()) - )); + builder + .Add(S["Content"], content => content + .Add(S["Content Definition"], S["Content Definition"].PrefixPosition("9"), contentDefinition => contentDefinition + .Add(S["Content Types"], S["Content Types"].PrefixPosition("1"), contentTypes => contentTypes + .Action(nameof(AdminController.List), adminControllerName, new { area = "OrchardCore.ContentTypes" }) + .Permission(Permissions.ViewContentTypes) + .LocalNav() + ) + .Add(S["Content Parts"], S["Content Parts"].PrefixPosition("2"), contentParts => contentParts + .Action(nameof(AdminController.ListParts), adminControllerName, new { area = "OrchardCore.ContentTypes" }) + .Permission(Permissions.ViewContentTypes) + .LocalNav() + ) + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Cors/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Cors/AdminMenu.cs index 16b6c7d17a1..91a9581c9a5 100644 --- a/src/OrchardCore.Modules/OrchardCore.Cors/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Cors/AdminMenu.cs @@ -22,10 +22,10 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Configuration"], design => design + .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Security"], security => security.Id("security") - .Add(S["CORS"], S["CORS"].PrefixPosition(), entry => entry + .Add(S["CORS"], S["CORS"].PrefixPosition(), cors => cors .AddClass("cors").Id("cors") .Action("Index", "Admin", new { area = "OrchardCore.Cors" }) .Permission(Permissions.ManageCorsSettings) diff --git a/src/OrchardCore.Modules/OrchardCore.Demo/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Demo/AdminMenu.cs index 0ef0390ff61..ad3fa4e7838 100644 --- a/src/OrchardCore.Modules/OrchardCore.Demo/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Demo/AdminMenu.cs @@ -26,26 +26,33 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .AddClass("demo").Id("demo") .Add(S["This Menu Item 1"], "0", item => item .Add(S["This is Menu Item 1.1"], subItem => subItem - .Action("Index", "Admin", new { area = "OrchardCore.Demo" })) + .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) + ) .Add(S["This is Menu Item 1.2"], subItem => subItem - .Action("Index", "Admin", new { area = "OrchardCore.Demo" })) + .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) + ) .Add(S["This is Menu Item 1.2"], subItem => subItem - .Action("Index", "Admin", new { area = "OrchardCore.Demo" })) + .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) + ) ) .Add(S["This Menu Item 2"], "0", item => item .Add(S["This is Menu Item 2.1"], subItem => subItem - .Action("Index", "Admin", new { area = "OrchardCore.Demo" })) + .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) + ) .Add(S["This is Menu Item 2.2"], subItem => subItem - .Action("Index", "Admin", new { area = "OrchardCore.Demo" })) + .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) + ) .Add(S["This is Menu Item 3.2"], subItem => subItem - .Action("Index", "Admin", new { area = "OrchardCore.Demo" })) + .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) + ) ) .Add(S["This Menu Item 3"], "0", item => item .Add(S["This is Menu Item 3.1"], subItem => subItem - .Action("Index", "Admin", new { area = "OrchardCore.Demo" })) + .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) + ) .Add(S["This is Menu Item 3.2"], subItem => subItem - .Action("Index", "Admin", new { area = "OrchardCore.Demo" })) - + .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) + ) ) .Add(S["Todo (Liquid - Frontend)"], "0", item => item .Action("Index", "Todo", new { area = "OrchardCore.Demo" }) diff --git a/src/OrchardCore.Modules/OrchardCore.Email/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Email/AdminMenu.cs index 7223268bde5..d6874cb151e 100644 --- a/src/OrchardCore.Modules/OrchardCore.Email/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Email/AdminMenu.cs @@ -25,7 +25,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings - .Add(S["Email"], S["Email"].PrefixPosition(), entry => entry + .Add(S["Email"], S["Email"].PrefixPosition(), email => email .AddClass("email").Id("email") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = SmtpSettingsDisplayDriver.GroupId }) .Permission(Permissions.ManageEmailSettings) diff --git a/src/OrchardCore.Modules/OrchardCore.Features/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Features/AdminMenu.cs index a6c1cdfeaa6..ae597f67858 100644 --- a/src/OrchardCore.Modules/OrchardCore.Features/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Features/AdminMenu.cs @@ -24,7 +24,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], NavigationConstants.AdminMenuConfigurationPosition, configuration => configuration .AddClass("menu-configuration").Id("configuration") - .Add(S["Features"], S["Features"].PrefixPosition(), deployment => deployment + .Add(S["Features"], S["Features"].PrefixPosition(), features => features .Action("Features", "Admin", new { area = "OrchardCore.Features" }) .Permission(Permissions.ManageFeatures) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.GitHub/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.GitHub/AdminMenu.cs index b6400212abd..5e31cea6fa2 100644 --- a/src/OrchardCore.Modules/OrchardCore.GitHub/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.GitHub/AdminMenu.cs @@ -18,17 +18,23 @@ public AdminMenuGitHubLogin(IStringLocalizer localizer) public Task BuildNavigationAsync(string name, NavigationBuilder builder) { - if (String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) + if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { - builder.Add(S["Security"], security => security - .Add(S["Authentication"], authentication => authentication - .Add(S["GitHub"], S["GitHub"].PrefixPosition(), settings => settings - .AddClass("github").Id("github") + return Task.CompletedTask; + } + + builder + .Add(S["Security"], security => security + .Add(S["Authentication"], authentication => authentication + .Add(S["GitHub"], S["GitHub"].PrefixPosition(), github => github + .AddClass("github").Id("github") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = GitHubConstants.Features.GitHubAuthentication }) .Permission(Permissions.ManageGitHubAuthentication) - .LocalNav()) - )); - } + .LocalNav() + ) + ) + ); + return Task.CompletedTask; } } diff --git a/src/OrchardCore.Modules/OrchardCore.Google/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Google/AdminMenu.cs index d9e7a635d80..39e0dce9e71 100644 --- a/src/OrchardCore.Modules/OrchardCore.Google/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Google/AdminMenu.cs @@ -53,7 +53,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings - .Add(S["Google Analytics"], S["Google Analytics"].PrefixPosition(), settings => settings + .Add(S["Google Analytics"], S["Google Analytics"].PrefixPosition(), analytics => analytics .AddClass("googleAnalytics").Id("googleAnalytics") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = GoogleConstants.Features.GoogleAnalytics }) .Permission(Permissions.ManageGoogleAnalytics) diff --git a/src/OrchardCore.Modules/OrchardCore.Https/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Https/AdminMenu.cs index 345637eac6c..8cbd2db07f0 100644 --- a/src/OrchardCore.Modules/OrchardCore.Https/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Https/AdminMenu.cs @@ -22,10 +22,10 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Configuration"], design => design + .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings.Id("settings") .Add(S["Security"], security => security.Id("security") - .Add(S["HTTPS"], S["HTTPS"].PrefixPosition(), entry => entry + .Add(S["HTTPS"], S["HTTPS"].PrefixPosition(), https => https .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "Https" }) .Permission(Permissions.ManageHttps) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Layers/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Layers/AdminMenu.cs index 7fe56c2113b..0b70aaca41a 100644 --- a/src/OrchardCore.Modules/OrchardCore.Layers/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Layers/AdminMenu.cs @@ -30,7 +30,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .LocalNav() ) ) - .Add(S["Configuration"], design => design + .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings.Id("settings") .Add(S["Zones"], S["Zones"].PrefixPosition(), zones => zones .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = LayerSiteSettingsDisplayDriver.GroupId }) diff --git a/src/OrchardCore.Modules/OrchardCore.Localization/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Localization/AdminMenu.cs index e4bf417439a..c523ed96f68 100644 --- a/src/OrchardCore.Modules/OrchardCore.Localization/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Localization/AdminMenu.cs @@ -25,17 +25,17 @@ public AdminMenu(IStringLocalizer localizer) /// public Task BuildNavigationAsync(string name, NavigationBuilder builder) { - if (String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) + if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { return Task.CompletedTask; } builder - .Add(S["Configuration"], NavigationConstants.AdminMenuConfigurationPosition, localization => localization + .Add(S["Configuration"], NavigationConstants.AdminMenuConfigurationPosition, configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Localization"], localization => localization .AddClass("localization").Id("localization") - .Add(S["Cultures"], S["Cultures"].PrefixPosition(), entry => entry + .Add(S["Cultures"], S["Cultures"].PrefixPosition(), cultures => cultures .AddClass("cultures").Id("cultures") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = LocalizationSettingsDisplayDriver.GroupId }) .Permission(Permissions.ManageCultures) diff --git a/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs index a734f40e70b..4726a77d523 100644 --- a/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs @@ -25,7 +25,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Search"], NavigationConstants.AdminMenuSearchPosition, search => search .AddClass("search").Id("search") - .Add(S["Indexing"], S["Indexing"].PrefixPosition(), import => import + .Add(S["Indexing"], S["Indexing"].PrefixPosition(), indexing => indexing .Add(S["Lucene Indices"], S["Lucene Indices"].PrefixPosition(), indexes => indexes .Action("Index", "Admin", new { area = "OrchardCore.Lucene" }) .Permission(Permissions.ManageIndexes) diff --git a/src/OrchardCore.Modules/OrchardCore.Media.Azure/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Media.Azure/AdminMenu.cs index 8bf48eeac22..22184aa04d4 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media.Azure/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media.Azure/AdminMenu.cs @@ -21,13 +21,16 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) return Task.CompletedTask; } - builder.Add(S["Configuration"], configuration => configuration - .Add(S["Media"], S["Media"].PrefixPosition(), media => media - .Add(S["Azure Blob Options"], S["Azure Blob Options"].PrefixPosition(), options => options - .Action("Options", "Admin", new { area = "OrchardCore.Media.Azure" }) - .Permission(Permissions.ViewAzureMediaOptions) - .LocalNav()) - )); + builder + .Add(S["Configuration"], configuration => configuration + .Add(S["Media"], S["Media"].PrefixPosition(), media => media + .Add(S["Azure Blob Options"], S["Azure Blob Options"].PrefixPosition(), options => options + .Action("Options", "Admin", new { area = "OrchardCore.Media.Azure" }) + .Permission(Permissions.ViewAzureMediaOptions) + .LocalNav() + ) + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs index 27526fc199d..7e43cf0486a 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs @@ -28,19 +28,24 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Permission(Permissions.ManageMedia) .Action("Index", "Admin", new { area = "OrchardCore.Media" }) .LocalNav() - )); + ) + ); - builder.Add(S["Configuration"], configuration => configuration - .Add(S["Media"], S["Media"].PrefixPosition(), media => media - .Add(S["Media Options"], S["Media Options"].PrefixPosition(), options => options - .Action("Options", "Admin", new { area = "OrchardCore.Media" }) - .Permission(Permissions.ViewMediaOptions) - .LocalNav()) - .Add(S["Media Profiles"], S["Media Profiles"].PrefixPosition(), mediaProfiles => mediaProfiles - .Action("Index", "MediaProfiles", new { area = "OrchardCore.Media" }) - .Permission(Permissions.ManageMediaProfiles) - .LocalNav()) - )); + builder + .Add(S["Configuration"], configuration => configuration + .Add(S["Media"], S["Media"].PrefixPosition(), media => media + .Add(S["Media Options"], S["Media Options"].PrefixPosition(), options => options + .Action("Options", "Admin", new { area = "OrchardCore.Media" }) + .Permission(Permissions.ViewMediaOptions) + .LocalNav() + ) + .Add(S["Media Profiles"], S["Media Profiles"].PrefixPosition(), mediaProfiles => mediaProfiles + .Action("Index", "MediaProfiles", new { area = "OrchardCore.Media" }) + .Permission(Permissions.ManageMediaProfiles) + .LocalNav() + ) + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Menu/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Menu/AdminMenu.cs index 7dfab46f817..1fa84dd8cf0 100644 --- a/src/OrchardCore.Modules/OrchardCore.Menu/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Menu/AdminMenu.cs @@ -30,12 +30,14 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) { "Options.CanCreateSelectedContentType", true } }; - builder.Add(S["Content"], design => design + builder + .Add(S["Content"], content => content .Add(S["Menus"], S["Menus"].PrefixPosition(), menus => menus .Permission(Permissions.ManageMenu) .Action("List", "Admin", rvd) .LocalNav() - )); + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Microsoft.Authentication/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Microsoft.Authentication/AdminMenu.cs index c018ca6dc64..689cdf0b670 100644 --- a/src/OrchardCore.Modules/OrchardCore.Microsoft.Authentication/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Microsoft.Authentication/AdminMenu.cs @@ -19,17 +19,23 @@ public AdminMenuMicrosoftAccount(IStringLocalizer loc public Task BuildNavigationAsync(string name, NavigationBuilder builder) { - if (String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) + if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { - builder.Add(S["Security"], security => security - .Add(S["Authentication"], authentication => authentication + return Task.CompletedTask; + } + + builder + .Add(S["Security"], security => security + .Add(S["Authentication"], authentication => authentication .Add(S["Microsoft"], S["Microsoft"].PrefixPosition(), client => client - .AddClass("microsoft").Id("microsoft") + .AddClass("microsoft").Id("microsoft") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = MicrosoftAuthenticationConstants.Features.MicrosoftAccount }) .Permission(Permissions.ManageMicrosoftAuthentication) - .LocalNav()) - )); - } + .LocalNav() + ) + ) + ); + return Task.CompletedTask; } } diff --git a/src/OrchardCore.Modules/OrchardCore.OpenId/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.OpenId/AdminMenu.cs index 1ece7699fbf..7a490ea2680 100644 --- a/src/OrchardCore.Modules/OrchardCore.OpenId/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.OpenId/AdminMenu.cs @@ -29,7 +29,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Configuration"], design => design + .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Security"], security => security .Add(S["OpenID Connect"], S["OpenID Connect"].PrefixPosition(), category => diff --git a/src/OrchardCore.Modules/OrchardCore.Placements/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Placements/AdminMenu.cs index 46ca8fd43b3..df6b72989bb 100644 --- a/src/OrchardCore.Modules/OrchardCore.Placements/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Placements/AdminMenu.cs @@ -23,7 +23,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Design"], design => design - .Add(S["Placements"], S["Placements"].PrefixPosition(), import => import + .Add(S["Placements"], S["Placements"].PrefixPosition(), placements => placements .Action("Index", "Admin", new { area = "OrchardCore.Placements" }) .Permission(Permissions.ManagePlacements) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Queries/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Queries/AdminMenu.cs index 91f00cc8f9e..b7b938ab2c5 100644 --- a/src/OrchardCore.Modules/OrchardCore.Queries/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Queries/AdminMenu.cs @@ -21,14 +21,17 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) return Task.CompletedTask; } - builder.Add(S["Search"], NavigationConstants.AdminMenuSearchPosition, search => search + builder + .Add(S["Search"], NavigationConstants.AdminMenuSearchPosition, search => search .AddClass("search").Id("search") .Add(S["Queries"], S["Queries"].PrefixPosition(), contentItems => contentItems - .Add(S["All queries"], "1", queries => queries - .Action("Index", "Admin", new { area = "OrchardCore.Queries" }) - .Permission(Permissions.ManageQueries) - .LocalNav()) - )); + .Add(S["All queries"], "1", queries => queries + .Action("Index", "Admin", new { area = "OrchardCore.Queries" }) + .Permission(Permissions.ManageQueries) + .LocalNav() + ) + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.ReCaptcha/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.ReCaptcha/AdminMenu.cs index 412f9717d3f..d0f046bd820 100644 --- a/src/OrchardCore.Modules/OrchardCore.ReCaptcha/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.ReCaptcha/AdminMenu.cs @@ -23,10 +23,10 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Configuration"], design => design + .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings.Id("settings") .Add(S["Security"], security => security.Id("security") - .Add(S["reCaptcha"], S["reCaptcha"].PrefixPosition(), registration => registration + .Add(S["reCaptcha"], S["reCaptcha"].PrefixPosition(), reCaptcha => reCaptcha .Permission(Permissions.ManageReCaptchaSettings) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ReCaptchaSettingsDisplayDriver.GroupId }) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs index e780a5df4e4..071fc2d0111 100644 --- a/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs @@ -24,7 +24,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings - .Add(S["Reverse Proxy"], S["Reverse Proxy"].PrefixPosition(), entry => entry + .Add(S["Reverse Proxy"], S["Reverse Proxy"].PrefixPosition(), proxy => proxy .AddClass("reverseproxy").Id("reverseproxy") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "ReverseProxy" }) .Permission(Permissions.ManageReverseProxySettings) diff --git a/src/OrchardCore.Modules/OrchardCore.Roles/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Roles/AdminMenu.cs index 2e90d9c645a..4703f4a30e7 100644 --- a/src/OrchardCore.Modules/OrchardCore.Roles/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Roles/AdminMenu.cs @@ -21,13 +21,15 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) return Task.CompletedTask; } - builder.Add(S["Security"], security => security - .Add(S["Roles"], S["Roles"].PrefixPosition(), roles => roles - .AddClass("roles").Id("roles") - .Action("Index", "Admin", "OrchardCore.Roles") - .Permission(Permissions.ManageRoles) - .LocalNav() - )); + builder + .Add(S["Security"], security => security + .Add(S["Roles"], S["Roles"].PrefixPosition(), roles => roles + .AddClass("roles").Id("roles") + .Action("Index", "Admin", "OrchardCore.Roles") + .Permission(Permissions.ManageRoles) + .LocalNav() + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs index cde2bb2f28d..ba15c7ae79d 100644 --- a/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs @@ -23,7 +23,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Configuration"], design => design + .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Security"], security => security.Id("security") .Add(S["Security Headers"], S["Security Headers"].PrefixPosition(), headers => headers diff --git a/src/OrchardCore.Modules/OrchardCore.Sitemaps/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Sitemaps/AdminMenu.cs index 08ce302fb31..312bf912c80 100644 --- a/src/OrchardCore.Modules/OrchardCore.Sitemaps/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Sitemaps/AdminMenu.cs @@ -16,12 +16,13 @@ public AdminMenu(IStringLocalizer localizer) public Task BuildNavigationAsync(string name, NavigationBuilder builder) { - if (!string.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) + if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { return Task.CompletedTask; } - builder.Add(S["Configuration"], NavigationConstants.AdminMenuConfigurationPosition, cfg => cfg + builder + .Add(S["Configuration"], NavigationConstants.AdminMenuConfigurationPosition, cfg => cfg .Add(S["SEO"], S["SEO"].PrefixPosition(), seo => seo .Permission(Permissions.ManageSitemaps) .Add(S["Sitemaps"], S["Sitemaps"].PrefixPosition("1"), sitemaps => sitemaps @@ -36,7 +37,8 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Action("List", "SitemapCache", new { area = "OrchardCore.Sitemaps" }) .LocalNav() ) - )); + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Themes/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Themes/AdminMenu.cs index ad2ee26f2f1..4253a7c7447 100644 --- a/src/OrchardCore.Modules/OrchardCore.Themes/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Themes/AdminMenu.cs @@ -24,7 +24,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Design"], NavigationConstants.AdminMenuDesignPosition, design => design .AddClass("themes").Id("themes") - .Add(S["Themes"], S["Themes"].PrefixPosition(), installed => installed + .Add(S["Themes"], S["Themes"].PrefixPosition(), themes => themes .Action("Index", "Admin", new { area = "OrchardCore.Themes" }) .Permission(Permissions.ApplyTheme) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs index 439ad3d7b0b..98a61375f8f 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs @@ -137,7 +137,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Configuration"], design => design + .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Security"], security => security.Id("security") .Add(S["User Reset password"], S["User Reset password"].PrefixPosition(), password => password diff --git a/src/OrchardCore.Modules/OrchardCore.Workflows/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Workflows/AdminMenu.cs index b82435e6744..e8cefb7c138 100644 --- a/src/OrchardCore.Modules/OrchardCore.Workflows/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Workflows/AdminMenu.cs @@ -21,10 +21,12 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) return Task.CompletedTask; } - builder.Add(S["Workflows"], NavigationConstants.AdminMenuWorkflowsPosition, workflow => workflow - .AddClass("workflows").Id("workflows").Action("Index", "WorkflowType", new { area = "OrchardCore.Workflows" }) + builder + .Add(S["Workflows"], NavigationConstants.AdminMenuWorkflowsPosition, workflow => workflow + .AddClass("workflows").Id("workflows").Action("Index", "WorkflowType", new { area = "OrchardCore.Workflows" }) .Permission(Permissions.ManageWorkflows) - .LocalNav()); + .LocalNav() + ); return Task.CompletedTask; } From 7c246fe89d5b6b7436c2f8f823aeee65b0f727e3 Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Sat, 2 Jul 2022 08:15:48 -0700 Subject: [PATCH 3/6] Clean up all AdminMenu for consistency --- ...AdminMenuNavigationProvidersCoordinator.cs | 2 +- .../OrchardCore.Apis.GraphQL/AdminMenu.cs | 2 +- .../Navigation/AuditTrailAdminMenu.cs | 5 +- .../AdminMenu.cs | 4 +- .../OrchardCore.Contents/AdminMenu.cs | 3 +- .../OrchardCore.Cors/AdminMenu.cs | 4 +- .../OrchardCore.CustomSettings/AdminMenu.cs | 2 +- .../AdminMenu.cs | 4 +- .../OrchardCore.Facebook/AdminMenu.cs | 42 +++++++-------- .../OrchardCore.GitHub/AdminMenu.cs | 18 ++++--- .../OrchardCore.Google/AdminMenu.cs | 28 ++++++---- .../OrchardCore.Media/AdminMenu.cs | 17 +++--- .../OrchardCore.Menu/AdminMenu.cs | 4 +- .../AdminMenu.cs | 54 +++++++++++-------- .../OrchardCore.Queries/Sql/AdminMenu.cs | 9 ++-- .../OrchardCore.Recipes/AdminMenu.cs | 14 ++--- .../OrchardCore.Settings/AdminMenu.cs | 19 +++---- .../OrchardCore.Shortcodes/AdminMenu.cs | 2 +- .../OrchardCore.Taxonomies/AdminMenu.cs | 2 +- .../OrchardCore.Templates/AdminMenu.cs | 2 +- .../AdminTemplatesAdminMenu.cs | 2 +- .../OrchardCore.Tenants/AdminMenu.cs | 2 +- .../FeatureProfilesAdminMenu.cs | 2 +- .../OrchardCore.Twitter/AdminMenu.cs | 31 +++++++---- .../OrchardCore.Users/AdminMenu.cs | 6 +-- .../OrchardCore.Workflows/AdminMenu.cs | 2 +- 26 files changed, 162 insertions(+), 120 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.AdminMenu/Services/AdminMenuNavigationProvidersCoordinator.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Services/AdminMenuNavigationProvidersCoordinator.cs index 3f40319a3f4..5aec3dd2732 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminMenu/Services/AdminMenuNavigationProvidersCoordinator.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Services/AdminMenuNavigationProvidersCoordinator.cs @@ -44,7 +44,7 @@ public async Task BuildNavigationAsync(string name, NavigationBuilder builder) return; } - var trees = ((await _adminMenuService.GetAdminMenuListAsync()).AdminMenu) + var trees = (await _adminMenuService.GetAdminMenuListAsync()).AdminMenu .Where(m => m.Enabled && m.MenuItems.Count > 0); foreach (var tree in trees) diff --git a/src/OrchardCore.Modules/OrchardCore.Apis.GraphQL/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Apis.GraphQL/AdminMenu.cs index af57d70bbe4..33c7fe648fa 100644 --- a/src/OrchardCore.Modules/OrchardCore.Apis.GraphQL/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Apis.GraphQL/AdminMenu.cs @@ -24,7 +24,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], NavigationConstants.AdminMenuConfigurationPosition, configuration => configuration .AddClass("menu-configuration").Id("configuration") - .Add(S["GraphiQL"], S["GraphiQL"].PrefixPosition(), graphic => graphic + .Add(S["GraphiQL"], S["GraphiQL"].PrefixPosition(), graphiQl => graphiQl .Action("Index", "Admin", new { area = "OrchardCore.Apis.GraphQL" }) .Permission(Permissions.ExecuteGraphQL) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailAdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailAdminMenu.cs index 68ec5c9e7f0..36521ef6956 100644 --- a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailAdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailAdminMenu.cs @@ -23,11 +23,12 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Audit Trail"], NavigationConstants.AdminMenuAuditTrailPosition, configuration => configuration + .Add(S["Audit Trail"], NavigationConstants.AdminMenuAuditTrailPosition, audit => audit .AddClass("audittrail").Id("audittrail") .Action(nameof(AdminController.Index), "Admin", new { area = "OrchardCore.AuditTrail", correlationId = "" }) .Permission(AuditTrailPermissions.ViewAuditTrail) - .LocalNav()); + .LocalNav() + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs index 67c4fff5218..4d7353847b8 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs @@ -28,13 +28,13 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Localization"], localization => localization - .Add(S["Content Request Culture Provider"], S["Content Request Culture Provider"].PrefixPosition(), registration => registration + .Add(S["Content Request Culture Provider"], S["Content Request Culture Provider"].PrefixPosition(), provider => provider .AddClass("contentrequestcultureprovider").Id("contentrequestcultureprovider") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ContentRequestCultureProviderSettingsDriver.GroupId }) .Permission(Permissions.ManageContentCulturePicker) .LocalNav() ) - .Add(S["Content Culture Picker"], S["Content Culture Picker"].PrefixPosition(), registration => registration + .Add(S["Content Culture Picker"], S["Content Culture Picker"].PrefixPosition(), picker => picker .AddClass("contentculturepicker").Id("contentculturepicker") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ContentCulturePickerSettingsDriver.GroupId }) .Permission(Permissions.ManageContentCulturePicker) diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Contents/AdminMenu.cs index b0c5847f129..7d4a328e341 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/AdminMenu.cs @@ -48,13 +48,12 @@ public AdminMenu( public async Task BuildNavigationAsync(string name, NavigationBuilder builder) { - var context = _httpContextAccessor.HttpContext; - if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { return; } + var context = _httpContextAccessor.HttpContext; var contentTypeDefinitions = _contentDefinitionManager.ListTypeDefinitions().OrderBy(d => d.Name); var contentTypes = contentTypeDefinitions.Where(ctd => ctd.GetSettings().Creatable).OrderBy(ctd => ctd.DisplayName); await builder.AddAsync(S["Content"], NavigationConstants.AdminMenuContentPosition, async content => diff --git a/src/OrchardCore.Modules/OrchardCore.Cors/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Cors/AdminMenu.cs index 91a9581c9a5..67e02e57c03 100644 --- a/src/OrchardCore.Modules/OrchardCore.Cors/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Cors/AdminMenu.cs @@ -7,13 +7,13 @@ namespace OrchardCore.Cors { public class AdminMenu : INavigationProvider { + private readonly IStringLocalizer S; + public AdminMenu(IStringLocalizer localizer) { S = localizer; } - public IStringLocalizer S { get; set; } - public Task BuildNavigationAsync(string name, NavigationBuilder builder) { if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) diff --git a/src/OrchardCore.Modules/OrchardCore.CustomSettings/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.CustomSettings/AdminMenu.cs index 2777820af03..3b75511be44 100644 --- a/src/OrchardCore.Modules/OrchardCore.CustomSettings/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.CustomSettings/AdminMenu.cs @@ -31,7 +31,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings - .Add(new LocalizedString(type.DisplayName, type.DisplayName), type.DisplayName.PrefixPosition(), layers => layers + .Add(new LocalizedString(type.DisplayName, type.DisplayName), type.DisplayName.PrefixPosition(), contentType => contentType .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = type.Name }) .Permission(Permissions.CreatePermissionForType(type)) .Resource(type.Name) diff --git a/src/OrchardCore.Modules/OrchardCore.Deployment.Remote/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Deployment.Remote/AdminMenu.cs index 6cc4f6ad0da..3d31e1739e0 100644 --- a/src/OrchardCore.Modules/OrchardCore.Deployment.Remote/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Deployment.Remote/AdminMenu.cs @@ -24,12 +24,12 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Import/Export"], import => import - .Add(S["Remote Instances"], S["Remote Instances"].PrefixPosition(), remote => remote + .Add(S["Remote Instances"], S["Remote Instances"].PrefixPosition(), instances => instances .Action("Index", "RemoteInstance", new { area = "OrchardCore.Deployment.Remote" }) .Permission(Permissions.ManageRemoteInstances) .LocalNav() ) - .Add(S["Remote Clients"], S["Remote Clients"].PrefixPosition(), remote => remote + .Add(S["Remote Clients"], S["Remote Clients"].PrefixPosition(), clients => clients .Action("Index", "RemoteClient", new { area = "OrchardCore.Deployment.Remote" }) .Permission(Permissions.ManageRemoteClients) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs index 8cb33015293..bab8af36a41 100644 --- a/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs @@ -1,7 +1,6 @@ using System; using System.Threading.Tasks; using Microsoft.Extensions.Localization; -using OrchardCore.Environment.Shell.Descriptor.Models; using OrchardCore.Modules; using OrchardCore.Navigation; @@ -9,15 +8,11 @@ namespace OrchardCore.Facebook { public class AdminMenu : INavigationProvider { - private readonly ShellDescriptor _shellDescriptor; private readonly IStringLocalizer S; - public AdminMenu( - IStringLocalizer localizer, - ShellDescriptor shellDescriptor) + public AdminMenu(IStringLocalizer localizer) { S = localizer; - _shellDescriptor = shellDescriptor; } public Task BuildNavigationAsync(string name, NavigationBuilder builder) @@ -30,7 +25,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings - .Add(S["Facebook App"], S["Facebook App"].PrefixPosition(), settings => settings + .Add(S["Facebook App"], S["Facebook App"].PrefixPosition(), app => app .AddClass("facebookApp").Id("facebookApp") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = FacebookConstants.Features.Core }) .Permission(Permissions.ManageFacebookApp) @@ -46,31 +41,36 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) [Feature(FacebookConstants.Features.Login)] public class AdminMenuLogin : INavigationProvider { - private readonly ShellDescriptor _shellDescriptor; private readonly IStringLocalizer S; - public AdminMenuLogin( - IStringLocalizer localizer, - ShellDescriptor shellDescriptor) + public AdminMenuLogin(IStringLocalizer localizer) { S = localizer; - _shellDescriptor = shellDescriptor; } public Task BuildNavigationAsync(string name, NavigationBuilder builder) { - if (String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) + if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { - builder.Add(S["Security"], security => security - .Add(S["Authentication"], authentication => authentication - .Add(S["Facebook"], S["Facebook"].PrefixPosition(), settings => settings - .AddClass("facebook").Id("facebook") - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = FacebookConstants.Features.Login }) - .Permission(Permissions.ManageFacebookApp) - .LocalNav()) - )); + return Task.CompletedTask; } + builder + .Add(S["Configuration"], configuration => configuration + .Add(S["Settings"], settings => settings + .Add(S["Security"], security => security.Id("security") + .Add(S["Authentication"], authentication => authentication + .Add(S["Facebook"], S["Facebook"].PrefixPosition(), facebook => facebook + .AddClass("facebook").Id("facebook") + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = FacebookConstants.Features.Login }) + .Permission(Permissions.ManageFacebookApp) + .LocalNav() + ) + ) + ) + ) + ); + return Task.CompletedTask; } } diff --git a/src/OrchardCore.Modules/OrchardCore.GitHub/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.GitHub/AdminMenu.cs index 5e31cea6fa2..ddc13ce618e 100644 --- a/src/OrchardCore.Modules/OrchardCore.GitHub/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.GitHub/AdminMenu.cs @@ -24,13 +24,17 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Security"], security => security - .Add(S["Authentication"], authentication => authentication - .Add(S["GitHub"], S["GitHub"].PrefixPosition(), github => github - .AddClass("github").Id("github") - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = GitHubConstants.Features.GitHubAuthentication }) - .Permission(Permissions.ManageGitHubAuthentication) - .LocalNav() + .Add(S["Configuration"], configuration => configuration + .Add(S["Settings"], settings => settings + .Add(S["Security"], security => security.Id("security") + .Add(S["Authentication"], authentication => authentication + .Add(S["GitHub"], S["GitHub"].PrefixPosition(), github => github + .AddClass("github").Id("github") + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = GitHubConstants.Features.GitHubAuthentication }) + .Permission(Permissions.ManageGitHubAuthentication) + .LocalNav() + ) + ) ) ) ); diff --git a/src/OrchardCore.Modules/OrchardCore.Google/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Google/AdminMenu.cs index 39e0dce9e71..8370277ed53 100644 --- a/src/OrchardCore.Modules/OrchardCore.Google/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Google/AdminMenu.cs @@ -18,17 +18,27 @@ public GoogleAuthenticationAdminMenu(IStringLocalizer security - .Add(S["Authentication"], authentication => authentication - .Add(S["Google"], S["Google"].PrefixPosition(), settings => settings - .AddClass("google").Id("google") - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = GoogleConstants.Features.GoogleAuthentication }) - .Permission(Permissions.ManageGoogleAuthentication) - .LocalNav()) - )); + return Task.CompletedTask; } + + builder + .Add(S["Configuration"], configuration => configuration + .Add(S["Settings"], settings => settings + .Add(S["Security"], security => security.Id("security") + .Add(S["Authentication"], authentication => authentication + .Add(S["Google"], S["Google"].PrefixPosition(), settings => settings + .AddClass("google").Id("google") + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = GoogleConstants.Features.GoogleAuthentication }) + .Permission(Permissions.ManageGoogleAuthentication) + .LocalNav() + ) + ) + ) + ) + ); + return Task.CompletedTask; } } diff --git a/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs index 7e43cf0486a..6a9c8547ce2 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs @@ -67,13 +67,16 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) return Task.CompletedTask; } - builder.Add(S["Configuration"], configuration => configuration - .Add(S["Media"], S["Media"].PrefixPosition(), media => media - .Add(S["Media Cache"], S["Media Cache"].PrefixPosition(), cache => cache - .Action("Index", "MediaCache", new { area = "OrchardCore.Media" }) - .Permission(MediaCachePermissions.ManageAssetCache) - .LocalNav()) - )); + builder + .Add(S["Configuration"], configuration => configuration + .Add(S["Media"], S["Media"].PrefixPosition(), media => media + .Add(S["Media Cache"], S["Media Cache"].PrefixPosition(), cache => cache + .Action("Index", "MediaCache", new { area = "OrchardCore.Media" }) + .Permission(MediaCachePermissions.ManageAssetCache) + .LocalNav() + ) + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Menu/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Menu/AdminMenu.cs index 1fa84dd8cf0..576ca45225b 100644 --- a/src/OrchardCore.Modules/OrchardCore.Menu/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Menu/AdminMenu.cs @@ -22,7 +22,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) return Task.CompletedTask; } - var rvd = new RouteValueDictionary + var routeValues = new RouteValueDictionary { { "contentTypeId", "Menu" }, { "Area", "OrchardCore.Contents" }, @@ -34,7 +34,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Content"], content => content .Add(S["Menus"], S["Menus"].PrefixPosition(), menus => menus .Permission(Permissions.ManageMenu) - .Action("List", "Admin", rvd) + .Action("List", "Admin", routeValues) .LocalNav() ) ); diff --git a/src/OrchardCore.Modules/OrchardCore.Microsoft.Authentication/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Microsoft.Authentication/AdminMenu.cs index 689cdf0b670..45a7ae01c80 100644 --- a/src/OrchardCore.Modules/OrchardCore.Microsoft.Authentication/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Microsoft.Authentication/AdminMenu.cs @@ -1,7 +1,6 @@ using System; using System.Threading.Tasks; using Microsoft.Extensions.Localization; -using OrchardCore.Environment.Shell.Descriptor.Models; using OrchardCore.Modules; using OrchardCore.Navigation; @@ -25,17 +24,20 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Security"], security => security - .Add(S["Authentication"], authentication => authentication - .Add(S["Microsoft"], S["Microsoft"].PrefixPosition(), client => client - .AddClass("microsoft").Id("microsoft") - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = MicrosoftAuthenticationConstants.Features.MicrosoftAccount }) - .Permission(Permissions.ManageMicrosoftAuthentication) - .LocalNav() + .Add(S["Configuration"], configuration => configuration + .Add(S["Settings"], settings => settings + .Add(S["Security"], security => security.Id("security") + .Add(S["Authentication"], authentication => authentication + .Add(S["Microsoft"], S["Microsoft"].PrefixPosition(), client => client + .AddClass("microsoft").Id("microsoft") + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = MicrosoftAuthenticationConstants.Features.MicrosoftAccount }) + .Permission(Permissions.ManageMicrosoftAuthentication) + .LocalNav() + ) + ) ) ) ); - return Task.CompletedTask; } } @@ -43,30 +45,36 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) [Feature(MicrosoftAuthenticationConstants.Features.AAD)] public class AdminMenuAAD : INavigationProvider { - private readonly ShellDescriptor _shellDescriptor; private readonly IStringLocalizer S; - public AdminMenuAAD( - IStringLocalizer localizer, - ShellDescriptor shellDescriptor) + public AdminMenuAAD(IStringLocalizer localizer) { S = localizer; - _shellDescriptor = shellDescriptor; } public Task BuildNavigationAsync(string name, NavigationBuilder builder) { - if (String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) + if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { - builder.Add(S["Security"], security => security - .Add(S["Authentication"], authentication => authentication - .Add(S["Azure Active Directory"], S["Azure Active Directory"].PrefixPosition(), client => client - .AddClass("azuread").Id("azuread") - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = MicrosoftAuthenticationConstants.Features.AAD }) - .Permission(Permissions.ManageMicrosoftAuthentication) - .LocalNav()) - )); + return Task.CompletedTask; } + + builder + .Add(S["Configuration"], configuration => configuration + .Add(S["Settings"], settings => settings + .Add(S["Security"], security => security.Id("security") + .Add(S["Authentication"], authentication => authentication + .Add(S["Azure Active Directory"], S["Azure Active Directory"].PrefixPosition(), client => client + .AddClass("azuread").Id("azuread") + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = MicrosoftAuthenticationConstants.Features.AAD }) + .Permission(Permissions.ManageMicrosoftAuthentication) + .LocalNav() + ) + ) + ) + ) + ); + return Task.CompletedTask; } } diff --git a/src/OrchardCore.Modules/OrchardCore.Queries/Sql/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Queries/Sql/AdminMenu.cs index 7b19d0a8c05..f2f0d1a883b 100644 --- a/src/OrchardCore.Modules/OrchardCore.Queries/Sql/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Queries/Sql/AdminMenu.cs @@ -25,9 +25,12 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Search"], search => search .Add(S["Queries"], S["Queries"].PrefixPosition(), queries => queries .Add(S["Run SQL Query"], S["Run SQL Query"].PrefixPosition(), sql => sql - .Action("Query", "Admin", new { area = "OrchardCore.Queries" }) - .Permission(Permissions.ManageSqlQueries) - .LocalNav()))); + .Action("Query", "Admin", new { area = "OrchardCore.Queries" }) + .Permission(Permissions.ManageSqlQueries) + .LocalNav() + ) + ) + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Recipes/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Recipes/AdminMenu.cs index d2aad7fd6a7..69b3a89dab7 100644 --- a/src/OrchardCore.Modules/OrchardCore.Recipes/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Recipes/AdminMenu.cs @@ -22,12 +22,14 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) return Task.CompletedTask; } - builder.Add(S["Configuration"], configuration => configuration - .AddClass("recipes").Id("recipes") - .Add(S["Recipes"], S["Recipes"].PrefixPosition(), recipes => recipes - .Permission(StandardPermissions.SiteOwner) - .Action("Index", "Admin", new { area = "OrchardCore.Recipes" }) - .LocalNav()) + builder + .Add(S["Configuration"], configuration => configuration + .AddClass("recipes").Id("recipes") + .Add(S["Recipes"], S["Recipes"].PrefixPosition(), recipes => recipes + .Permission(StandardPermissions.SiteOwner) + .Action("Index", "Admin", new { area = "OrchardCore.Recipes" }) + .LocalNav() + ) ); return Task.CompletedTask; diff --git a/src/OrchardCore.Modules/OrchardCore.Settings/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Settings/AdminMenu.cs index 822c9775062..fdef42c1bf5 100644 --- a/src/OrchardCore.Modules/OrchardCore.Settings/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Settings/AdminMenu.cs @@ -21,16 +21,17 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) return Task.CompletedTask; } - builder.Add(S["Configuration"], configuration => configuration - .Add(S["Settings"], "1", settings => settings - .Add(S["General"], "1", entry => entry - .AddClass("general").Id("general") - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "general" }) - .Permission(Permissions.ManageGroupSettings) - .LocalNav() + builder + .Add(S["Configuration"], configuration => configuration + .Add(S["Settings"], "1", settings => settings + .Add(S["General"], "1", entry => entry + .AddClass("general").Id("general") + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "general" }) + .Permission(Permissions.ManageGroupSettings) + .LocalNav() + ) ) - ) - ); + ); return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Shortcodes/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Shortcodes/AdminMenu.cs index 13f45d61209..f384b78d43b 100644 --- a/src/OrchardCore.Modules/OrchardCore.Shortcodes/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Shortcodes/AdminMenu.cs @@ -23,7 +23,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Design"], design => design - .Add(S["Shortcodes"], S["Shortcodes"].PrefixPosition(), import => import + .Add(S["Shortcodes"], S["Shortcodes"].PrefixPosition(), shortCodes => shortCodes .Action("Index", "Admin", new { area = "OrchardCore.Shortcodes" }) .Permission(Permissions.ManageShortcodeTemplates) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs index b72e8a6dd31..da27b8ec6d1 100644 --- a/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs @@ -25,7 +25,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], "1", settings => settings - .Add(S["Taxonomy Filters"], S["Taxonomy Filters"].PrefixPosition(), admt => admt + .Add(S["Taxonomy Filters"], S["Taxonomy Filters"].PrefixPosition(), filters => filters .AddClass("taxonomyfilters").Id("taxonomyfilters") .Permission(Permissions.ManageTaxonomies) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = TaxonomyContentsAdminListSettingsDisplayDriver.GroupId }) diff --git a/src/OrchardCore.Modules/OrchardCore.Templates/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Templates/AdminMenu.cs index 9bef862755a..8b00fba0247 100644 --- a/src/OrchardCore.Modules/OrchardCore.Templates/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Templates/AdminMenu.cs @@ -23,7 +23,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Design"], design => design - .Add(S["Templates"], S["Templates"].PrefixPosition(), import => import + .Add(S["Templates"], S["Templates"].PrefixPosition(), templates => templates .Action("Index", "Template", new { area = "OrchardCore.Templates" }) .Permission(Permissions.ManageTemplates) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Templates/AdminTemplatesAdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Templates/AdminTemplatesAdminMenu.cs index 9cb88bf870f..ae0a0e8e99e 100644 --- a/src/OrchardCore.Modules/OrchardCore.Templates/AdminTemplatesAdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Templates/AdminTemplatesAdminMenu.cs @@ -23,7 +23,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Design"], design => design - .Add(S["Admin Templates"], S["Admin Templates"].PrefixPosition(), import => import + .Add(S["Admin Templates"], S["Admin Templates"].PrefixPosition(), templates => templates .Action("Admin", "Template", new { area = "OrchardCore.Templates" }) .Permission(AdminTemplatesPermissions.ManageAdminTemplates) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Tenants/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Tenants/AdminMenu.cs index 197d72a538b..1165d3dc8b2 100644 --- a/src/OrchardCore.Modules/OrchardCore.Tenants/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Tenants/AdminMenu.cs @@ -25,7 +25,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } // Don't add the menu item on non-default tenants - if (_shellSettings.Name != ShellHelper.DefaultShellName) + if (!_shellSettings.IsDefaultShell()) { return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Tenants/FeatureProfilesAdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Tenants/FeatureProfilesAdminMenu.cs index 6eb920ed9dd..03d0dcf1297 100644 --- a/src/OrchardCore.Modules/OrchardCore.Tenants/FeatureProfilesAdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Tenants/FeatureProfilesAdminMenu.cs @@ -25,7 +25,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } // Don't add the menu item on non-default tenants - if (_shellSettings.Name != ShellHelper.DefaultShellName) + if (!_shellSettings.IsDefaultShell()) { return Task.CompletedTask; } diff --git a/src/OrchardCore.Modules/OrchardCore.Twitter/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Twitter/AdminMenu.cs index ba19c48e88d..2ea4ef36710 100644 --- a/src/OrchardCore.Modules/OrchardCore.Twitter/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Twitter/AdminMenu.cs @@ -18,17 +18,28 @@ public AdminMenuSignin(IStringLocalizer localizer) public Task BuildNavigationAsync(string name, NavigationBuilder builder) { - if (String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) + if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { - builder.Add(S["Security"], security => security - .Add(S["Authentication"], authentication => authentication - .Add(S["Sign in with Twitter"], S["Sign in with Twitter"].PrefixPosition(), settings => settings - .AddClass("twitter").Id("twitter") - .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = TwitterConstants.Features.Signin }) - .Permission(Permissions.ManageTwitterSignin) - .LocalNav()) - )); + return Task.CompletedTask; + } + + builder + .Add(S["Configuration"], configuration => configuration + .Add(S["Settings"], settings => settings + .Add(S["Security"], security => security.Id("security") + .Add(S["Authentication"], authentication => authentication + .Add(S["Sign in with Twitter"], S["Sign in with Twitter"].PrefixPosition(), settings => settings + .AddClass("twitter").Id("twitter") + .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = TwitterConstants.Features.Signin }) + .Permission(Permissions.ManageTwitterSignin) + .LocalNav() + ) + ) + ) + ) + ); + return Task.CompletedTask; } } @@ -53,7 +64,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings - .Add(S["Twitter"], S["Twitter"].PrefixPosition(), settings => settings + .Add(S["Twitter"], S["Twitter"].PrefixPosition(), client => client .AddClass("twitter").Id("twitter") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = TwitterConstants.Features.Twitter }) .Permission(Permissions.ManageTwitter) diff --git a/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs index 98a61375f8f..7775b13620a 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs @@ -69,10 +69,10 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Configuration"], design => design + .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Security"], security => security.Id("security") - .Add(S["User Change email"], S["User Change email"].PrefixPosition(), registration => registration + .Add(S["User Change email"], S["User Change email"].PrefixPosition(), changeEmail => changeEmail .Permission(Permissions.ManageUsers) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ChangeEmailSettingsDisplayDriver.GroupId }) .LocalNav() @@ -103,7 +103,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Configuration"], design => design + .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Security"], security => security.Id("security") .Add(S["User Registration"], S["User Registration"].PrefixPosition(), registration => registration diff --git a/src/OrchardCore.Modules/OrchardCore.Workflows/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Workflows/AdminMenu.cs index e8cefb7c138..c258f5aea59 100644 --- a/src/OrchardCore.Modules/OrchardCore.Workflows/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Workflows/AdminMenu.cs @@ -16,7 +16,7 @@ public AdminMenu(IStringLocalizer localizer) public Task BuildNavigationAsync(string name, NavigationBuilder builder) { - if (!string.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) + if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase)) { return Task.CompletedTask; } From 2b2e77988fda0caeaced0d68992ee8c40bf567ee Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Sun, 3 Jul 2022 09:26:38 -0700 Subject: [PATCH 4/6] Unify all menu item to use sentence case --- .../OrchardCore.AdminMenu/AdminMenu.cs | 2 +- .../Navigation/AuditTrailAdminMenu.cs | 2 +- .../Navigation/AuditTrailSettingsAdminMenu.cs | 2 +- .../OrchardCore.BackgroundTasks/AdminMenu.cs | 2 +- .../AdminMenu.cs | 4 ++-- .../OrchardCore.ContentTypes/AdminMenu.cs | 6 +++--- .../OrchardCore.Contents/AdminMenu.cs | 2 +- ...xportContentToDeploymentTargetAdminMenu.cs | 2 +- .../OrchardCore.Demo/AdminMenu.cs | 20 +++++++++---------- .../AdminMenu.cs | 4 ++-- .../OrchardCore.Deployment/AdminMenu.cs | 6 +++--- .../OrchardCore.Facebook/AdminMenu.cs | 2 +- .../OrchardCore.Lucene/AdminMenu.cs | 4 ++-- .../OrchardCore.Media.Azure/AdminMenu.cs | 2 +- .../OrchardCore.Media/AdminMenu.cs | 8 ++++---- .../OrchardCore.Queries/Sql/AdminMenu.cs | 2 +- .../OrchardCore.ReverseProxy/AdminMenu.cs | 2 +- .../OrchardCore.Security/AdminMenu.cs | 2 +- .../OrchardCore.Sitemaps/AdminMenu.cs | 4 ++-- .../OrchardCore.Taxonomies/AdminMenu.cs | 2 +- .../AdminTemplatesAdminMenu.cs | 2 +- .../FeatureProfilesAdminMenu.cs | 2 +- .../OrchardCore.Users/AdminMenu.cs | 8 ++++---- 23 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs index a63e82e8e6a..e09cfb5a0cb 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs @@ -27,7 +27,7 @@ public async Task BuildNavigationAsync(string name, NavigationBuilder builder) // Configuration and settings menus for the AdminMenu module builder.Add(S["Configuration"], configuration => configuration - .Add(S["Admin Menus"], S["Admin Menus"].PrefixPosition(), admin => admin + .Add(S["Admin menus"], S["Admin menus"].PrefixPosition(), admin => admin .Permission(Permissions.ManageAdminMenu) .Action("List", "Menu", new { area = "OrchardCore.AdminMenu" }) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailAdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailAdminMenu.cs index 36521ef6956..560c7afcdfe 100644 --- a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailAdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailAdminMenu.cs @@ -23,7 +23,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Audit Trail"], NavigationConstants.AdminMenuAuditTrailPosition, audit => audit + .Add(S["Audit trail"], NavigationConstants.AdminMenuAuditTrailPosition, audit => audit .AddClass("audittrail").Id("audittrail") .Action(nameof(AdminController.Index), "Admin", new { area = "OrchardCore.AuditTrail", correlationId = "" }) .Permission(AuditTrailPermissions.ViewAuditTrail) diff --git a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailSettingsAdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailSettingsAdminMenu.cs index a5bc0883c26..eafaeed5992 100644 --- a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailSettingsAdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailSettingsAdminMenu.cs @@ -25,7 +25,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings - .Add(S["Audit Trail"], S["Audit Trail"].PrefixPosition(), settings => settings + .Add(S["Audit trail"], S["Audit trail"].PrefixPosition(), settings => settings .AddClass("audittrail").Id("audittrailSettings") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = AuditTrailSettingsGroup.Id }) .Permission(AuditTrailPermissions.ManageAuditTrailSettings) diff --git a/src/OrchardCore.Modules/OrchardCore.BackgroundTasks/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.BackgroundTasks/AdminMenu.cs index 552738b8453..8b1c1fbb3c2 100644 --- a/src/OrchardCore.Modules/OrchardCore.BackgroundTasks/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.BackgroundTasks/AdminMenu.cs @@ -24,7 +24,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Tasks"], S["Tasks"].PrefixPosition(), tasks => tasks - .Add(S["Background Tasks"], S["Background Tasks"].PrefixPosition(), backgroundTasks => backgroundTasks + .Add(S["Background tasks"], S["Background tasks"].PrefixPosition(), backgroundTasks => backgroundTasks .Action("Index", "BackgroundTask", new { area = "OrchardCore.BackgroundTasks" }) .Permission(Permissions.ManageBackgroundTasks) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs index 4d7353847b8..8ecd6b3953d 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs @@ -28,13 +28,13 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Localization"], localization => localization - .Add(S["Content Request Culture Provider"], S["Content Request Culture Provider"].PrefixPosition(), provider => provider + .Add(S["Content request culture provider"], S["Content request culture provider"].PrefixPosition(), provider => provider .AddClass("contentrequestcultureprovider").Id("contentrequestcultureprovider") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ContentRequestCultureProviderSettingsDriver.GroupId }) .Permission(Permissions.ManageContentCulturePicker) .LocalNav() ) - .Add(S["Content Culture Picker"], S["Content Culture Picker"].PrefixPosition(), picker => picker + .Add(S["Content culture picker"], S["Content culture picker"].PrefixPosition(), picker => picker .AddClass("contentculturepicker").Id("contentculturepicker") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ContentCulturePickerSettingsDriver.GroupId }) .Permission(Permissions.ManageContentCulturePicker) diff --git a/src/OrchardCore.Modules/OrchardCore.ContentTypes/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.ContentTypes/AdminMenu.cs index e9f2c4c7eb6..e9c3691d8fa 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentTypes/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentTypes/AdminMenu.cs @@ -27,13 +27,13 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Content"], content => content - .Add(S["Content Definition"], S["Content Definition"].PrefixPosition("9"), contentDefinition => contentDefinition - .Add(S["Content Types"], S["Content Types"].PrefixPosition("1"), contentTypes => contentTypes + .Add(S["Content definition"], S["Content definition"].PrefixPosition("9"), contentDefinition => contentDefinition + .Add(S["Content types"], S["Content types"].PrefixPosition("1"), contentTypes => contentTypes .Action(nameof(AdminController.List), adminControllerName, new { area = "OrchardCore.ContentTypes" }) .Permission(Permissions.ViewContentTypes) .LocalNav() ) - .Add(S["Content Parts"], S["Content Parts"].PrefixPosition("2"), contentParts => contentParts + .Add(S["Content parts"], S["Content parts"].PrefixPosition("2"), contentParts => contentParts .Action(nameof(AdminController.ListParts), adminControllerName, new { area = "OrchardCore.ContentTypes" }) .Permission(Permissions.ViewContentTypes) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Contents/AdminMenu.cs index 7d4a328e341..68dfcbecbcd 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/AdminMenu.cs @@ -59,7 +59,7 @@ public async Task BuildNavigationAsync(string name, NavigationBuilder builder) await builder.AddAsync(S["Content"], NavigationConstants.AdminMenuContentPosition, async content => { content.AddClass("content").Id("content"); - await content.AddAsync(S["Content Items"], S["Content Items"].PrefixPosition(), async contentItems => + await content.AddAsync(S["Content items"], S["Content items"].PrefixPosition(), async contentItems => { if (!await _authorizationService.AuthorizeContentTypeDefinitionsAsync(context.User, CommonPermissions.EditContent, contentTypes, _contentManager)) { diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ExportContentToDeploymentTarget/ExportContentToDeploymentTargetAdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ExportContentToDeploymentTarget/ExportContentToDeploymentTargetAdminMenu.cs index 58d5f0cec8e..9da323da02d 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ExportContentToDeploymentTarget/ExportContentToDeploymentTargetAdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ExportContentToDeploymentTarget/ExportContentToDeploymentTargetAdminMenu.cs @@ -25,7 +25,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Configuration"], configuration => configuration .Add(S["Import/Export"], S["Import/Export"].PrefixPosition(), import => import .Add(S["Settings"], settings => settings - .Add(S["Export Target Settings"], S["Export Target Settings"].PrefixPosition(), deployment => deployment + .Add(S["Export target settings"], S["Export target settings"].PrefixPosition(), deployment => deployment .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "ExportContentToDeploymentTarget" }) .Permission(OrchardCore.Deployment.CommonPermissions.ManageDeploymentPlan) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Demo/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Demo/AdminMenu.cs index ad3fa4e7838..0bc189dc6c6 100644 --- a/src/OrchardCore.Modules/OrchardCore.Demo/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Demo/AdminMenu.cs @@ -24,37 +24,37 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Demo"], "10", demo => demo .AddClass("demo").Id("demo") - .Add(S["This Menu Item 1"], "0", item => item - .Add(S["This is Menu Item 1.1"], subItem => subItem + .Add(S["This menu item 1"], "0", item => item + .Add(S["This is menu item 1.1"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) - .Add(S["This is Menu Item 1.2"], subItem => subItem + .Add(S["This is menu item 1.2"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) - .Add(S["This is Menu Item 1.2"], subItem => subItem + .Add(S["This is menu item 1.2"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) ) - .Add(S["This Menu Item 2"], "0", item => item + .Add(S["This menu item 2"], "0", item => item .Add(S["This is Menu Item 2.1"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) - .Add(S["This is Menu Item 2.2"], subItem => subItem + .Add(S["This is menu item 2.2"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) - .Add(S["This is Menu Item 3.2"], subItem => subItem + .Add(S["This is menu item 3.2"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) ) .Add(S["This Menu Item 3"], "0", item => item - .Add(S["This is Menu Item 3.1"], subItem => subItem + .Add(S["This is menu item 3.1"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) - .Add(S["This is Menu Item 3.2"], subItem => subItem + .Add(S["This is menu item 3.2"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) ) - .Add(S["Todo (Liquid - Frontend)"], "0", item => item + .Add(S["Todo (Liquid - frontend)"], "0", item => item .Action("Index", "Todo", new { area = "OrchardCore.Demo" }) ) ); diff --git a/src/OrchardCore.Modules/OrchardCore.Deployment.Remote/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Deployment.Remote/AdminMenu.cs index 3d31e1739e0..b8f8df69abf 100644 --- a/src/OrchardCore.Modules/OrchardCore.Deployment.Remote/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Deployment.Remote/AdminMenu.cs @@ -24,12 +24,12 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Import/Export"], import => import - .Add(S["Remote Instances"], S["Remote Instances"].PrefixPosition(), instances => instances + .Add(S["Remote instances"], S["Remote instances"].PrefixPosition(), instances => instances .Action("Index", "RemoteInstance", new { area = "OrchardCore.Deployment.Remote" }) .Permission(Permissions.ManageRemoteInstances) .LocalNav() ) - .Add(S["Remote Clients"], S["Remote Clients"].PrefixPosition(), clients => clients + .Add(S["Remote clients"], S["Remote clients"].PrefixPosition(), clients => clients .Action("Index", "RemoteClient", new { area = "OrchardCore.Deployment.Remote" }) .Permission(Permissions.ManageRemoteClients) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Deployment/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Deployment/AdminMenu.cs index 353b2484e42..6e54ac850ac 100644 --- a/src/OrchardCore.Modules/OrchardCore.Deployment/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Deployment/AdminMenu.cs @@ -24,17 +24,17 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Import/Export"], S["Import/Export"].PrefixPosition(), import => import - .Add(S["Deployment Plans"], S["Deployment Plans"].PrefixPosition(), deployment => deployment + .Add(S["Deployment plans"], S["Deployment plans"].PrefixPosition(), deployment => deployment .Action("Index", "DeploymentPlan", new { area = "OrchardCore.Deployment" }) .Permission(Permissions.Export) .LocalNav() ) - .Add(S["Package Import"], S["Package Import"].PrefixPosition(), deployment => deployment + .Add(S["Package import"], S["Package import"].PrefixPosition(), deployment => deployment .Action("Index", "Import", new { area = "OrchardCore.Deployment" }) .Permission(Permissions.Import) .LocalNav() ) - .Add(S["JSON Import"], S["JSON Import"].PrefixPosition(), deployment => deployment + .Add(S["JSON import"], S["JSON import"].PrefixPosition(), deployment => deployment .Action("Json", "Import", new { area = "OrchardCore.Deployment" }) .Permission(Permissions.Import) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs index bab8af36a41..d96aeb215d2 100644 --- a/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs @@ -25,7 +25,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings - .Add(S["Facebook App"], S["Facebook App"].PrefixPosition(), app => app + .Add(S["Facebook app"], S["Facebook app"].PrefixPosition(), app => app .AddClass("facebookApp").Id("facebookApp") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = FacebookConstants.Features.Core }) .Permission(Permissions.ManageFacebookApp) diff --git a/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs index 4726a77d523..1ffcf96aa6f 100644 --- a/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs @@ -26,12 +26,12 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Search"], NavigationConstants.AdminMenuSearchPosition, search => search .AddClass("search").Id("search") .Add(S["Indexing"], S["Indexing"].PrefixPosition(), indexing => indexing - .Add(S["Lucene Indices"], S["Lucene Indices"].PrefixPosition(), indexes => indexes + .Add(S["Lucene indices"], S["Lucene indices"].PrefixPosition(), indexes => indexes .Action("Index", "Admin", new { area = "OrchardCore.Lucene" }) .Permission(Permissions.ManageIndexes) .LocalNav() ) - .Add(S["Run Lucene Query"], S["Run Lucene Query"].PrefixPosition(), queries => queries + .Add(S["Run Lucene query"], S["Run Lucene query"].PrefixPosition(), queries => queries .Action("Query", "Admin", new { area = "OrchardCore.Lucene" }) .Permission(Permissions.ManageIndexes) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Media.Azure/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Media.Azure/AdminMenu.cs index 22184aa04d4..36c9c934763 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media.Azure/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media.Azure/AdminMenu.cs @@ -24,7 +24,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Media"], S["Media"].PrefixPosition(), media => media - .Add(S["Azure Blob Options"], S["Azure Blob Options"].PrefixPosition(), options => options + .Add(S["Azure Blob Storage options"], S["Azure Blob Storage options"].PrefixPosition(), options => options .Action("Options", "Admin", new { area = "OrchardCore.Media.Azure" }) .Permission(Permissions.ViewAzureMediaOptions) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs index 6a9c8547ce2..bd0eeaccef7 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs @@ -24,7 +24,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Content"], content => content .AddClass("media").Id("media") - .Add(S["Media Library"], S["Media Library"].PrefixPosition(), media => media + .Add(S["Media library"], S["Media library"].PrefixPosition(), media => media .Permission(Permissions.ManageMedia) .Action("Index", "Admin", new { area = "OrchardCore.Media" }) .LocalNav() @@ -34,12 +34,12 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Media"], S["Media"].PrefixPosition(), media => media - .Add(S["Media Options"], S["Media Options"].PrefixPosition(), options => options + .Add(S["Media options"], S["Media options"].PrefixPosition(), options => options .Action("Options", "Admin", new { area = "OrchardCore.Media" }) .Permission(Permissions.ViewMediaOptions) .LocalNav() ) - .Add(S["Media Profiles"], S["Media Profiles"].PrefixPosition(), mediaProfiles => mediaProfiles + .Add(S["Media profiles"], S["Media profiles"].PrefixPosition(), mediaProfiles => mediaProfiles .Action("Index", "MediaProfiles", new { area = "OrchardCore.Media" }) .Permission(Permissions.ManageMediaProfiles) .LocalNav() @@ -70,7 +70,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Media"], S["Media"].PrefixPosition(), media => media - .Add(S["Media Cache"], S["Media Cache"].PrefixPosition(), cache => cache + .Add(S["Media cache"], S["Media cache"].PrefixPosition(), cache => cache .Action("Index", "MediaCache", new { area = "OrchardCore.Media" }) .Permission(MediaCachePermissions.ManageAssetCache) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Queries/Sql/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Queries/Sql/AdminMenu.cs index f2f0d1a883b..47f10369757 100644 --- a/src/OrchardCore.Modules/OrchardCore.Queries/Sql/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Queries/Sql/AdminMenu.cs @@ -24,7 +24,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Search"], search => search .Add(S["Queries"], S["Queries"].PrefixPosition(), queries => queries - .Add(S["Run SQL Query"], S["Run SQL Query"].PrefixPosition(), sql => sql + .Add(S["Run SQL query"], S["Run SQL query"].PrefixPosition(), sql => sql .Action("Query", "Admin", new { area = "OrchardCore.Queries" }) .Permission(Permissions.ManageSqlQueries) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs index 071fc2d0111..60245ad0e19 100644 --- a/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs @@ -24,7 +24,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings - .Add(S["Reverse Proxy"], S["Reverse Proxy"].PrefixPosition(), proxy => proxy + .Add(S["Reverse proxy"], S["Reverse proxy"].PrefixPosition(), proxy => proxy .AddClass("reverseproxy").Id("reverseproxy") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "ReverseProxy" }) .Permission(Permissions.ManageReverseProxySettings) diff --git a/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs index ba15c7ae79d..07213f36602 100644 --- a/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs @@ -26,7 +26,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Security"], security => security.Id("security") - .Add(S["Security Headers"], S["Security Headers"].PrefixPosition(), headers => headers + .Add(S["Security headers"], S["Security headers"].PrefixPosition(), headers => headers .Permission(SecurityPermissions.ManageSecurityHeadersSettings) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = SecuritySettingsDisplayDriver.SettingsGroupId }) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Sitemaps/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Sitemaps/AdminMenu.cs index 312bf912c80..8351771e9e5 100644 --- a/src/OrchardCore.Modules/OrchardCore.Sitemaps/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Sitemaps/AdminMenu.cs @@ -29,11 +29,11 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Action("List", "Admin", new { area = "OrchardCore.Sitemaps" }) .LocalNav() ) - .Add(S["Sitemap Indexes"], S["Sitemap Indexes"].PrefixPosition("2"), sitemaps => sitemaps + .Add(S["Sitemap indexes"], S["Sitemap indexes"].PrefixPosition("2"), sitemaps => sitemaps .Action("List", "SitemapIndex", new { area = "OrchardCore.Sitemaps" }) .LocalNav() ) - .Add(S["Sitemaps Cache"], S["Sitemaps Cache"].PrefixPosition("3"), sitemaps => sitemaps + .Add(S["Sitemaps cache"], S["Sitemaps cache"].PrefixPosition("3"), sitemaps => sitemaps .Action("List", "SitemapCache", new { area = "OrchardCore.Sitemaps" }) .LocalNav() ) diff --git a/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs index da27b8ec6d1..f97335cadb5 100644 --- a/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs @@ -25,7 +25,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], "1", settings => settings - .Add(S["Taxonomy Filters"], S["Taxonomy Filters"].PrefixPosition(), filters => filters + .Add(S["Taxonomy filters"], S["Taxonomy filters"].PrefixPosition(), filters => filters .AddClass("taxonomyfilters").Id("taxonomyfilters") .Permission(Permissions.ManageTaxonomies) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = TaxonomyContentsAdminListSettingsDisplayDriver.GroupId }) diff --git a/src/OrchardCore.Modules/OrchardCore.Templates/AdminTemplatesAdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Templates/AdminTemplatesAdminMenu.cs index ae0a0e8e99e..8d7c34b803f 100644 --- a/src/OrchardCore.Modules/OrchardCore.Templates/AdminTemplatesAdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Templates/AdminTemplatesAdminMenu.cs @@ -23,7 +23,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Design"], design => design - .Add(S["Admin Templates"], S["Admin Templates"].PrefixPosition(), templates => templates + .Add(S["Admin templates"], S["Admin templates"].PrefixPosition(), templates => templates .Action("Admin", "Template", new { area = "OrchardCore.Templates" }) .Permission(AdminTemplatesPermissions.ManageAdminTemplates) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Tenants/FeatureProfilesAdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Tenants/FeatureProfilesAdminMenu.cs index 03d0dcf1297..10a4f15fa0d 100644 --- a/src/OrchardCore.Modules/OrchardCore.Tenants/FeatureProfilesAdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Tenants/FeatureProfilesAdminMenu.cs @@ -33,7 +33,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .AddClass("menu-configuration").Id("configuration") - .Add(S["Tenant Feature Profiles"], S["Tenant Feature Profiles"].PrefixPosition(), featureProfiles => featureProfiles + .Add(S["Tenant feature profiles"], S["Tenant feature profiles"].PrefixPosition(), featureProfiles => featureProfiles .Action("Index", "FeatureProfiles", new { area = "OrchardCore.Tenants" }) .Permission(Permissions.ManageTenantFeatureProfiles) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs index 7775b13620a..7bd1af3a97d 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs @@ -38,7 +38,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Configuration"], design => design .Add(S["Settings"], settings => settings .Add(S["Security"], security => security.Id("security") - .Add(S["User Login"], S["User Login"].PrefixPosition(), login => login + .Add(S["User login"], S["User login"].PrefixPosition(), login => login .Permission(Permissions.ManageUsers) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = LoginSettingsDisplayDriver.GroupId }) .LocalNav() @@ -72,7 +72,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Security"], security => security.Id("security") - .Add(S["User Change email"], S["User Change email"].PrefixPosition(), changeEmail => changeEmail + .Add(S["User change email"], S["User change email"].PrefixPosition(), changeEmail => changeEmail .Permission(Permissions.ManageUsers) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ChangeEmailSettingsDisplayDriver.GroupId }) .LocalNav() @@ -106,7 +106,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Security"], security => security.Id("security") - .Add(S["User Registration"], S["User Registration"].PrefixPosition(), registration => registration + .Add(S["User registration"], S["User registration"].PrefixPosition(), registration => registration .Permission(Permissions.ManageUsers) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = RegistrationSettingsDisplayDriver.GroupId }) .LocalNav() @@ -140,7 +140,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Security"], security => security.Id("security") - .Add(S["User Reset password"], S["User Reset password"].PrefixPosition(), password => password + .Add(S["User reset password"], S["User reset password"].PrefixPosition(), password => password .Permission(Permissions.ManageUsers) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ResetPasswordSettingsDisplayDriver.GroupId }) .LocalNav() From eb5570323760c4eb9a8810d55728cb2b26371034 Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Thu, 7 Jul 2022 15:33:11 -0700 Subject: [PATCH 5/6] Restore all menu utems to use current format (mix between Title and Sentence case) --- .../OrchardCore.AdminMenu/AdminMenu.cs | 2 +- .../Navigation/AuditTrailAdminMenu.cs | 2 +- .../Navigation/AuditTrailSettingsAdminMenu.cs | 2 +- .../OrchardCore.BackgroundTasks/AdminMenu.cs | 2 +- .../AdminMenu.cs | 4 ++-- .../OrchardCore.ContentTypes/AdminMenu.cs | 6 +++--- .../OrchardCore.Contents/AdminMenu.cs | 2 +- ...xportContentToDeploymentTargetAdminMenu.cs | 2 +- .../OrchardCore.Demo/AdminMenu.cs | 20 +++++++++---------- .../AdminMenu.cs | 4 ++-- .../OrchardCore.Deployment/AdminMenu.cs | 6 +++--- .../OrchardCore.Facebook/AdminMenu.cs | 2 +- .../OrchardCore.Lucene/AdminMenu.cs | 4 ++-- .../OrchardCore.Media.Azure/AdminMenu.cs | 2 +- .../OrchardCore.Media/AdminMenu.cs | 8 ++++---- .../OrchardCore.Queries/Sql/AdminMenu.cs | 2 +- .../OrchardCore.ReverseProxy/AdminMenu.cs | 2 +- .../OrchardCore.Security/AdminMenu.cs | 2 +- .../OrchardCore.Sitemaps/AdminMenu.cs | 4 ++-- .../OrchardCore.Taxonomies/AdminMenu.cs | 2 +- .../AdminTemplatesAdminMenu.cs | 2 +- .../FeatureProfilesAdminMenu.cs | 2 +- .../OrchardCore.Users/AdminMenu.cs | 8 ++++---- 23 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs index e09cfb5a0cb..827ae7903bb 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs @@ -27,7 +27,7 @@ public async Task BuildNavigationAsync(string name, NavigationBuilder builder) // Configuration and settings menus for the AdminMenu module builder.Add(S["Configuration"], configuration => configuration - .Add(S["Admin menus"], S["Admin menus"].PrefixPosition(), admin => admin + .Add(S["Admin Menus"], S["Admin menus"].PrefixPosition(), admin => admin .Permission(Permissions.ManageAdminMenu) .Action("List", "Menu", new { area = "OrchardCore.AdminMenu" }) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailAdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailAdminMenu.cs index 560c7afcdfe..36521ef6956 100644 --- a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailAdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailAdminMenu.cs @@ -23,7 +23,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) } builder - .Add(S["Audit trail"], NavigationConstants.AdminMenuAuditTrailPosition, audit => audit + .Add(S["Audit Trail"], NavigationConstants.AdminMenuAuditTrailPosition, audit => audit .AddClass("audittrail").Id("audittrail") .Action(nameof(AdminController.Index), "Admin", new { area = "OrchardCore.AuditTrail", correlationId = "" }) .Permission(AuditTrailPermissions.ViewAuditTrail) diff --git a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailSettingsAdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailSettingsAdminMenu.cs index eafaeed5992..a5bc0883c26 100644 --- a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailSettingsAdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Navigation/AuditTrailSettingsAdminMenu.cs @@ -25,7 +25,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings - .Add(S["Audit trail"], S["Audit trail"].PrefixPosition(), settings => settings + .Add(S["Audit Trail"], S["Audit Trail"].PrefixPosition(), settings => settings .AddClass("audittrail").Id("audittrailSettings") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = AuditTrailSettingsGroup.Id }) .Permission(AuditTrailPermissions.ManageAuditTrailSettings) diff --git a/src/OrchardCore.Modules/OrchardCore.BackgroundTasks/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.BackgroundTasks/AdminMenu.cs index 8b1c1fbb3c2..552738b8453 100644 --- a/src/OrchardCore.Modules/OrchardCore.BackgroundTasks/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.BackgroundTasks/AdminMenu.cs @@ -24,7 +24,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Tasks"], S["Tasks"].PrefixPosition(), tasks => tasks - .Add(S["Background tasks"], S["Background tasks"].PrefixPosition(), backgroundTasks => backgroundTasks + .Add(S["Background Tasks"], S["Background Tasks"].PrefixPosition(), backgroundTasks => backgroundTasks .Action("Index", "BackgroundTask", new { area = "OrchardCore.BackgroundTasks" }) .Permission(Permissions.ManageBackgroundTasks) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs index 8ecd6b3953d..4d7353847b8 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/AdminMenu.cs @@ -28,13 +28,13 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Localization"], localization => localization - .Add(S["Content request culture provider"], S["Content request culture provider"].PrefixPosition(), provider => provider + .Add(S["Content Request Culture Provider"], S["Content Request Culture Provider"].PrefixPosition(), provider => provider .AddClass("contentrequestcultureprovider").Id("contentrequestcultureprovider") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ContentRequestCultureProviderSettingsDriver.GroupId }) .Permission(Permissions.ManageContentCulturePicker) .LocalNav() ) - .Add(S["Content culture picker"], S["Content culture picker"].PrefixPosition(), picker => picker + .Add(S["Content Culture Picker"], S["Content Culture Picker"].PrefixPosition(), picker => picker .AddClass("contentculturepicker").Id("contentculturepicker") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ContentCulturePickerSettingsDriver.GroupId }) .Permission(Permissions.ManageContentCulturePicker) diff --git a/src/OrchardCore.Modules/OrchardCore.ContentTypes/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.ContentTypes/AdminMenu.cs index e9c3691d8fa..e9f2c4c7eb6 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentTypes/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentTypes/AdminMenu.cs @@ -27,13 +27,13 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Content"], content => content - .Add(S["Content definition"], S["Content definition"].PrefixPosition("9"), contentDefinition => contentDefinition - .Add(S["Content types"], S["Content types"].PrefixPosition("1"), contentTypes => contentTypes + .Add(S["Content Definition"], S["Content Definition"].PrefixPosition("9"), contentDefinition => contentDefinition + .Add(S["Content Types"], S["Content Types"].PrefixPosition("1"), contentTypes => contentTypes .Action(nameof(AdminController.List), adminControllerName, new { area = "OrchardCore.ContentTypes" }) .Permission(Permissions.ViewContentTypes) .LocalNav() ) - .Add(S["Content parts"], S["Content parts"].PrefixPosition("2"), contentParts => contentParts + .Add(S["Content Parts"], S["Content Parts"].PrefixPosition("2"), contentParts => contentParts .Action(nameof(AdminController.ListParts), adminControllerName, new { area = "OrchardCore.ContentTypes" }) .Permission(Permissions.ViewContentTypes) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Contents/AdminMenu.cs index 68dfcbecbcd..7d4a328e341 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/AdminMenu.cs @@ -59,7 +59,7 @@ public async Task BuildNavigationAsync(string name, NavigationBuilder builder) await builder.AddAsync(S["Content"], NavigationConstants.AdminMenuContentPosition, async content => { content.AddClass("content").Id("content"); - await content.AddAsync(S["Content items"], S["Content items"].PrefixPosition(), async contentItems => + await content.AddAsync(S["Content Items"], S["Content Items"].PrefixPosition(), async contentItems => { if (!await _authorizationService.AuthorizeContentTypeDefinitionsAsync(context.User, CommonPermissions.EditContent, contentTypes, _contentManager)) { diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ExportContentToDeploymentTarget/ExportContentToDeploymentTargetAdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ExportContentToDeploymentTarget/ExportContentToDeploymentTargetAdminMenu.cs index 9da323da02d..58d5f0cec8e 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ExportContentToDeploymentTarget/ExportContentToDeploymentTargetAdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ExportContentToDeploymentTarget/ExportContentToDeploymentTargetAdminMenu.cs @@ -25,7 +25,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Configuration"], configuration => configuration .Add(S["Import/Export"], S["Import/Export"].PrefixPosition(), import => import .Add(S["Settings"], settings => settings - .Add(S["Export target settings"], S["Export target settings"].PrefixPosition(), deployment => deployment + .Add(S["Export Target Settings"], S["Export Target Settings"].PrefixPosition(), deployment => deployment .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "ExportContentToDeploymentTarget" }) .Permission(OrchardCore.Deployment.CommonPermissions.ManageDeploymentPlan) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Demo/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Demo/AdminMenu.cs index 0bc189dc6c6..ad3fa4e7838 100644 --- a/src/OrchardCore.Modules/OrchardCore.Demo/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Demo/AdminMenu.cs @@ -24,37 +24,37 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Demo"], "10", demo => demo .AddClass("demo").Id("demo") - .Add(S["This menu item 1"], "0", item => item - .Add(S["This is menu item 1.1"], subItem => subItem + .Add(S["This Menu Item 1"], "0", item => item + .Add(S["This is Menu Item 1.1"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) - .Add(S["This is menu item 1.2"], subItem => subItem + .Add(S["This is Menu Item 1.2"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) - .Add(S["This is menu item 1.2"], subItem => subItem + .Add(S["This is Menu Item 1.2"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) ) - .Add(S["This menu item 2"], "0", item => item + .Add(S["This Menu Item 2"], "0", item => item .Add(S["This is Menu Item 2.1"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) - .Add(S["This is menu item 2.2"], subItem => subItem + .Add(S["This is Menu Item 2.2"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) - .Add(S["This is menu item 3.2"], subItem => subItem + .Add(S["This is Menu Item 3.2"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) ) .Add(S["This Menu Item 3"], "0", item => item - .Add(S["This is menu item 3.1"], subItem => subItem + .Add(S["This is Menu Item 3.1"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) - .Add(S["This is menu item 3.2"], subItem => subItem + .Add(S["This is Menu Item 3.2"], subItem => subItem .Action("Index", "Admin", new { area = "OrchardCore.Demo" }) ) ) - .Add(S["Todo (Liquid - frontend)"], "0", item => item + .Add(S["Todo (Liquid - Frontend)"], "0", item => item .Action("Index", "Todo", new { area = "OrchardCore.Demo" }) ) ); diff --git a/src/OrchardCore.Modules/OrchardCore.Deployment.Remote/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Deployment.Remote/AdminMenu.cs index b8f8df69abf..3d31e1739e0 100644 --- a/src/OrchardCore.Modules/OrchardCore.Deployment.Remote/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Deployment.Remote/AdminMenu.cs @@ -24,12 +24,12 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Import/Export"], import => import - .Add(S["Remote instances"], S["Remote instances"].PrefixPosition(), instances => instances + .Add(S["Remote Instances"], S["Remote Instances"].PrefixPosition(), instances => instances .Action("Index", "RemoteInstance", new { area = "OrchardCore.Deployment.Remote" }) .Permission(Permissions.ManageRemoteInstances) .LocalNav() ) - .Add(S["Remote clients"], S["Remote clients"].PrefixPosition(), clients => clients + .Add(S["Remote Clients"], S["Remote Clients"].PrefixPosition(), clients => clients .Action("Index", "RemoteClient", new { area = "OrchardCore.Deployment.Remote" }) .Permission(Permissions.ManageRemoteClients) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Deployment/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Deployment/AdminMenu.cs index 6e54ac850ac..353b2484e42 100644 --- a/src/OrchardCore.Modules/OrchardCore.Deployment/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Deployment/AdminMenu.cs @@ -24,17 +24,17 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Import/Export"], S["Import/Export"].PrefixPosition(), import => import - .Add(S["Deployment plans"], S["Deployment plans"].PrefixPosition(), deployment => deployment + .Add(S["Deployment Plans"], S["Deployment Plans"].PrefixPosition(), deployment => deployment .Action("Index", "DeploymentPlan", new { area = "OrchardCore.Deployment" }) .Permission(Permissions.Export) .LocalNav() ) - .Add(S["Package import"], S["Package import"].PrefixPosition(), deployment => deployment + .Add(S["Package Import"], S["Package Import"].PrefixPosition(), deployment => deployment .Action("Index", "Import", new { area = "OrchardCore.Deployment" }) .Permission(Permissions.Import) .LocalNav() ) - .Add(S["JSON import"], S["JSON import"].PrefixPosition(), deployment => deployment + .Add(S["JSON Import"], S["JSON Import"].PrefixPosition(), deployment => deployment .Action("Json", "Import", new { area = "OrchardCore.Deployment" }) .Permission(Permissions.Import) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs index d96aeb215d2..bab8af36a41 100644 --- a/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Facebook/AdminMenu.cs @@ -25,7 +25,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings - .Add(S["Facebook app"], S["Facebook app"].PrefixPosition(), app => app + .Add(S["Facebook App"], S["Facebook App"].PrefixPosition(), app => app .AddClass("facebookApp").Id("facebookApp") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = FacebookConstants.Features.Core }) .Permission(Permissions.ManageFacebookApp) diff --git a/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs index 1ffcf96aa6f..4726a77d523 100644 --- a/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs @@ -26,12 +26,12 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Search"], NavigationConstants.AdminMenuSearchPosition, search => search .AddClass("search").Id("search") .Add(S["Indexing"], S["Indexing"].PrefixPosition(), indexing => indexing - .Add(S["Lucene indices"], S["Lucene indices"].PrefixPosition(), indexes => indexes + .Add(S["Lucene Indices"], S["Lucene Indices"].PrefixPosition(), indexes => indexes .Action("Index", "Admin", new { area = "OrchardCore.Lucene" }) .Permission(Permissions.ManageIndexes) .LocalNav() ) - .Add(S["Run Lucene query"], S["Run Lucene query"].PrefixPosition(), queries => queries + .Add(S["Run Lucene Query"], S["Run Lucene Query"].PrefixPosition(), queries => queries .Action("Query", "Admin", new { area = "OrchardCore.Lucene" }) .Permission(Permissions.ManageIndexes) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Media.Azure/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Media.Azure/AdminMenu.cs index 36c9c934763..22184aa04d4 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media.Azure/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media.Azure/AdminMenu.cs @@ -24,7 +24,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Media"], S["Media"].PrefixPosition(), media => media - .Add(S["Azure Blob Storage options"], S["Azure Blob Storage options"].PrefixPosition(), options => options + .Add(S["Azure Blob Options"], S["Azure Blob Options"].PrefixPosition(), options => options .Action("Options", "Admin", new { area = "OrchardCore.Media.Azure" }) .Permission(Permissions.ViewAzureMediaOptions) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs index bd0eeaccef7..6a9c8547ce2 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media/AdminMenu.cs @@ -24,7 +24,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Content"], content => content .AddClass("media").Id("media") - .Add(S["Media library"], S["Media library"].PrefixPosition(), media => media + .Add(S["Media Library"], S["Media Library"].PrefixPosition(), media => media .Permission(Permissions.ManageMedia) .Action("Index", "Admin", new { area = "OrchardCore.Media" }) .LocalNav() @@ -34,12 +34,12 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Media"], S["Media"].PrefixPosition(), media => media - .Add(S["Media options"], S["Media options"].PrefixPosition(), options => options + .Add(S["Media Options"], S["Media Options"].PrefixPosition(), options => options .Action("Options", "Admin", new { area = "OrchardCore.Media" }) .Permission(Permissions.ViewMediaOptions) .LocalNav() ) - .Add(S["Media profiles"], S["Media profiles"].PrefixPosition(), mediaProfiles => mediaProfiles + .Add(S["Media Profiles"], S["Media Profiles"].PrefixPosition(), mediaProfiles => mediaProfiles .Action("Index", "MediaProfiles", new { area = "OrchardCore.Media" }) .Permission(Permissions.ManageMediaProfiles) .LocalNav() @@ -70,7 +70,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Media"], S["Media"].PrefixPosition(), media => media - .Add(S["Media cache"], S["Media cache"].PrefixPosition(), cache => cache + .Add(S["Media Cache"], S["Media Cache"].PrefixPosition(), cache => cache .Action("Index", "MediaCache", new { area = "OrchardCore.Media" }) .Permission(MediaCachePermissions.ManageAssetCache) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Queries/Sql/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Queries/Sql/AdminMenu.cs index 47f10369757..f2f0d1a883b 100644 --- a/src/OrchardCore.Modules/OrchardCore.Queries/Sql/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Queries/Sql/AdminMenu.cs @@ -24,7 +24,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Search"], search => search .Add(S["Queries"], S["Queries"].PrefixPosition(), queries => queries - .Add(S["Run SQL query"], S["Run SQL query"].PrefixPosition(), sql => sql + .Add(S["Run SQL Query"], S["Run SQL Query"].PrefixPosition(), sql => sql .Action("Query", "Admin", new { area = "OrchardCore.Queries" }) .Permission(Permissions.ManageSqlQueries) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs index 60245ad0e19..071fc2d0111 100644 --- a/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.ReverseProxy/AdminMenu.cs @@ -24,7 +24,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings - .Add(S["Reverse proxy"], S["Reverse proxy"].PrefixPosition(), proxy => proxy + .Add(S["Reverse Proxy"], S["Reverse Proxy"].PrefixPosition(), proxy => proxy .AddClass("reverseproxy").Id("reverseproxy") .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "ReverseProxy" }) .Permission(Permissions.ManageReverseProxySettings) diff --git a/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs index 07213f36602..ba15c7ae79d 100644 --- a/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Security/AdminMenu.cs @@ -26,7 +26,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Security"], security => security.Id("security") - .Add(S["Security headers"], S["Security headers"].PrefixPosition(), headers => headers + .Add(S["Security Headers"], S["Security Headers"].PrefixPosition(), headers => headers .Permission(SecurityPermissions.ManageSecurityHeadersSettings) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = SecuritySettingsDisplayDriver.SettingsGroupId }) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Sitemaps/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Sitemaps/AdminMenu.cs index 8351771e9e5..312bf912c80 100644 --- a/src/OrchardCore.Modules/OrchardCore.Sitemaps/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Sitemaps/AdminMenu.cs @@ -29,11 +29,11 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Action("List", "Admin", new { area = "OrchardCore.Sitemaps" }) .LocalNav() ) - .Add(S["Sitemap indexes"], S["Sitemap indexes"].PrefixPosition("2"), sitemaps => sitemaps + .Add(S["Sitemap Indexes"], S["Sitemap Indexes"].PrefixPosition("2"), sitemaps => sitemaps .Action("List", "SitemapIndex", new { area = "OrchardCore.Sitemaps" }) .LocalNav() ) - .Add(S["Sitemaps cache"], S["Sitemaps cache"].PrefixPosition("3"), sitemaps => sitemaps + .Add(S["Sitemaps Cache"], S["Sitemaps Cache"].PrefixPosition("3"), sitemaps => sitemaps .Action("List", "SitemapCache", new { area = "OrchardCore.Sitemaps" }) .LocalNav() ) diff --git a/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs index f97335cadb5..da27b8ec6d1 100644 --- a/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Taxonomies/AdminMenu.cs @@ -25,7 +25,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], "1", settings => settings - .Add(S["Taxonomy filters"], S["Taxonomy filters"].PrefixPosition(), filters => filters + .Add(S["Taxonomy Filters"], S["Taxonomy Filters"].PrefixPosition(), filters => filters .AddClass("taxonomyfilters").Id("taxonomyfilters") .Permission(Permissions.ManageTaxonomies) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = TaxonomyContentsAdminListSettingsDisplayDriver.GroupId }) diff --git a/src/OrchardCore.Modules/OrchardCore.Templates/AdminTemplatesAdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Templates/AdminTemplatesAdminMenu.cs index 8d7c34b803f..ae0a0e8e99e 100644 --- a/src/OrchardCore.Modules/OrchardCore.Templates/AdminTemplatesAdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Templates/AdminTemplatesAdminMenu.cs @@ -23,7 +23,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Design"], design => design - .Add(S["Admin templates"], S["Admin templates"].PrefixPosition(), templates => templates + .Add(S["Admin Templates"], S["Admin Templates"].PrefixPosition(), templates => templates .Action("Admin", "Template", new { area = "OrchardCore.Templates" }) .Permission(AdminTemplatesPermissions.ManageAdminTemplates) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Tenants/FeatureProfilesAdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Tenants/FeatureProfilesAdminMenu.cs index 10a4f15fa0d..03d0dcf1297 100644 --- a/src/OrchardCore.Modules/OrchardCore.Tenants/FeatureProfilesAdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Tenants/FeatureProfilesAdminMenu.cs @@ -33,7 +33,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Configuration"], configuration => configuration .AddClass("menu-configuration").Id("configuration") - .Add(S["Tenant feature profiles"], S["Tenant feature profiles"].PrefixPosition(), featureProfiles => featureProfiles + .Add(S["Tenant Feature Profiles"], S["Tenant Feature Profiles"].PrefixPosition(), featureProfiles => featureProfiles .Action("Index", "FeatureProfiles", new { area = "OrchardCore.Tenants" }) .Permission(Permissions.ManageTenantFeatureProfiles) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs index 7bd1af3a97d..7775b13620a 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs @@ -38,7 +38,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Configuration"], design => design .Add(S["Settings"], settings => settings .Add(S["Security"], security => security.Id("security") - .Add(S["User login"], S["User login"].PrefixPosition(), login => login + .Add(S["User Login"], S["User Login"].PrefixPosition(), login => login .Permission(Permissions.ManageUsers) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = LoginSettingsDisplayDriver.GroupId }) .LocalNav() @@ -72,7 +72,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Security"], security => security.Id("security") - .Add(S["User change email"], S["User change email"].PrefixPosition(), changeEmail => changeEmail + .Add(S["User Change email"], S["User Change email"].PrefixPosition(), changeEmail => changeEmail .Permission(Permissions.ManageUsers) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ChangeEmailSettingsDisplayDriver.GroupId }) .LocalNav() @@ -106,7 +106,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Security"], security => security.Id("security") - .Add(S["User registration"], S["User registration"].PrefixPosition(), registration => registration + .Add(S["User Registration"], S["User Registration"].PrefixPosition(), registration => registration .Permission(Permissions.ManageUsers) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = RegistrationSettingsDisplayDriver.GroupId }) .LocalNav() @@ -140,7 +140,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) .Add(S["Configuration"], configuration => configuration .Add(S["Settings"], settings => settings .Add(S["Security"], security => security.Id("security") - .Add(S["User reset password"], S["User reset password"].PrefixPosition(), password => password + .Add(S["User Reset password"], S["User Reset password"].PrefixPosition(), password => password .Permission(Permissions.ManageUsers) .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ResetPasswordSettingsDisplayDriver.GroupId }) .LocalNav() From ebc04fc5d85e8370ea042c7c93ffa7ca30faeea0 Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Thu, 7 Jul 2022 15:39:15 -0700 Subject: [PATCH 6/6] Restore Admin Menus title to previous format --- src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Queries/AdminMenu.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs index 827ae7903bb..a63e82e8e6a 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs @@ -27,7 +27,7 @@ public async Task BuildNavigationAsync(string name, NavigationBuilder builder) // Configuration and settings menus for the AdminMenu module builder.Add(S["Configuration"], configuration => configuration - .Add(S["Admin Menus"], S["Admin menus"].PrefixPosition(), admin => admin + .Add(S["Admin Menus"], S["Admin Menus"].PrefixPosition(), admin => admin .Permission(Permissions.ManageAdminMenu) .Action("List", "Menu", new { area = "OrchardCore.AdminMenu" }) .LocalNav() diff --git a/src/OrchardCore.Modules/OrchardCore.Queries/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.Queries/AdminMenu.cs index b7b938ab2c5..cef53711014 100644 --- a/src/OrchardCore.Modules/OrchardCore.Queries/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.Queries/AdminMenu.cs @@ -24,8 +24,8 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder) builder .Add(S["Search"], NavigationConstants.AdminMenuSearchPosition, search => search .AddClass("search").Id("search") - .Add(S["Queries"], S["Queries"].PrefixPosition(), contentItems => contentItems - .Add(S["All queries"], "1", queries => queries + .Add(S["Queries"], S["Queries"].PrefixPosition(), queries => queries + .Add(S["All queries"], "1", allQueries => allQueries .Action("Index", "Admin", new { area = "OrchardCore.Queries" }) .Permission(Permissions.ManageQueries) .LocalNav()