From 8762809a832e9fba7b72e28147413075e7d5861d Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Fri, 26 Feb 2021 08:04:39 -0500 Subject: [PATCH 01/17] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5d0bb04c..bd6646dd 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,8 @@ This project is a work in progress and the schedule for implementing enhancement V.2.1.0 ( Q1 2021 ) - [x] Complete Static Localization of Admin UI -- [ ] Cross Platform Database Support ( ie. SQLite ) -- [ ] EF Core Migrations for Database Installation/Upgrade +- [ ] Cross Platform Database Support ( ie. SQLite ) - see #964 +- [ ] EF Core Migrations for Database Installation/Upgrade - see #964 V.2.0.0 ( released in conjuntion with .NET 5 on Nov 11, 2020 ) - [x] Migration to .NET 5 From 5b9196cfd4b030067d4aaa8aa34315e78b60ce56 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Fri, 26 Feb 2021 08:05:36 -0500 Subject: [PATCH 02/17] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bd6646dd..5788b1db 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,8 @@ This project is a work in progress and the schedule for implementing enhancement V.2.1.0 ( Q1 2021 ) - [x] Complete Static Localization of Admin UI -- [ ] Cross Platform Database Support ( ie. SQLite ) - see #964 -- [ ] EF Core Migrations for Database Installation/Upgrade - see #964 +- [ ] Cross Platform Database Support ( ie. SQLite ) - see [#964](https://github.com/oqtane/oqtane.framework/discussions/964) +- [ ] EF Core Migrations for Database Installation/Upgrade - see [#964](https://github.com/oqtane/oqtane.framework/discussions/964) V.2.0.0 ( released in conjuntion with .NET 5 on Nov 11, 2020 ) - [x] Migration to .NET 5 From 191a1dea4d26c1c4db0caa5d80c14ccc4457db59 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Sat, 27 Feb 2021 12:50:36 -0500 Subject: [PATCH 03/17] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5788b1db..20559301 100644 --- a/README.md +++ b/README.md @@ -50,10 +50,12 @@ There is a separate [Documentation repository](https://github.com/oqtane/oqtane. This project is a work in progress and the schedule for implementing enhancements is dependent upon the availability of community members who are willing/able to assist. V.2.1.0 ( Q1 2021 ) -- [x] Complete Static Localization of Admin UI - [ ] Cross Platform Database Support ( ie. SQLite ) - see [#964](https://github.com/oqtane/oqtane.framework/discussions/964) - [ ] EF Core Migrations for Database Installation/Upgrade - see [#964](https://github.com/oqtane/oqtane.framework/discussions/964) +V.2.0.1 ( Feb 27, 2021 ) +- [x] Complete Static Localization of Admin UI + V.2.0.0 ( released in conjuntion with .NET 5 on Nov 11, 2020 ) - [x] Migration to .NET 5 - [x] Static Localization ( ie. labels, help text, etc.. ) From cccb0806e19f0b065101d29df4d12d7e7b2dc0a7 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Tue, 2 Mar 2021 16:17:33 +0100 Subject: [PATCH 04/17] LangVersion Fix #1148 removed the LangVersion property from project --- .../Templates/External/Server/[Owner].[Module].Server.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Server/[Owner].[Module].Server.csproj b/Oqtane.Server/wwwroot/Modules/Templates/External/Server/[Owner].[Module].Server.csproj index cfce1a60..ec0e8e4a 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Server/[Owner].[Module].Server.csproj +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Server/[Owner].[Module].Server.csproj @@ -2,7 +2,6 @@ net5.0 - 7.3 true 1.0.0 [Owner].[Module] From 0d5ecb7427ce44e050f5801a0515ee9814abfe7d Mon Sep 17 00:00:00 2001 From: Charles Nurse Date: Tue, 2 Mar 2021 12:03:26 -0800 Subject: [PATCH 05/17] Include gitignore and README files in Solution Files folder, so they are more accessible for editing --- Oqtane.sln | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Oqtane.sln b/Oqtane.sln index 2755bdb2..70e85123 100644 --- a/Oqtane.sln +++ b/Oqtane.sln @@ -16,6 +16,8 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{77EECA8C-B58E-469E-B8C5-D543AFC9A654}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig + .gitignore = .gitignore + README.md = README.md EndProjectSection EndProject Global From dbc4e3ea66c974a903e053bf5d5866ce8e3c74ec Mon Sep 17 00:00:00 2001 From: Charles Nurse Date: Tue, 2 Mar 2021 12:07:04 -0800 Subject: [PATCH 06/17] Add the Jetbrains Rider "idea" folder to gitignore. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index d47b8dcf..98408e86 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ msbuild.binlog *.binlog *.nupkg +*.idea + Oqtane.Server/appsettings.json Oqtane.Server/Data/*.mdf Oqtane.Server/Data/*.ldf From 7205246718c1a93bb875a5cfd0b549dc47b7abb8 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Wed, 3 Mar 2021 13:25:49 +0100 Subject: [PATCH 07/17] Added Delete all pages and modules --- .../Modules/Admin/RecycleBin/Index.razor | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor b/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor index 2d81476a..c26f852b 100644 --- a/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor +++ b/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor @@ -31,6 +31,9 @@ @context.DeletedOn +
+ +
} @@ -59,6 +62,10 @@ @context.DeletedOn +
+ +
+ }
@@ -69,6 +76,22 @@ public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin; + protected string IsDeleteAllPagesVisible + { + get + { + return _pages.Count == 0 ? "hidden" : "visible"; + } + } + + protected string IsDeleteAllModulesVisible + { + get { + return _modules.Count == 0 ? "hidden" : "visible" ; + } + } + + protected override async Task OnInitializedAsync() { try @@ -126,6 +149,28 @@ } } + private async Task DeleteAllPages() + { + try + { + foreach (Page page in _pages) + { + await PageService.DeletePageAsync(page.PageId); + await logger.LogInformation("Page Permanently Deleted {Page}", page); + } + + await logger.LogInformation("Pages Permanently Deleted"); + await Load(); + StateHasChanged(); + NavigationManager.NavigateTo(NavigateUrl()); + } + catch (Exception ex) + { + await logger.LogError(ex, "Error Permanently Deleting Pages {Error}", ex.Message); + AddModuleMessage(ex.Message, MessageType.Error); + } + } + private async Task RestoreModule(Module module) { try @@ -167,4 +212,31 @@ AddModuleMessage(Localizer["Error Permanently Deleting Module"], MessageType.Error); } } + + private async Task DeleteAllModules() + { + try + { + foreach (Module module in _modules) + { + await PageModuleService.DeletePageModuleAsync(module.PageModuleId); + // check if there are any remaining module instances in the site + _modules = await ModuleService.GetModulesAsync(PageState.Site.SiteId); + + if (!_modules.Exists(item => item.ModuleId == module.ModuleId)) + { + await ModuleService.DeleteModuleAsync(module.ModuleId); + } + } + + await logger.LogInformation("Modules Permanently Deleted"); + await Load(); + StateHasChanged(); + } + catch (Exception ex) + { + await logger.LogError(ex, "Error Permanently Deleting Modules {Error}", ex.Message); + AddModuleMessage(Localizer["Error Permanently Deleting Modules"], MessageType.Error); + } + } } From a03434ac413b10ac97080dba1dc8ecd6623c4b25 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Wed, 3 Mar 2021 16:39:32 +0100 Subject: [PATCH 08/17] recycle bin and log paging --- Oqtane.Client/Modules/Admin/Logs/Index.razor | 2 +- .../Modules/Admin/RecycleBin/Index.razor | 34 +++++++------------ 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/Logs/Index.razor b/Oqtane.Client/Modules/Admin/Logs/Index.razor index 3ace61fd..6ccb8bb8 100644 --- a/Oqtane.Client/Modules/Admin/Logs/Index.razor +++ b/Oqtane.Client/Modules/Admin/Logs/Index.razor @@ -48,7 +48,7 @@ else @if (_logs.Any()) { - +
  @Localizer["Date"] diff --git a/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor b/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor index c26f852b..7c30c7a1 100644 --- a/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor +++ b/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor @@ -31,9 +31,12 @@ @context.DeletedOn -
- -
+ @if (_pages.Any()) + { +
+ +
+ } } @@ -62,9 +65,12 @@ @context.DeletedOn -
- -
+ @if (_modules.Any()) + { +
+ +
+ } }
@@ -76,22 +82,6 @@ public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin; - protected string IsDeleteAllPagesVisible - { - get - { - return _pages.Count == 0 ? "hidden" : "visible"; - } - } - - protected string IsDeleteAllModulesVisible - { - get { - return _modules.Count == 0 ? "hidden" : "visible" ; - } - } - - protected override async Task OnInitializedAsync() { try From 0fd46d28b5769cae21a9f718bba0b1dc5ba20797 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Wed, 3 Mar 2021 16:55:13 +0100 Subject: [PATCH 09/17] Delete all modules and pages in recycle bin --- .../Modules/Admin/RecycleBin/Index.razor | 34 +++++++------------ 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor b/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor index c26f852b..7c30c7a1 100644 --- a/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor +++ b/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor @@ -31,9 +31,12 @@ @context.DeletedOn -
- -
+ @if (_pages.Any()) + { +
+ +
+ } } @@ -62,9 +65,12 @@ @context.DeletedOn -
- -
+ @if (_modules.Any()) + { +
+ +
+ } }
@@ -76,22 +82,6 @@ public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin; - protected string IsDeleteAllPagesVisible - { - get - { - return _pages.Count == 0 ? "hidden" : "visible"; - } - } - - protected string IsDeleteAllModulesVisible - { - get { - return _modules.Count == 0 ? "hidden" : "visible" ; - } - } - - protected override async Task OnInitializedAsync() { try From 63fc1cd04291bf2ea468facf4736af329d0bb6f1 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Wed, 3 Mar 2021 17:15:00 +0100 Subject: [PATCH 10/17] Update Index.razor --- Oqtane.Client/Modules/Admin/Logs/Index.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Client/Modules/Admin/Logs/Index.razor b/Oqtane.Client/Modules/Admin/Logs/Index.razor index 6ccb8bb8..3ace61fd 100644 --- a/Oqtane.Client/Modules/Admin/Logs/Index.razor +++ b/Oqtane.Client/Modules/Admin/Logs/Index.razor @@ -48,7 +48,7 @@ else @if (_logs.Any()) { - +
  @Localizer["Date"] From 4c9960b983ecc82d8172b3371215981a749668cc Mon Sep 17 00:00:00 2001 From: hishamco Date: Fri, 5 Mar 2021 16:41:53 +0300 Subject: [PATCH 11/17] Rows -> Maximum Rows --- Oqtane.Client/Modules/Admin/Logs/Index.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Client/Modules/Admin/Logs/Index.razor b/Oqtane.Client/Modules/Admin/Logs/Index.razor index 3ace61fd..ca99da6d 100644 --- a/Oqtane.Client/Modules/Admin/Logs/Index.razor +++ b/Oqtane.Client/Modules/Admin/Logs/Index.razor @@ -36,7 +36,7 @@ else - + - +