From ca298082c42d79e23587adaf02e5a571e055b080 Mon Sep 17 00:00:00 2001 From: Jasmin Savard Date: Fri, 21 Dec 2018 20:38:01 -0500 Subject: [PATCH 1/4] (wip) first commit --- OrchardCore.sln | 4 +- mkdocs.yml | 2 +- .../AdminMenu.cs | 8 ++-- .../AdminNodes/LinkAdminNode.cs | 4 +- .../AdminNodes/LinkAdminNodeDriver.cs | 8 ++-- .../LinkAdminNodeNavigationBuilder.cs | 8 ++-- .../AdminNodes/LinkAdminNodeViewModel.cs | 2 +- .../AdminNodes/PlaceholderAdminNode.cs | 4 +- .../AdminNodes/PlaceholderAdminNodeDriver.cs | 8 ++-- .../PlaceholderAdminNodeNavigationBuilder.cs | 8 ++-- .../PlaceholderAdminNodeViewModel.cs | 2 +- .../Assets.json | 0 .../Assets/js/AdminNodeIconPicker.js | 0 .../Assets/js/fontawesome-iconpicker.js | 0 .../Assets/js/jquery.mjs.nestedSortable.js | 0 .../Assets/js/resizeTableBody.js | 0 .../Assets/scss/admin-trees-icon-picker.scss | 0 .../Assets/scss/admin-trees.scss | 0 .../Assets/scss/fontawesome-iconpicker.css | 0 .../Controllers/NodeController.cs | 40 ++++++++-------- .../Controllers/TreeController.cs | 32 ++++++------- .../Deployment/AdminTreesDeploymentSource.cs | 18 ++++---- .../Deployment/AdminTreesDeploymentStep.cs | 15 ++++++ .../AdminTreesDeploymentStepDriver.cs | 23 ++++++++++ .../Manifest.cs | 4 +- .../Models/AdminTree.cs | 2 +- .../Models/AdminTreeList.cs | 6 +-- .../Models/TreeNode.cs | 0 .../OrchardCore.AdminMenu.csproj} | 2 +- .../Permissions.cs | 2 +- .../README.md | 4 +- .../Recipes/AdminTreeStep.cs | 20 ++++---- ...AdminTreeNavigationProvidersCoordinator.cs | 12 ++--- .../Services/AdminTreeService.cs | 46 +++++++++---------- .../Services/IAdminTreeService.cs | 6 +-- .../Startup.cs | 20 ++++---- .../ViewModels/AdminNodeEditViewModel.cs | 4 +- .../ViewModels/AdminNodeListViewModel.cs | 4 +- .../ViewModels/AdminTreeCreateViewModel.cs | 2 +- .../ViewModels/AdminTreeEditViewModel.cs | 2 +- .../ViewModels/AdminTreeListOptions.cs | 2 +- .../ViewModels/AdminTreeListViewModel.cs | 6 +-- ...dminTreesDeploymentStep.Fields.Edit.cshtml | 3 ++ ...nTreesDeploymentStep.Fields.Summary.cshtml | 2 +- ...reesDeploymentStep.Fields.Thumbnail.cshtml | 2 +- .../LinkAdminNode.Fields.TreeEdit.cshtml | 8 ++-- .../LinkAdminNode.Fields.TreeSummary.cshtml | 0 .../LinkAdminNode.Fields.TreeThumbnail.cshtml | 0 ...laceholderAdminNode.Fields.TreeEdit.cshtml | 8 ++-- ...eholderAdminNode.Fields.TreeSummary.cshtml | 0 ...olderAdminNode.Fields.TreeThumbnail.cshtml | 0 .../Views/MenuItem.TreeSummary.cshtml | 0 .../Views/MenuItem.TreeThumbnail.cshtml | 0 .../Views/Node/Create.cshtml | 0 .../Views/Node/Edit.cshtml | 0 .../Views/Node/List.cshtml | 6 +-- .../Views/Tree/Create.cshtml | 2 +- .../Views/Tree/Edit.cshtml | 4 +- .../Views/Tree/List.cshtml | 12 ++--- .../Views/_ViewImports.cshtml | 10 ++-- .../Scripts/admin-trees-icon-picker.js | 0 .../Scripts/admin-trees-icon-picker.min.js | 0 .../wwwroot/Scripts/admin-trees.js | 0 .../wwwroot/Scripts/admin-trees.min.js | 0 .../Styles/admin-trees-icon-picker.css | 0 .../Styles/admin-trees-icon-picker.min.css | 0 .../wwwroot/Styles/admin-trees.css | 0 .../wwwroot/Styles/admin-trees.min.css | 0 .../Deployment/AdminTreesDeploymentStep.cs | 15 ------ .../AdminTreesDeploymentStepDriver.cs | 23 ---------- ...dminTreesDeploymentStep.Fields.Edit.cshtml | 3 -- .../AdminNodes/ContentTypesAdminNode.cs | 2 +- .../ContentTypesAdminNodeNavigationBuilder.cs | 2 +- .../OrchardCore.Contents.csproj | 2 +- .../OrchardCore.Contents/Startup.cs | 6 +-- ...ntentTypesAdminNode.Fields.TreeEdit.cshtml | 4 +- .../AdminNodes/ListsAdminNode.cs | 2 +- .../ListsAdminNodeNavigationBuilder.cs | 2 +- .../OrchardCore.Lists.csproj | 2 +- .../OrchardCore.Lists/Startup.cs | 6 +-- .../ListsAdminNode.Fields.TreeEdit.cshtml | 4 +- .../TheBlogTheme/Recipes/blog.recipe.json | 14 +++--- .../Models/AdminNode.cs | 2 +- ...OrchardCore.AdminMenu.Abstractions.csproj} | 2 +- .../Services/IAdminNodeNavigationBuilder.cs | 2 +- .../Services/IAdminNodeProviderFactory.cs | 4 +- ...OrchardCore.Application.Cms.Targets.csproj | 2 +- 87 files changed, 243 insertions(+), 243 deletions(-) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/AdminMenu.cs (89%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/AdminNodes/LinkAdminNode.cs (78%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/AdminNodes/LinkAdminNodeDriver.cs (90%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/AdminNodes/LinkAdminNodeNavigationBuilder.cs (94%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/AdminNodes/LinkAdminNodeViewModel.cs (86%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/AdminNodes/PlaceholderAdminNode.cs (75%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/AdminNodes/PlaceholderAdminNodeDriver.cs (90%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/AdminNodes/PlaceholderAdminNodeNavigationBuilder.cs (93%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/AdminNodes/PlaceholderAdminNodeViewModel.cs (83%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Assets.json (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Assets/js/AdminNodeIconPicker.js (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Assets/js/fontawesome-iconpicker.js (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Assets/js/jquery.mjs.nestedSortable.js (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Assets/js/resizeTableBody.js (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Assets/scss/admin-trees-icon-picker.scss (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Assets/scss/admin-trees.scss (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Assets/scss/fontawesome-iconpicker.css (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Controllers/NodeController.cs (89%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Controllers/TreeController.cs (87%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Deployment/AdminTreesDeploymentSource.cs (61%) create mode 100644 src/OrchardCore.Modules/OrchardCore.AdminMenu/Deployment/AdminTreesDeploymentStep.cs create mode 100644 src/OrchardCore.Modules/OrchardCore.AdminMenu/Deployment/AdminTreesDeploymentStepDriver.cs rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Manifest.cs (64%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Models/AdminTree.cs (98%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Models/AdminTreeList.cs (52%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Models/TreeNode.cs (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees/OrchardCore.AdminTrees.csproj => OrchardCore.AdminMenu/OrchardCore.AdminMenu.csproj} (95%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Permissions.cs (95%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/README.md (97%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Recipes/AdminTreeStep.cs (60%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Services/AdminTreeNavigationProvidersCoordinator.cs (88%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Services/AdminTreeService.cs (67%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Services/IAdminTreeService.cs (90%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Startup.cs (79%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/ViewModels/AdminNodeEditViewModel.cs (85%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/ViewModels/AdminNodeListViewModel.cs (74%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/ViewModels/AdminTreeCreateViewModel.cs (78%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/ViewModels/AdminTreeEditViewModel.cs (82%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/ViewModels/AdminTreeListOptions.cs (78%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/ViewModels/AdminTreeListViewModel.cs (71%) create mode 100644 src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/AdminTreesDeploymentStep.Fields.Edit.cshtml rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/Items/AdminTreesDeploymentStep.Fields.Summary.cshtml (66%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/Items/AdminTreesDeploymentStep.Fields.Thumbnail.cshtml (64%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/Items/LinkAdminNode.Fields.TreeEdit.cshtml (89%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/Items/LinkAdminNode.Fields.TreeSummary.cshtml (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/Items/LinkAdminNode.Fields.TreeThumbnail.cshtml (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/Items/PlaceholderAdminNode.Fields.TreeEdit.cshtml (88%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/Items/PlaceholderAdminNode.Fields.TreeSummary.cshtml (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/Items/PlaceholderAdminNode.Fields.TreeThumbnail.cshtml (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/MenuItem.TreeSummary.cshtml (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/MenuItem.TreeThumbnail.cshtml (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/Node/Create.cshtml (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/Node/Edit.cshtml (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/Node/List.cshtml (94%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/Tree/Create.cshtml (91%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/Tree/Edit.cshtml (80%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/Tree/List.cshtml (85%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/Views/_ViewImports.cshtml (65%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/wwwroot/Scripts/admin-trees-icon-picker.js (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/wwwroot/Scripts/admin-trees-icon-picker.min.js (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/wwwroot/Scripts/admin-trees.js (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/wwwroot/Scripts/admin-trees.min.js (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/wwwroot/Styles/admin-trees-icon-picker.css (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/wwwroot/Styles/admin-trees-icon-picker.min.css (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/wwwroot/Styles/admin-trees.css (100%) rename src/OrchardCore.Modules/{OrchardCore.AdminTrees => OrchardCore.AdminMenu}/wwwroot/Styles/admin-trees.min.css (100%) delete mode 100644 src/OrchardCore.Modules/OrchardCore.AdminTrees/Deployment/AdminTreesDeploymentStep.cs delete mode 100644 src/OrchardCore.Modules/OrchardCore.AdminTrees/Deployment/AdminTreesDeploymentStepDriver.cs delete mode 100644 src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/AdminTreesDeploymentStep.Fields.Edit.cshtml rename src/OrchardCore/{OrchardCore.AdminTrees.Abstractions => OrchardCore.AdminMenu.Abstractions}/Models/AdminNode.cs (98%) rename src/OrchardCore/{OrchardCore.AdminTrees.Abstractions/OrchardCore.AdminTrees.Abstractions.csproj => OrchardCore.AdminMenu.Abstractions/OrchardCore.AdminMenu.Abstractions.csproj} (90%) rename src/OrchardCore/{OrchardCore.AdminTrees.Abstractions => OrchardCore.AdminMenu.Abstractions}/Services/IAdminNodeNavigationBuilder.cs (92%) rename src/OrchardCore/{OrchardCore.AdminTrees.Abstractions => OrchardCore.AdminMenu.Abstractions}/Services/IAdminNodeProviderFactory.cs (87%) diff --git a/OrchardCore.sln b/OrchardCore.sln index f9db38f95c7..9f45fbab3e4 100644 --- a/OrchardCore.sln +++ b/OrchardCore.sln @@ -355,9 +355,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.ContentManageme EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.ReverseProxy", "src\OrchardCore.Modules\OrchardCore.ReverseProxy\OrchardCore.ReverseProxy.csproj", "{76871CE0-43F9-49D3-AAAB-4A8510F76447}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.AdminTrees.Abstractions", "src\OrchardCore\OrchardCore.AdminTrees.Abstractions\OrchardCore.AdminTrees.Abstractions.csproj", "{3850142E-FA8B-4C26-A4BA-542928D4DF35}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.AdminMenu.Abstractions", "src\OrchardCore\OrchardCore.AdminMenu.Abstractions\OrchardCore.AdminMenu.Abstractions.csproj", "{3850142E-FA8B-4C26-A4BA-542928D4DF35}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.AdminTrees", "src\OrchardCore.Modules\OrchardCore.AdminTrees\OrchardCore.AdminTrees.csproj", "{9B11A694-BD8F-47F0-AF0C-BC7E11579DC4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.AdminMenu", "src\OrchardCore.Modules\OrchardCore.AdminMenu\OrchardCore.AdminMenu.csproj", "{9B11A694-BD8F-47F0-AF0C-BC7E11579DC4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Microsoft.Authentication", "src\OrchardCore.Modules\OrchardCore.Microsoft.Authentication\OrchardCore.Microsoft.Authentication.csproj", "{6B15CC95-04C7-42A4-96A5-F98664242069}" EndProject diff --git a/mkdocs.yml b/mkdocs.yml index 11d84918b4b..ce14632af75 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -59,7 +59,7 @@ nav: - Widgets: OrchardCore.Modules/OrchardCore.Widgets/README.md - Flows: OrchardCore.Modules/OrchardCore.Flows/README.md - Forms: OrchardCore.Modules/OrchardCore.Forms/README.md - - Admin Trees: OrchardCore.Modules/OrchardCore.AdminTrees/README.md + - Admin Trees: OrchardCore.Modules/OrchardCore.AdminMenu/README.md - Core Modules: - Dynamic Cache: OrchardCore.Modules/OrchardCore.DynamicCache/README.md - GraphQL: OrchardCore.Modules/OrchardCore.Apis.GraphQL/README.md diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminMenu.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs similarity index 89% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminMenu.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs index 8936f29b403..240bcbcb749 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminMenu.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminMenu.cs @@ -1,10 +1,10 @@ using System; using System.Threading.Tasks; using Microsoft.Extensions.Localization; -using OrchardCore.AdminTrees.Services; +using OrchardCore.AdminMenu.Services; using OrchardCore.Navigation; -namespace OrchardCore.AdminTrees +namespace OrchardCore.AdminMenu { public class AdminMenu : INavigationProvider { @@ -28,9 +28,9 @@ public async Task BuildNavigationAsync(string name, NavigationBuilder builder) // Configuration and settings menus for the AdminTree module builder.Add(S["Configuration"], cfg => cfg - .Add(S["Admin Trees"], "1.5", admt => admt + .Add(S["Admin Menus"], "1.5", admt => admt .Permission(Permissions.ManageAdminTree) - .Action("List", "Tree", new { area = "OrchardCore.AdminTrees" }) + .Action("List", "Tree", new { area = "OrchardCore.AdminMenu" }) .LocalNav() )); diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/LinkAdminNode.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/LinkAdminNode.cs similarity index 78% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/LinkAdminNode.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/LinkAdminNode.cs index d9e433f0523..010374232ad 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/LinkAdminNode.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/LinkAdminNode.cs @@ -1,8 +1,8 @@ using System.ComponentModel.DataAnnotations; using Newtonsoft.Json; -using OrchardCore.AdminTrees.Models; +using OrchardCore.AdminMenu.Models; -namespace OrchardCore.AdminTrees.AdminNodes +namespace OrchardCore.AdminMenu.AdminNodes { public class LinkAdminNode : AdminNode { diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/LinkAdminNodeDriver.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/LinkAdminNodeDriver.cs similarity index 90% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/LinkAdminNodeDriver.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/LinkAdminNodeDriver.cs index 1a01ff99ff0..59d741cfc20 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/LinkAdminNodeDriver.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/LinkAdminNodeDriver.cs @@ -2,15 +2,15 @@ using System.Collections.Generic; using System.Text; using System.Threading.Tasks; -using OrchardCore.AdminTrees.Models; -using OrchardCore.AdminTrees.AdminNodes; -using OrchardCore.AdminTrees.ViewModels; +using OrchardCore.AdminMenu.Models; +using OrchardCore.AdminMenu.AdminNodes; +using OrchardCore.AdminMenu.ViewModels; using OrchardCore.DisplayManagement.Handlers; using OrchardCore.DisplayManagement.ModelBinding; using OrchardCore.DisplayManagement.Views; using OrchardCore.Navigation; -namespace OrchardCore.AdminTrees.AdminNodes +namespace OrchardCore.AdminMenu.AdminNodes { public class LinkAdminNodeDriver : DisplayDriver { diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/LinkAdminNodeNavigationBuilder.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/LinkAdminNodeNavigationBuilder.cs similarity index 94% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/LinkAdminNodeNavigationBuilder.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/LinkAdminNodeNavigationBuilder.cs index 5f70334ed82..55c591c538c 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/LinkAdminNodeNavigationBuilder.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/LinkAdminNodeNavigationBuilder.cs @@ -4,13 +4,13 @@ using System.Text; using Microsoft.Extensions.Localization; using Microsoft.Extensions.Logging; -using OrchardCore.AdminTrees.Models; -using OrchardCore.AdminTrees.Services; -using OrchardCore.AdminTrees.AdminNodes; +using OrchardCore.AdminMenu.Models; +using OrchardCore.AdminMenu.Services; +using OrchardCore.AdminMenu.AdminNodes; using OrchardCore.Navigation; using System.Threading.Tasks; -namespace OrchardCore.AdminTrees.AdminNodes +namespace OrchardCore.AdminMenu.AdminNodes { public class LinkAdminNodeNavigationBuilder : IAdminNodeNavigationBuilder { diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/LinkAdminNodeViewModel.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/LinkAdminNodeViewModel.cs similarity index 86% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/LinkAdminNodeViewModel.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/LinkAdminNodeViewModel.cs index c9c1fa4250b..650f525bddd 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/LinkAdminNodeViewModel.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/LinkAdminNodeViewModel.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace OrchardCore.AdminTrees.AdminNodes +namespace OrchardCore.AdminMenu.AdminNodes { public class LinkAdminNodeViewModel { diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/PlaceholderAdminNode.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/PlaceholderAdminNode.cs similarity index 75% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/PlaceholderAdminNode.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/PlaceholderAdminNode.cs index 038c9a0c9d2..17c64201124 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/PlaceholderAdminNode.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/PlaceholderAdminNode.cs @@ -1,8 +1,8 @@ using System.ComponentModel.DataAnnotations; using Newtonsoft.Json; -using OrchardCore.AdminTrees.Models; +using OrchardCore.AdminMenu.Models; -namespace OrchardCore.AdminTrees.AdminNodes +namespace OrchardCore.AdminMenu.AdminNodes { public class PlaceholderAdminNode : AdminNode { diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/PlaceholderAdminNodeDriver.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/PlaceholderAdminNodeDriver.cs similarity index 90% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/PlaceholderAdminNodeDriver.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/PlaceholderAdminNodeDriver.cs index cfd2b499777..b20b7e25b63 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/PlaceholderAdminNodeDriver.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/PlaceholderAdminNodeDriver.cs @@ -2,15 +2,15 @@ using System.Collections.Generic; using System.Text; using System.Threading.Tasks; -using OrchardCore.AdminTrees.Models; -using OrchardCore.AdminTrees.AdminNodes; -using OrchardCore.AdminTrees.ViewModels; +using OrchardCore.AdminMenu.Models; +using OrchardCore.AdminMenu.AdminNodes; +using OrchardCore.AdminMenu.ViewModels; using OrchardCore.DisplayManagement.Handlers; using OrchardCore.DisplayManagement.ModelBinding; using OrchardCore.DisplayManagement.Views; using OrchardCore.Navigation; -namespace OrchardCore.AdminTrees.AdminNodes +namespace OrchardCore.AdminMenu.AdminNodes { public class PlaceholderAdminNodeDriver : DisplayDriver { diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/PlaceholderAdminNodeNavigationBuilder.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/PlaceholderAdminNodeNavigationBuilder.cs similarity index 93% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/PlaceholderAdminNodeNavigationBuilder.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/PlaceholderAdminNodeNavigationBuilder.cs index 3ff75ab475a..7582fc0fa8b 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/PlaceholderAdminNodeNavigationBuilder.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/PlaceholderAdminNodeNavigationBuilder.cs @@ -4,13 +4,13 @@ using System.Text; using Microsoft.Extensions.Localization; using Microsoft.Extensions.Logging; -using OrchardCore.AdminTrees.Models; -using OrchardCore.AdminTrees.Services; -using OrchardCore.AdminTrees.AdminNodes; +using OrchardCore.AdminMenu.Models; +using OrchardCore.AdminMenu.Services; +using OrchardCore.AdminMenu.AdminNodes; using OrchardCore.Navigation; using System.Threading.Tasks; -namespace OrchardCore.AdminTrees.AdminNodes +namespace OrchardCore.AdminMenu.AdminNodes { public class PlaceholderAdminNodeNavigationBuilder : IAdminNodeNavigationBuilder { diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/PlaceholderAdminNodeViewModel.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/PlaceholderAdminNodeViewModel.cs similarity index 83% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/PlaceholderAdminNodeViewModel.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/PlaceholderAdminNodeViewModel.cs index 03834b97505..0e79a5eb635 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/AdminNodes/PlaceholderAdminNodeViewModel.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/AdminNodes/PlaceholderAdminNodeViewModel.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace OrchardCore.AdminTrees.AdminNodes +namespace OrchardCore.AdminMenu.AdminNodes { public class PlaceholderAdminNodeViewModel { diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets.json b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets.json similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets.json rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets.json diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets/js/AdminNodeIconPicker.js b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets/js/AdminNodeIconPicker.js similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets/js/AdminNodeIconPicker.js rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets/js/AdminNodeIconPicker.js diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets/js/fontawesome-iconpicker.js b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets/js/fontawesome-iconpicker.js similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets/js/fontawesome-iconpicker.js rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets/js/fontawesome-iconpicker.js diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets/js/jquery.mjs.nestedSortable.js b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets/js/jquery.mjs.nestedSortable.js similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets/js/jquery.mjs.nestedSortable.js rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets/js/jquery.mjs.nestedSortable.js diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets/js/resizeTableBody.js b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets/js/resizeTableBody.js similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets/js/resizeTableBody.js rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets/js/resizeTableBody.js diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets/scss/admin-trees-icon-picker.scss b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets/scss/admin-trees-icon-picker.scss similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets/scss/admin-trees-icon-picker.scss rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets/scss/admin-trees-icon-picker.scss diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets/scss/admin-trees.scss b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets/scss/admin-trees.scss similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets/scss/admin-trees.scss rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets/scss/admin-trees.scss diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets/scss/fontawesome-iconpicker.css b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets/scss/fontawesome-iconpicker.css similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Assets/scss/fontawesome-iconpicker.css rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Assets/scss/fontawesome-iconpicker.css diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Controllers/NodeController.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Controllers/NodeController.cs similarity index 89% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Controllers/NodeController.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Controllers/NodeController.cs index e162345ea06..3eb963b1120 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Controllers/NodeController.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Controllers/NodeController.cs @@ -7,9 +7,9 @@ using Microsoft.AspNetCore.Mvc.Localization; using Microsoft.Extensions.Localization; using OrchardCore.Admin; -using OrchardCore.AdminTrees.Models; -using OrchardCore.AdminTrees.Services; -using OrchardCore.AdminTrees.ViewModels; +using OrchardCore.AdminMenu.Models; +using OrchardCore.AdminMenu.Services; +using OrchardCore.AdminMenu.ViewModels; using OrchardCore.DisplayManagement; using OrchardCore.DisplayManagement.ModelBinding; using OrchardCore.DisplayManagement.Notify; @@ -17,7 +17,7 @@ using OrchardCore.Settings; using YesSql; -namespace OrchardCore.AdminTrees.Controllers +namespace OrchardCore.AdminMenu.Controllers { [Admin] public class NodeController : Controller, IUpdateModel @@ -25,14 +25,14 @@ public class NodeController : Controller, IUpdateModel private readonly IAuthorizationService _authorizationService; private readonly IDisplayManager _displayManager; private readonly IEnumerable _factories; - private readonly IAdminTreeService _adminTreeService; + private readonly IAdminMenuervice _AdminMenuervice; private readonly INotifier _notifier; public NodeController( IAuthorizationService authorizationService, IDisplayManager displayManager, IEnumerable factories, - IAdminTreeService adminTreeService, + IAdminMenuervice AdminMenuervice, IShapeFactory shapeFactory, IStringLocalizer stringLocalizer, IHtmlLocalizer htmlLocalizer, @@ -40,7 +40,7 @@ public NodeController( { _displayManager = displayManager; _factories = factories; - _adminTreeService = adminTreeService; + _AdminMenuervice = AdminMenuervice; _authorizationService = authorizationService; New = shapeFactory; @@ -61,7 +61,7 @@ public async Task List(string id) return Unauthorized(); } - var tree = await _adminTreeService.GetByIdAsync(id); + var tree = await _AdminMenuervice.GetByIdAsync(id); if (tree == null) { @@ -98,7 +98,7 @@ public async Task Create(string id, string type) return Unauthorized(); } - var tree = await _adminTreeService.GetByIdAsync(id); + var tree = await _AdminMenuervice.GetByIdAsync(id); if (tree == null) { @@ -132,7 +132,7 @@ public async Task Create(AdminNodeEditViewModel model) return Unauthorized(); } - var tree = await _adminTreeService.GetByIdAsync(model.AdminTreeId); + var tree = await _AdminMenuervice.GetByIdAsync(model.AdminTreeId); if (tree == null) { @@ -153,7 +153,7 @@ public async Task Create(AdminNodeEditViewModel model) { treeNode.UniqueId = model.AdminNodeId; tree.MenuItems.Add(treeNode); - await _adminTreeService.SaveAsync(tree); + await _AdminMenuervice.SaveAsync(tree); _notifier.Success(H["Admin node added successfully"]); return RedirectToAction("List", new { id = model.AdminTreeId }); @@ -172,7 +172,7 @@ public async Task Edit(string id, string treeNodeId) return Unauthorized(); } - var tree = await _adminTreeService.GetByIdAsync(id); + var tree = await _AdminMenuervice.GetByIdAsync(id); if (tree == null) { @@ -210,7 +210,7 @@ public async Task Edit(AdminNodeEditViewModel model) return Unauthorized(); } - var tree = await _adminTreeService.GetByIdAsync(model.AdminTreeId); + var tree = await _AdminMenuervice.GetByIdAsync(model.AdminTreeId); if (tree == null) { @@ -231,7 +231,7 @@ public async Task Edit(AdminNodeEditViewModel model) treeNode.Priority = model.Priority; treeNode.Position = model.Position; - await _adminTreeService.SaveAsync(tree); + await _AdminMenuervice.SaveAsync(tree); _notifier.Success(H["Admin node updated successfully"]); return RedirectToAction(nameof(List), new { id = model.AdminTreeId }); @@ -252,7 +252,7 @@ public async Task Delete(string id, string treeNodeId) return Unauthorized(); } - var tree = await _adminTreeService.GetByIdAsync(id); + var tree = await _AdminMenuervice.GetByIdAsync(id); if (tree == null) { @@ -271,7 +271,7 @@ public async Task Delete(string id, string treeNodeId) return new StatusCodeResult(500); } - await _adminTreeService.SaveAsync(tree); + await _AdminMenuervice.SaveAsync(tree); _notifier.Success(H["Admin node deleted successfully"]); @@ -286,7 +286,7 @@ public async Task Toggle(string id, string treeNodeId) return Unauthorized(); } - var tree = await _adminTreeService.GetByIdAsync(id); + var tree = await _AdminMenuervice.GetByIdAsync(id); if (tree == null) { @@ -302,7 +302,7 @@ public async Task Toggle(string id, string treeNodeId) treeNode.Enabled = !treeNode.Enabled; - await _adminTreeService.SaveAsync(tree); + await _AdminMenuervice.SaveAsync(tree); _notifier.Success(H["Admin node toggled successfully"]); @@ -319,7 +319,7 @@ public async Task MoveNode(string treeId, string nodeToMoveId, return Unauthorized(); } - var tree = await _adminTreeService.GetByIdAsync(treeId); + var tree = await _AdminMenuervice.GetByIdAsync(treeId); if ((tree == null) || (tree.MenuItems == null)) { @@ -345,7 +345,7 @@ public async Task MoveNode(string treeId, string nodeToMoveId, return StatusCode(500); } - await _adminTreeService.SaveAsync(tree); + await _AdminMenuervice.SaveAsync(tree); return Ok(); } diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Controllers/TreeController.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Controllers/TreeController.cs similarity index 87% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Controllers/TreeController.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Controllers/TreeController.cs index 4faa689b1df..7ad9be7351c 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Controllers/TreeController.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Controllers/TreeController.cs @@ -9,8 +9,8 @@ using Microsoft.Extensions.Localization; using Microsoft.Extensions.Logging; using OrchardCore.Admin; -using OrchardCore.AdminTrees.Models; -using OrchardCore.AdminTrees.ViewModels; +using OrchardCore.AdminMenu.Models; +using OrchardCore.AdminMenu.ViewModels; using OrchardCore.DisplayManagement; using OrchardCore.DisplayManagement.ModelBinding; using OrchardCore.DisplayManagement.Notify; @@ -18,19 +18,19 @@ using OrchardCore.Settings; using YesSql; -namespace OrchardCore.AdminTrees.Controllers +namespace OrchardCore.AdminMenu.Controllers { [Admin] public class TreeController : Controller, IUpdateModel { private readonly IAuthorizationService _authorizationService; - private readonly IAdminTreeService _adminTreeService; + private readonly IAdminMenuervice _AdminMenuervice; private readonly ISiteService _siteService; private readonly INotifier _notifier; public TreeController( IAuthorizationService authorizationService, - IAdminTreeService adminTreeService, + IAdminMenuervice AdminMenuervice, ISiteService siteService, IShapeFactory shapeFactory, INotifier notifier, @@ -39,7 +39,7 @@ public TreeController( ILogger logger) { _authorizationService = authorizationService; - _adminTreeService = adminTreeService; + _AdminMenuervice = AdminMenuervice; _siteService = siteService; New = shapeFactory; _notifier = notifier; @@ -70,7 +70,7 @@ public async Task List(AdminTreeListOptions options, PagerParamet options = new AdminTreeListOptions(); } - var trees = await _adminTreeService.GetAsync(); + var trees = await _AdminMenuervice.GetAsync(); if (!string.IsNullOrWhiteSpace(options.Search)) { @@ -107,7 +107,7 @@ public async Task List(AdminTreeListOptions options, PagerParamet var model = new AdminTreeListViewModel { - AdminTrees = results.Select(x => new AdminTreeEntry { AdminTree = x }).ToList(), + AdminMenu = results.Select(x => new AdminTreeEntry { AdminTree = x }).ToList(), Options = options, Pager = pagerShape }; @@ -140,7 +140,7 @@ public async Task Create(AdminTreeCreateViewModel model) { var tree = new AdminTree {Name = model.Name}; - await _adminTreeService.SaveAsync(tree); + await _AdminMenuervice.SaveAsync(tree); return RedirectToAction(nameof(List)); } @@ -156,7 +156,7 @@ public async Task Edit(string id) return Unauthorized(); } - var tree = await _adminTreeService.GetByIdAsync(id); + var tree = await _AdminMenuervice.GetByIdAsync(id); if (tree == null) { @@ -180,7 +180,7 @@ public async Task Edit(AdminTreeEditViewModel model) return Unauthorized(); } - var tree = await _adminTreeService.GetByIdAsync(model.Id); + var tree = await _AdminMenuervice.GetByIdAsync(model.Id); if (tree == null) { @@ -191,7 +191,7 @@ public async Task Edit(AdminTreeEditViewModel model) { tree.Name = model.Name; - await _adminTreeService.SaveAsync(tree); + await _AdminMenuervice.SaveAsync(tree); _notifier.Success(H["Admin tree updated successfully"]); @@ -209,7 +209,7 @@ public async Task Delete(string id) return Unauthorized(); } - var tree = await _adminTreeService.GetByIdAsync(id); + var tree = await _AdminMenuervice.GetByIdAsync(id); if (tree == null) { @@ -217,7 +217,7 @@ public async Task Delete(string id) return RedirectToAction(nameof(List)); } - var removed = await _adminTreeService.DeleteAsync(tree); + var removed = await _AdminMenuervice.DeleteAsync(tree); if (removed == 1) @@ -241,7 +241,7 @@ public async Task Toggle(string id) return Unauthorized(); } - var tree = await _adminTreeService.GetByIdAsync(id); + var tree = await _AdminMenuervice.GetByIdAsync(id); if (tree == null) { @@ -250,7 +250,7 @@ public async Task Toggle(string id) tree.Enabled = !tree.Enabled; - await _adminTreeService.SaveAsync(tree); + await _AdminMenuervice.SaveAsync(tree); _notifier.Success(H["Admin tree toggled successfully"]); diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Deployment/AdminTreesDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Deployment/AdminTreesDeploymentSource.cs similarity index 61% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Deployment/AdminTreesDeploymentSource.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Deployment/AdminTreesDeploymentSource.cs index 020f35c3c27..1bed45721a8 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Deployment/AdminTreesDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Deployment/AdminTreesDeploymentSource.cs @@ -3,36 +3,36 @@ using Newtonsoft.Json.Linq; using OrchardCore.Deployment; -namespace OrchardCore.AdminTrees.Deployment +namespace OrchardCore.AdminMenu.Deployment { - public class AdminTreesDeploymentSource : IDeploymentSource + public class AdminMenuDeploymentSource : IDeploymentSource { - private readonly IAdminTreeService _adminTreeService; + private readonly IAdminMenuervice _AdminMenuervice; - public AdminTreesDeploymentSource(IAdminTreeService adminTreeService) + public AdminMenuDeploymentSource(IAdminMenuervice AdminMenuervice) { - _adminTreeService = adminTreeService; + _AdminMenuervice = AdminMenuervice; } public async Task ProcessDeploymentStepAsync(DeploymentStep step, DeploymentPlanResult result) { - var adminTreesState = step as AdminTreesDeploymentStep; + var AdminMenuState = step as AdminMenuDeploymentStep; - if (adminTreesState == null) + if (AdminMenuState == null) { return; } var data = new JArray(); result.Steps.Add(new JObject( - new JProperty("name", "AdminTrees"), + new JProperty("name", "AdminMenu"), new JProperty("data", data) )); // For each AdminNode, store info about its concrete type: linkAdminNode, contentTypesAdminNode etc... var serializer = new JsonSerializer() { TypeNameHandling = TypeNameHandling.Auto }; - foreach (var adminTree in await _adminTreeService.GetAsync()) + foreach (var adminTree in await _AdminMenuervice.GetAsync()) { var objectData = JObject.FromObject(adminTree, serializer); data.Add(objectData); diff --git a/src/OrchardCore.Modules/OrchardCore.AdminMenu/Deployment/AdminTreesDeploymentStep.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Deployment/AdminTreesDeploymentStep.cs new file mode 100644 index 00000000000..22614810172 --- /dev/null +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Deployment/AdminTreesDeploymentStep.cs @@ -0,0 +1,15 @@ +using OrchardCore.Deployment; + +namespace OrchardCore.AdminMenu.Deployment +{ + /// + /// Adds all admin trees to a . + /// + public class AdminMenuDeploymentStep : DeploymentStep + { + public AdminMenuDeploymentStep() + { + Name = "AdminMenu"; + } + } +} diff --git a/src/OrchardCore.Modules/OrchardCore.AdminMenu/Deployment/AdminTreesDeploymentStepDriver.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Deployment/AdminTreesDeploymentStepDriver.cs new file mode 100644 index 00000000000..161893c3447 --- /dev/null +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Deployment/AdminTreesDeploymentStepDriver.cs @@ -0,0 +1,23 @@ +using OrchardCore.Deployment; +using OrchardCore.DisplayManagement.Handlers; +using OrchardCore.DisplayManagement.Views; + +namespace OrchardCore.AdminMenu.Deployment +{ + public class AdminMenuDeploymentStepDriver : DisplayDriver + { + public override IDisplayResult Display(AdminMenuDeploymentStep step) + { + return + Combine( + View("AdminMenuDeploymentStep_Fields_Summary", step).Location("Summary", "Content"), + View("AdminMenuDeploymentStep_Fields_Thumbnail", step).Location("Thumbnail", "Content") + ); + } + + public override IDisplayResult Edit(AdminMenuDeploymentStep step) + { + return View("AdminMenuDeploymentStep_Fields_Edit", step).Location("Content"); + } + } +} diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Manifest.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Manifest.cs similarity index 64% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Manifest.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Manifest.cs index f5a834c549b..df6179efdb4 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Manifest.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Manifest.cs @@ -1,10 +1,10 @@ using OrchardCore.Modules.Manifest; [assembly: Module( - Name = "OrchardCore.AdminTrees", + Name = "Admin Menu", Author = "The Orchard Team", Website = "http://orchardproject.net", Version = "0.0.1", - Description = "The admin trees enables user custom admin menus.", + Description = "The admin menu module enables user custom admin menus.", Category = "Content Management" )] diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Models/AdminTree.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Models/AdminTree.cs similarity index 98% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Models/AdminTree.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Models/AdminTree.cs index 671271c619d..c375f4ef640 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Models/AdminTree.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Models/AdminTree.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using OrchardCore.Navigation; -namespace OrchardCore.AdminTrees.Models +namespace OrchardCore.AdminMenu.Models { public class AdminTree { diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Models/AdminTreeList.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Models/AdminTreeList.cs similarity index 52% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Models/AdminTreeList.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Models/AdminTreeList.cs index f001334dc61..b5bb8d7aeae 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Models/AdminTreeList.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Models/AdminTreeList.cs @@ -2,14 +2,14 @@ using System.Collections.Generic; using OrchardCore.Navigation; -namespace OrchardCore.AdminTrees.Models +namespace OrchardCore.AdminMenu.Models { /// - /// The list of all the Admintrees stored on the system. + /// The list of all the AdminMenu stored on the system. /// public class AdminTreeList { public int Id { get; set; } - public List AdminTrees { get; set; } = new List(); + public List AdminMenu { get; set; } = new List(); } } diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Models/TreeNode.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Models/TreeNode.cs similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Models/TreeNode.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Models/TreeNode.cs diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/OrchardCore.AdminTrees.csproj b/src/OrchardCore.Modules/OrchardCore.AdminMenu/OrchardCore.AdminMenu.csproj similarity index 95% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/OrchardCore.AdminTrees.csproj rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/OrchardCore.AdminMenu.csproj index ffe6cec0dec..2f69f6d314d 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/OrchardCore.AdminTrees.csproj +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/OrchardCore.AdminMenu.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Permissions.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Permissions.cs similarity index 95% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Permissions.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Permissions.cs index ebf014797ba..f1605e51ee7 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Permissions.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Permissions.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using OrchardCore.Security.Permissions; -namespace OrchardCore.AdminTrees +namespace OrchardCore.AdminMenu { // todo public class Permissions : IPermissionProvider diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/README.md b/src/OrchardCore.Modules/OrchardCore.AdminMenu/README.md similarity index 97% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/README.md rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/README.md index 187ebb4ef4f..21746df7d19 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/README.md +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/README.md @@ -1,4 +1,4 @@ -# Admin Trees (OrchardCore.AdminTrees) +# Admin Trees (OrchardCore.AdminMenu) The Admin Trees module provides a way for users to create custom admin menus through the Admin UI. @@ -59,7 +59,7 @@ The Admin Menu that OrchardCore provides out of the box it's built broadly speak 1. The AdminTree module declares it's own INavigationProvider and so it will be called too by NavigationManager. The name of that INavigationProvider is AdminTreeNavigationProvidersCoordinator. -2. The coordinator retrieves all AdminTrees stored on the database and for each one of them call a BuildTreeAsync method, where each node add recursively its own menu items to the builder. +2. The coordinator retrieves all AdminMenu stored on the database and for each one of them call a BuildTreeAsync method, where each node add recursively its own menu items to the builder. ## Deployment Plan Step and Recipe Step diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Recipes/AdminTreeStep.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Recipes/AdminTreeStep.cs similarity index 60% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Recipes/AdminTreeStep.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Recipes/AdminTreeStep.cs index 08cc615afd5..1b1d7ad4bc5 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Recipes/AdminTreeStep.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Recipes/AdminTreeStep.cs @@ -2,33 +2,33 @@ using System.Threading.Tasks; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using OrchardCore.AdminTrees.Models; +using OrchardCore.AdminMenu.Models; using OrchardCore.Recipes.Models; using OrchardCore.Recipes.Services; using YesSql; -namespace OrchardCore.AdminTrees.Recipes +namespace OrchardCore.AdminMenu.Recipes { /// /// This recipe step creates a set of admin trees. /// - public class AdminTreeStep : IRecipeStepHandler + public class AdminMenutep : IRecipeStepHandler { - private readonly IAdminTreeService _adminTreeService; + private readonly IAdminMenuervice _AdminMenuervice; - public AdminTreeStep(IAdminTreeService adminTreeService) + public AdminMenutep(IAdminMenuervice AdminMenuervice) { - _adminTreeService = adminTreeService; + _AdminMenuervice = AdminMenuervice; } public async Task ExecuteAsync(RecipeExecutionContext context) { - if (!String.Equals(context.Name, "AdminTrees", StringComparison.OrdinalIgnoreCase)) + if (!String.Equals(context.Name, "AdminMenu", StringComparison.OrdinalIgnoreCase)) { return; } - var model = context.Step.ToObject(); + var model = context.Step.ToObject(); var serializer = new JsonSerializer() { TypeNameHandling = TypeNameHandling.Auto }; @@ -36,14 +36,14 @@ public async Task ExecuteAsync(RecipeExecutionContext context) { var adminTree = token.ToObject(serializer); adminTree.Id = Guid.NewGuid().ToString("n");// we always add it as a new tree. - await _adminTreeService.SaveAsync(adminTree); + await _AdminMenuervice.SaveAsync(adminTree); } return; } } - public class AdminTreeStepModel + public class AdminMenutepModel { public JArray Data { get; set; } } diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Services/AdminTreeNavigationProvidersCoordinator.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Services/AdminTreeNavigationProvidersCoordinator.cs similarity index 88% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Services/AdminTreeNavigationProvidersCoordinator.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Services/AdminTreeNavigationProvidersCoordinator.cs index 9baa92f7e1b..13b2d40e933 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Services/AdminTreeNavigationProvidersCoordinator.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Services/AdminTreeNavigationProvidersCoordinator.cs @@ -3,11 +3,11 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using OrchardCore.AdminTrees.Models; +using OrchardCore.AdminMenu.Models; using OrchardCore.Navigation; using YesSql; -namespace OrchardCore.AdminTrees.Services +namespace OrchardCore.AdminMenu.Services { // Retrieves all instances of "IAdminNodeNavigationBuilder" // Those are classes that add new "AdminNodes" to a "NavigationBuilder" using custom logic specific to the module that register them. @@ -15,16 +15,16 @@ namespace OrchardCore.AdminTrees.Services // This class is itself one more INavigationProvider so it can be called from this module's AdminMenu.cs public class AdminTreeNavigationProvidersCoordinator : INavigationProvider { - private readonly IAdminTreeService _adminTreeService; + private readonly IAdminMenuervice _AdminMenuervice; private readonly IEnumerable _nodeBuilders; private readonly ILogger Logger; public AdminTreeNavigationProvidersCoordinator( - IAdminTreeService adminTreeService, + IAdminMenuervice AdminMenuervice, IEnumerable nodeBuilders, ILogger logger) { - _adminTreeService = adminTreeService; + _AdminMenuervice = AdminMenuervice; _nodeBuilders = nodeBuilders; Logger = logger; } @@ -38,7 +38,7 @@ public async Task BuildNavigationAsync(string name, NavigationBuilder builder) return; } - var trees = (await _adminTreeService.GetAsync()) + var trees = (await _AdminMenuervice.GetAsync()) .Where(x => x.Enabled == true) .Where( x => x.MenuItems.Count > 0); diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Services/AdminTreeService.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Services/AdminTreeService.cs similarity index 67% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Services/AdminTreeService.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Services/AdminTreeService.cs index bfec950f193..13127da9810 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Services/AdminTreeService.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Services/AdminTreeService.cs @@ -6,22 +6,22 @@ using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Primitives; -using OrchardCore.AdminTrees.Models; +using OrchardCore.AdminMenu.Models; using OrchardCore.Environment.Cache; using OrchardCore.Modules; using YesSql; -namespace OrchardCore.AdminTrees +namespace OrchardCore.AdminMenu { - public class AdminTreeService : IAdminTreeService + public class AdminMenuervice : IAdminMenuervice { private readonly IMemoryCache _memoryCache; private readonly ISignal _signal; private readonly IServiceProvider _serviceProvider; private readonly IClock _clock; - private const string AdminTreesCacheKey = "AdminTreeService"; + private const string AdminMenuCacheKey = "AdminMenuervice"; - public AdminTreeService( + public AdminMenuervice( ISignal signal, IServiceProvider serviceProvider, IMemoryCache memoryCache, @@ -34,11 +34,11 @@ public AdminTreeService( } - public IChangeToken ChangeToken => _signal.GetToken(AdminTreesCacheKey); + public IChangeToken ChangeToken => _signal.GetToken(AdminMenuCacheKey); public async Task> GetAsync() { - return (await GetAdminTreeList()).AdminTrees; + return (await GetAdminTreeList()).AdminMenu; } public async Task SaveAsync(AdminTree tree) @@ -47,30 +47,30 @@ public async Task SaveAsync(AdminTree tree) var session = GetSession(); - var preexisting = adminTreeList.AdminTrees.Where(x => x.Id == tree.Id).FirstOrDefault(); + var preexisting = adminTreeList.AdminMenu.Where(x => x.Id == tree.Id).FirstOrDefault(); // it's new? add it if (preexisting == null) { - adminTreeList.AdminTrees.Add(tree); + adminTreeList.AdminMenu.Add(tree); } else // not new: replace it { - var index = adminTreeList.AdminTrees.IndexOf(preexisting); - adminTreeList.AdminTrees[index] = tree; + var index = adminTreeList.AdminMenu.IndexOf(preexisting); + adminTreeList.AdminMenu[index] = tree; } session.Save(adminTreeList); - _memoryCache.Set(AdminTreesCacheKey, adminTreeList); - _signal.SignalToken(AdminTreesCacheKey); + _memoryCache.Set(AdminMenuCacheKey, adminTreeList); + _signal.SignalToken(AdminMenuCacheKey); } public async Task GetByIdAsync(string id) { return (await GetAdminTreeList()) - .AdminTrees + .AdminMenu .Where(x => String.Equals(x.Id, id, StringComparison.OrdinalIgnoreCase)) .FirstOrDefault(); } @@ -81,12 +81,12 @@ public async Task DeleteAsync(AdminTree tree) var adminTreeList = await GetAdminTreeList(); var session = GetSession(); - var count = adminTreeList.AdminTrees.RemoveAll(x => String.Equals(x.Id, tree.Id)); + var count = adminTreeList.AdminMenu.RemoveAll(x => String.Equals(x.Id, tree.Id)); session.Save(adminTreeList); - _memoryCache.Set(AdminTreesCacheKey, adminTreeList); - _signal.SignalToken(AdminTreesCacheKey); + _memoryCache.Set(AdminMenuCacheKey, adminTreeList); + _signal.SignalToken(AdminMenuCacheKey); return count; } @@ -97,7 +97,7 @@ private async Task GetAdminTreeList() { AdminTreeList treeList; - if (!_memoryCache.TryGetValue(AdminTreesCacheKey, out treeList)) + if (!_memoryCache.TryGetValue(AdminMenuCacheKey, out treeList)) { var session = GetSession(); @@ -107,19 +107,19 @@ private async Task GetAdminTreeList() { lock (_memoryCache) { - if (!_memoryCache.TryGetValue(AdminTreesCacheKey, out treeList)) + if (!_memoryCache.TryGetValue(AdminMenuCacheKey, out treeList)) { treeList = new AdminTreeList(); session.Save(treeList); - _memoryCache.Set(AdminTreesCacheKey, treeList); - _signal.SignalToken(AdminTreesCacheKey); + _memoryCache.Set(AdminMenuCacheKey, treeList); + _signal.SignalToken(AdminMenuCacheKey); } } } else { - _memoryCache.Set(AdminTreesCacheKey, treeList); - _signal.SignalToken(AdminTreesCacheKey); + _memoryCache.Set(AdminMenuCacheKey, treeList); + _signal.SignalToken(AdminMenuCacheKey); } } diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Services/IAdminTreeService.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Services/IAdminTreeService.cs similarity index 90% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Services/IAdminTreeService.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Services/IAdminTreeService.cs index 4d430785166..bdda8e5d44b 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Services/IAdminTreeService.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Services/IAdminTreeService.cs @@ -1,14 +1,14 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.Extensions.Primitives; -using OrchardCore.AdminTrees.Models; +using OrchardCore.AdminMenu.Models; -namespace OrchardCore.AdminTrees +namespace OrchardCore.AdminMenu { /// /// Provides services to manage the admin trees. /// - public interface IAdminTreeService + public interface IAdminMenuervice { /// diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Startup.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Startup.cs similarity index 79% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Startup.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Startup.cs index abab4863c05..63f8e4d24f2 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Startup.cs @@ -2,8 +2,8 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; -using OrchardCore.AdminTrees.Services; -using OrchardCore.AdminTrees.AdminNodes; +using OrchardCore.AdminMenu.Services; +using OrchardCore.AdminMenu.AdminNodes; using OrchardCore.Data.Migration; using OrchardCore.DisplayManagement; using OrchardCore.DisplayManagement.Handlers; @@ -12,11 +12,11 @@ using OrchardCore.Security.Permissions; using YesSql.Indexes; using OrchardCore.Deployment; -using OrchardCore.AdminTrees.Deployment; +using OrchardCore.AdminMenu.Deployment; using OrchardCore.Recipes; -using OrchardCore.AdminTrees.Recipes; +using OrchardCore.AdminMenu.Recipes; -namespace OrchardCore.AdminTrees +namespace OrchardCore.AdminMenu { public class Startup : StartupBase { @@ -26,16 +26,16 @@ public override void ConfigureServices(IServiceCollection services) services.AddScoped(); services.AddTransient(); - services.AddSingleton(); + services.AddSingleton(); services.AddScoped(); services.AddScoped, DisplayManager>(); - services.AddRecipeExecutionStep(); + services.AddRecipeExecutionStep(); - services.AddTransient(); - services.AddSingleton(new DeploymentStepFactory()); - services.AddScoped, AdminTreesDeploymentStepDriver>(); + services.AddTransient(); + services.AddSingleton(new DeploymentStepFactory()); + services.AddScoped, AdminMenuDeploymentStepDriver>(); // placeholder treeNode diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminNodeEditViewModel.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminNodeEditViewModel.cs similarity index 85% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminNodeEditViewModel.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminNodeEditViewModel.cs index 3e916f362ac..07062027600 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminNodeEditViewModel.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminNodeEditViewModel.cs @@ -1,8 +1,8 @@ using Microsoft.AspNetCore.Mvc.ModelBinding; -using OrchardCore.AdminTrees.Models; +using OrchardCore.AdminMenu.Models; using OrchardCore.Navigation; -namespace OrchardCore.AdminTrees.ViewModels +namespace OrchardCore.AdminMenu.ViewModels { public class AdminNodeEditViewModel { diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminNodeListViewModel.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminNodeListViewModel.cs similarity index 74% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminNodeListViewModel.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminNodeListViewModel.cs index 2f9d08dd846..04114527ecb 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminNodeListViewModel.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminNodeListViewModel.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Text; -using OrchardCore.AdminTrees.Models; +using OrchardCore.AdminMenu.Models; -namespace OrchardCore.AdminTrees.ViewModels +namespace OrchardCore.AdminMenu.ViewModels { public class AdminNodeListViewModel { diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminTreeCreateViewModel.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminTreeCreateViewModel.cs similarity index 78% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminTreeCreateViewModel.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminTreeCreateViewModel.cs index 85125841321..8a51b2f6abe 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminTreeCreateViewModel.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminTreeCreateViewModel.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace OrchardCore.AdminTrees.ViewModels +namespace OrchardCore.AdminMenu.ViewModels { public class AdminTreeCreateViewModel { diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminTreeEditViewModel.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminTreeEditViewModel.cs similarity index 82% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminTreeEditViewModel.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminTreeEditViewModel.cs index 976934663f0..9c1b2414a60 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminTreeEditViewModel.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminTreeEditViewModel.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace OrchardCore.AdminTrees.ViewModels +namespace OrchardCore.AdminMenu.ViewModels { public class AdminTreeEditViewModel { diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminTreeListOptions.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminTreeListOptions.cs similarity index 78% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminTreeListOptions.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminTreeListOptions.cs index f4d19abe829..c42ebb993af 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminTreeListOptions.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminTreeListOptions.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text; -namespace OrchardCore.AdminTrees.ViewModels +namespace OrchardCore.AdminMenu.ViewModels { public class AdminTreeListOptions { diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminTreeListViewModel.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminTreeListViewModel.cs similarity index 71% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminTreeListViewModel.cs rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminTreeListViewModel.cs index f5ced46abbc..b6a13171972 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/ViewModels/AdminTreeListViewModel.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/ViewModels/AdminTreeListViewModel.cs @@ -1,13 +1,13 @@ using System; using System.Collections.Generic; using System.Text; -using OrchardCore.AdminTrees.Models; +using OrchardCore.AdminMenu.Models; -namespace OrchardCore.AdminTrees.ViewModels +namespace OrchardCore.AdminMenu.ViewModels { public class AdminTreeListViewModel { - public IList AdminTrees { get; set; } + public IList AdminMenu { get; set; } public AdminTreeListOptions Options { get; set; } public dynamic Pager { get; set; } } diff --git a/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/AdminTreesDeploymentStep.Fields.Edit.cshtml b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/AdminTreesDeploymentStep.Fields.Edit.cshtml new file mode 100644 index 00000000000..1331ccd26cf --- /dev/null +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/AdminTreesDeploymentStep.Fields.Edit.cshtml @@ -0,0 +1,3 @@ +@model ShapeViewModel + +
@T["Admin Trees"]
\ No newline at end of file diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/AdminTreesDeploymentStep.Fields.Summary.cshtml b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/AdminTreesDeploymentStep.Fields.Summary.cshtml similarity index 66% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/AdminTreesDeploymentStep.Fields.Summary.cshtml rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/AdminTreesDeploymentStep.Fields.Summary.cshtml index f5ac9fc91c4..92eadc2a2d7 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/AdminTreesDeploymentStep.Fields.Summary.cshtml +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/AdminTreesDeploymentStep.Fields.Summary.cshtml @@ -1,4 +1,4 @@ -@model ShapeViewModel +@model ShapeViewModel
@T["Admin Trees"]
diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/AdminTreesDeploymentStep.Fields.Thumbnail.cshtml b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/AdminTreesDeploymentStep.Fields.Thumbnail.cshtml similarity index 64% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/AdminTreesDeploymentStep.Fields.Thumbnail.cshtml rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/AdminTreesDeploymentStep.Fields.Thumbnail.cshtml index 0db2bf1ab1d..7241d6c8a15 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/AdminTreesDeploymentStep.Fields.Thumbnail.cshtml +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/AdminTreesDeploymentStep.Fields.Thumbnail.cshtml @@ -1,4 +1,4 @@ -@model ShapeViewModel +@model ShapeViewModel

@T["Admin Trees"]

@T["Exports all the admin trees."]

diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/LinkAdminNode.Fields.TreeEdit.cshtml b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/LinkAdminNode.Fields.TreeEdit.cshtml similarity index 89% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/LinkAdminNode.Fields.TreeEdit.cshtml rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/LinkAdminNode.Fields.TreeEdit.cshtml index 34720dce1a0..1c9df7866a4 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/LinkAdminNode.Fields.TreeEdit.cshtml +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/LinkAdminNode.Fields.TreeEdit.cshtml @@ -1,11 +1,11 @@ @model LinkAdminNodeViewModel - - + + - - + +
@T["Link"]
diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/LinkAdminNode.Fields.TreeSummary.cshtml b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/LinkAdminNode.Fields.TreeSummary.cshtml similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/LinkAdminNode.Fields.TreeSummary.cshtml rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/LinkAdminNode.Fields.TreeSummary.cshtml diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/LinkAdminNode.Fields.TreeThumbnail.cshtml b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/LinkAdminNode.Fields.TreeThumbnail.cshtml similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/LinkAdminNode.Fields.TreeThumbnail.cshtml rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/LinkAdminNode.Fields.TreeThumbnail.cshtml diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/PlaceholderAdminNode.Fields.TreeEdit.cshtml b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/PlaceholderAdminNode.Fields.TreeEdit.cshtml similarity index 88% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/PlaceholderAdminNode.Fields.TreeEdit.cshtml rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/PlaceholderAdminNode.Fields.TreeEdit.cshtml index 181a8b87d2e..6c6aec3947e 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/PlaceholderAdminNode.Fields.TreeEdit.cshtml +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/PlaceholderAdminNode.Fields.TreeEdit.cshtml @@ -1,11 +1,11 @@ @model PlaceholderAdminNodeViewModel - - + + - - + +
@T["Placeholder"]
diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/PlaceholderAdminNode.Fields.TreeSummary.cshtml b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/PlaceholderAdminNode.Fields.TreeSummary.cshtml similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/PlaceholderAdminNode.Fields.TreeSummary.cshtml rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/PlaceholderAdminNode.Fields.TreeSummary.cshtml diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/PlaceholderAdminNode.Fields.TreeThumbnail.cshtml b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/PlaceholderAdminNode.Fields.TreeThumbnail.cshtml similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Items/PlaceholderAdminNode.Fields.TreeThumbnail.cshtml rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Items/PlaceholderAdminNode.Fields.TreeThumbnail.cshtml diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/MenuItem.TreeSummary.cshtml b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/MenuItem.TreeSummary.cshtml similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/MenuItem.TreeSummary.cshtml rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/MenuItem.TreeSummary.cshtml diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/MenuItem.TreeThumbnail.cshtml b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/MenuItem.TreeThumbnail.cshtml similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/MenuItem.TreeThumbnail.cshtml rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/MenuItem.TreeThumbnail.cshtml diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Node/Create.cshtml b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Node/Create.cshtml similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Node/Create.cshtml rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Node/Create.cshtml diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Node/Edit.cshtml b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Node/Edit.cshtml similarity index 100% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Node/Edit.cshtml rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Node/Edit.cshtml diff --git a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Node/List.cshtml b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Node/List.cshtml similarity index 94% rename from src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Node/List.cshtml rename to src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Node/List.cshtml index ccb7679f2f3..10dfe86a1cd 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Node/List.cshtml +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Views/Node/List.cshtml @@ -6,8 +6,8 @@ var index = 0; } - - + +
@@ -91,7 +91,7 @@ + + -

@RenderTitleSegments(T["Admin Trees"])

+

@RenderTitleSegments(T["Admin Menus"])