From ff41d5203ea5e7e8e4ae8ced8898eb7c4a21f5fd Mon Sep 17 00:00:00 2001 From: Ben Ramey Date: Thu, 4 Apr 2024 09:25:30 -0500 Subject: [PATCH] Many updates for OAP --- Twain.sln | 28 +++-- .../BenRameyTheme/BenRameyTheme.csproj | 0 .../BenRameyTheme/Manifest.cs | 0 .../ResourceManagementOptionsConfiguration.cs | 0 .../BenRameyTheme/Startup.cs | 2 +- .../Views/BlogPost-Category.liquid | 0 ...ost-Tags-TaxonomyField-Tags.Display.liquid | 0 .../Views/Content-Category.Summary.liquid | 0 .../Views/Content-Category.liquid | 0 .../BenRameyTheme/Views/Layout.liquid | 0 .../Views/Shared/NotFound.liquid | 0 .../ApplicationChangeSetDto.g.cs | 0 .../ApplicationCreateSetDto.g.cs | 0 .../OapApi.v1.Client/ApplicationDto.g.cs | 0 .../OapApi.v1.Client/ApplicationStatus.g.cs | 0 .../ApplicationTermsCreateSetDto.g.cs | 0 .../OapApi.v1.Client/ApplicationTermsDto.g.cs | 0 .../CreateApplicationRequestDto.g.cs | 0 .../CreateApplicationResponseDto.g.cs | 0 .../OapApi.v1.Client/DelegatingOapApiV1.g.cs | 0 .../GetApplicationRequestDto.g.cs | 0 .../GetApplicationResponseDto.g.cs | 0 .../GetApplicationsRequestDto.g.cs | 0 .../GetApplicationsResponseDto.g.cs | 0 .../Http/HttpClientOapApiV1.g.cs | 0 .../Http/OapApiV1HttpHandler.g.cs | 0 .../Http/OapApiV1HttpMapping.g.cs | 0 src/{ => OAP}/OapApi.v1.Client/IOapApiV1.g.cs | 0 .../OapApi.v1.Client/OapApi.v1.Client.csproj | 0 .../OapApi.v1.Client/OapApiV1Methods.g.cs | 0 .../UpdateApplicationRequestDto.g.cs | 0 .../UpdateApplicationResponseDto.g.cs | 0 src/{Modules => OAP}/OapApi.v1/Manifest.cs | 9 +- .../OapApi.v1/OapApi.v1.csproj | 4 +- src/{Modules => OAP}/OapApi.v1/OapApiV1.cs | 5 + src/{Modules => OAP}/OapApi.v1/Startup.cs | 0 src/{Modules => OAP}/OapApi.v1/swagger.json | 0 src/{Themes => OAP}/OapTheme/.eslintrc.js | 0 src/{Themes => OAP}/OapTheme/Manifest.cs | 8 +- src/{Themes => OAP}/OapTheme/OapTheme.csproj | 14 ++- .../ResourceManagementOptionsConfiguration.cs | 0 src/{Themes => OAP}/OapTheme/Scripts/site.js | 0 src/{Themes => OAP}/OapTheme/Startup.cs | 2 - .../OapTheme/Styles/richtext.css | 0 src/{Themes => OAP}/OapTheme/Styles/site.css | 0 .../OapTheme/Styles/validation.css | 0 src/OAP/OapTheme/Views/HtmlBodyPart.cshtml | 5 + src/OAP/OapTheme/Views/Layout.cshtml | 36 ++++++ src/OAP/OapTheme/Views/_ViewImports.cshtml | 13 ++ .../OapTheme/package-lock.json | 0 src/{Themes => OAP}/OapTheme/package.json | 0 .../OapTheme/postcss.config.js | 0 .../OapTheme/tailwind.config.js | 0 .../OapTheme/webpack.config.js | 0 src/{Themes => OAP}/OapTheme/wwwroot/site.css | 0 src/{Themes => OAP}/OapTheme/wwwroot/site.js | 0 .../OverseasAutoProtection/ContentTypes.cs | 7 ++ src/OAP/OverseasAutoProtection/Manifest.cs | 20 +++ src/OAP/OverseasAutoProtection/Migrations.cs | 118 ++++++++++++++++++ .../OapApplication/OapApplicationPart.cs | 10 ++ .../OapApplication/OapApplicationStatuses.cs | 7 ++ .../OverseasAutoProtection.csproj | 23 ++++ src/OAP/OverseasAutoProtection/Startup.cs | 21 ++++ .../Controllers/ApplicationFormController.cs | 18 --- src/Themes/OapTheme/Migrations.cs | 88 ------------- src/Themes/OapTheme/Views/HtmlBodyPart.liquid | 3 - src/Themes/OapTheme/Views/Layout.liquid | 31 ----- .../OapTheme/Views/Shared/NotFound.liquid | 10 -- src/Twain.Web/Twain.Web.csproj | 8 +- 69 files changed, 316 insertions(+), 174 deletions(-) rename src/{Themes => BenRamey}/BenRameyTheme/BenRameyTheme.csproj (100%) rename src/{Themes => BenRamey}/BenRameyTheme/Manifest.cs (100%) rename src/{Themes => BenRamey}/BenRameyTheme/ResourceManagementOptionsConfiguration.cs (100%) rename src/{Themes => BenRamey}/BenRameyTheme/Startup.cs (86%) rename src/{Themes => BenRamey}/BenRameyTheme/Views/BlogPost-Category.liquid (100%) rename src/{Themes => BenRamey}/BenRameyTheme/Views/BlogPost-Tags-TaxonomyField-Tags.Display.liquid (100%) rename src/{Themes => BenRamey}/BenRameyTheme/Views/Content-Category.Summary.liquid (100%) rename src/{Themes => BenRamey}/BenRameyTheme/Views/Content-Category.liquid (100%) rename src/{Themes => BenRamey}/BenRameyTheme/Views/Layout.liquid (100%) rename src/{Themes => BenRamey}/BenRameyTheme/Views/Shared/NotFound.liquid (100%) rename src/{ => OAP}/OapApi.v1.Client/ApplicationChangeSetDto.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/ApplicationCreateSetDto.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/ApplicationDto.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/ApplicationStatus.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/ApplicationTermsCreateSetDto.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/ApplicationTermsDto.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/CreateApplicationRequestDto.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/CreateApplicationResponseDto.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/DelegatingOapApiV1.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/GetApplicationRequestDto.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/GetApplicationResponseDto.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/GetApplicationsRequestDto.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/GetApplicationsResponseDto.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/Http/HttpClientOapApiV1.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/Http/OapApiV1HttpHandler.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/Http/OapApiV1HttpMapping.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/IOapApiV1.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/OapApi.v1.Client.csproj (100%) rename src/{ => OAP}/OapApi.v1.Client/OapApiV1Methods.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/UpdateApplicationRequestDto.g.cs (100%) rename src/{ => OAP}/OapApi.v1.Client/UpdateApplicationResponseDto.g.cs (100%) rename src/{Modules => OAP}/OapApi.v1/Manifest.cs (60%) rename src/{Modules => OAP}/OapApi.v1/OapApi.v1.csproj (82%) rename src/{Modules => OAP}/OapApi.v1/OapApiV1.cs (97%) rename src/{Modules => OAP}/OapApi.v1/Startup.cs (100%) rename src/{Modules => OAP}/OapApi.v1/swagger.json (100%) rename src/{Themes => OAP}/OapTheme/.eslintrc.js (100%) rename src/{Themes => OAP}/OapTheme/Manifest.cs (50%) rename src/{Themes => OAP}/OapTheme/OapTheme.csproj (71%) rename src/{Themes => OAP}/OapTheme/ResourceManagementOptionsConfiguration.cs (100%) rename src/{Themes => OAP}/OapTheme/Scripts/site.js (100%) rename src/{Themes => OAP}/OapTheme/Startup.cs (83%) rename src/{Themes => OAP}/OapTheme/Styles/richtext.css (100%) rename src/{Themes => OAP}/OapTheme/Styles/site.css (100%) rename src/{Themes => OAP}/OapTheme/Styles/validation.css (100%) create mode 100644 src/OAP/OapTheme/Views/HtmlBodyPart.cshtml create mode 100644 src/OAP/OapTheme/Views/Layout.cshtml create mode 100644 src/OAP/OapTheme/Views/_ViewImports.cshtml rename src/{Themes => OAP}/OapTheme/package-lock.json (100%) rename src/{Themes => OAP}/OapTheme/package.json (100%) rename src/{Themes => OAP}/OapTheme/postcss.config.js (100%) rename src/{Themes => OAP}/OapTheme/tailwind.config.js (100%) rename src/{Themes => OAP}/OapTheme/webpack.config.js (100%) rename src/{Themes => OAP}/OapTheme/wwwroot/site.css (100%) rename src/{Themes => OAP}/OapTheme/wwwroot/site.js (100%) create mode 100644 src/OAP/OverseasAutoProtection/ContentTypes.cs create mode 100644 src/OAP/OverseasAutoProtection/Manifest.cs create mode 100644 src/OAP/OverseasAutoProtection/Migrations.cs create mode 100644 src/OAP/OverseasAutoProtection/OapApplication/OapApplicationPart.cs create mode 100644 src/OAP/OverseasAutoProtection/OapApplication/OapApplicationStatuses.cs create mode 100644 src/OAP/OverseasAutoProtection/OverseasAutoProtection.csproj create mode 100644 src/OAP/OverseasAutoProtection/Startup.cs delete mode 100644 src/Themes/OapTheme/Controllers/ApplicationFormController.cs delete mode 100644 src/Themes/OapTheme/Migrations.cs delete mode 100644 src/Themes/OapTheme/Views/HtmlBodyPart.liquid delete mode 100644 src/Themes/OapTheme/Views/Layout.liquid delete mode 100644 src/Themes/OapTheme/Views/Shared/NotFound.liquid diff --git a/Twain.sln b/Twain.sln index 791f2b7..814cc75 100644 --- a/Twain.sln +++ b/Twain.sln @@ -14,17 +14,21 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "tools\Build\Build. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MarkdownImport", "src\Modules\MarkdownImport\MarkdownImport.csproj", "{7B0477DA-BCD5-47ED-8B88-76D046524434}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BenRameyTheme", "src\Themes\BenRameyTheme\BenRameyTheme.csproj", "{A7498019-5941-479B-ADB2-56B6C984C608}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Themes", "Themes", "{C5891B30-F830-4094-A4D5-E2DB8D9ED819}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BenRameyTheme", "src\BenRamey\BenRameyTheme\BenRameyTheme.csproj", "{A7498019-5941-479B-ADB2-56B6C984C608}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{3DA05917-02EA-4B04-9C48-B86C77A73584}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OapTheme", "src\Themes\OapTheme\OapTheme.csproj", "{4BB167BD-2BC4-4DFB-B1E2-813EC2E2D8FF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OapTheme", "src\OAP\OapTheme\OapTheme.csproj", "{4BB167BD-2BC4-4DFB-B1E2-813EC2E2D8FF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OapApi.v1.Client", "src\OapApi.v1.Client\OapApi.v1.Client.csproj", "{5C30AB89-B3D4-468F-A029-3D26FECD0083}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OapApi.v1.Client", "src\OAP\OapApi.v1.Client\OapApi.v1.Client.csproj", "{5C30AB89-B3D4-468F-A029-3D26FECD0083}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OapApi.v1", "src\Modules\OapApi.v1\OapApi.v1.csproj", "{D414342C-EA8D-4115-BF22-DC8B62FB3CBF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OapApi.v1", "src\OAP\OapApi.v1\OapApi.v1.csproj", "{D414342C-EA8D-4115-BF22-DC8B62FB3CBF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OverseasAutoProtection", "src\OAP\OverseasAutoProtection\OverseasAutoProtection.csproj", "{D2827FDB-33A0-45E9-9F75-EB81BCE3833F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OAP", "OAP", "{E6EDFA50-6BFE-44C5-BEEB-18108A20F625}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BenRamey", "BenRamey", "{03C1520E-5ABF-4AF7-858B-8BE234ACE0FB}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -60,6 +64,10 @@ Global {D414342C-EA8D-4115-BF22-DC8B62FB3CBF}.Debug|Any CPU.Build.0 = Debug|Any CPU {D414342C-EA8D-4115-BF22-DC8B62FB3CBF}.Release|Any CPU.ActiveCfg = Release|Any CPU {D414342C-EA8D-4115-BF22-DC8B62FB3CBF}.Release|Any CPU.Build.0 = Release|Any CPU + {D2827FDB-33A0-45E9-9F75-EB81BCE3833F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2827FDB-33A0-45E9-9F75-EB81BCE3833F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2827FDB-33A0-45E9-9F75-EB81BCE3833F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2827FDB-33A0-45E9-9F75-EB81BCE3833F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -67,9 +75,11 @@ Global GlobalSection(NestedProjects) = preSolution {97FFBB7D-C82D-47B2-B110-377B5F6B49C2} = {7C34E548-E385-4902-8A50-B7F49CABAC10} {7B0477DA-BCD5-47ED-8B88-76D046524434} = {3DA05917-02EA-4B04-9C48-B86C77A73584} - {A7498019-5941-479B-ADB2-56B6C984C608} = {C5891B30-F830-4094-A4D5-E2DB8D9ED819} - {4BB167BD-2BC4-4DFB-B1E2-813EC2E2D8FF} = {C5891B30-F830-4094-A4D5-E2DB8D9ED819} - {D414342C-EA8D-4115-BF22-DC8B62FB3CBF} = {3DA05917-02EA-4B04-9C48-B86C77A73584} + {A7498019-5941-479B-ADB2-56B6C984C608} = {03C1520E-5ABF-4AF7-858B-8BE234ACE0FB} + {4BB167BD-2BC4-4DFB-B1E2-813EC2E2D8FF} = {E6EDFA50-6BFE-44C5-BEEB-18108A20F625} + {5C30AB89-B3D4-468F-A029-3D26FECD0083} = {E6EDFA50-6BFE-44C5-BEEB-18108A20F625} + {D414342C-EA8D-4115-BF22-DC8B62FB3CBF} = {E6EDFA50-6BFE-44C5-BEEB-18108A20F625} + {D2827FDB-33A0-45E9-9F75-EB81BCE3833F} = {E6EDFA50-6BFE-44C5-BEEB-18108A20F625} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {0F7F9D4C-DF95-43AF-9E9A-DA09B5EE03C7} diff --git a/src/Themes/BenRameyTheme/BenRameyTheme.csproj b/src/BenRamey/BenRameyTheme/BenRameyTheme.csproj similarity index 100% rename from src/Themes/BenRameyTheme/BenRameyTheme.csproj rename to src/BenRamey/BenRameyTheme/BenRameyTheme.csproj diff --git a/src/Themes/BenRameyTheme/Manifest.cs b/src/BenRamey/BenRameyTheme/Manifest.cs similarity index 100% rename from src/Themes/BenRameyTheme/Manifest.cs rename to src/BenRamey/BenRameyTheme/Manifest.cs diff --git a/src/Themes/BenRameyTheme/ResourceManagementOptionsConfiguration.cs b/src/BenRamey/BenRameyTheme/ResourceManagementOptionsConfiguration.cs similarity index 100% rename from src/Themes/BenRameyTheme/ResourceManagementOptionsConfiguration.cs rename to src/BenRamey/BenRameyTheme/ResourceManagementOptionsConfiguration.cs diff --git a/src/Themes/BenRameyTheme/Startup.cs b/src/BenRamey/BenRameyTheme/Startup.cs similarity index 86% rename from src/Themes/BenRameyTheme/Startup.cs rename to src/BenRamey/BenRameyTheme/Startup.cs index bb1d956..daaea2a 100644 --- a/src/Themes/BenRameyTheme/Startup.cs +++ b/src/BenRamey/BenRameyTheme/Startup.cs @@ -10,6 +10,6 @@ public class Startup : StartupBase { public override void ConfigureServices(IServiceCollection serviceCollection) { - serviceCollection.AddTransient, ResourceManagementOptionsConfiguration>(); + serviceCollection.AddTransient, ResourceManagementOptionsConfiguration>(); } } diff --git a/src/Themes/BenRameyTheme/Views/BlogPost-Category.liquid b/src/BenRamey/BenRameyTheme/Views/BlogPost-Category.liquid similarity index 100% rename from src/Themes/BenRameyTheme/Views/BlogPost-Category.liquid rename to src/BenRamey/BenRameyTheme/Views/BlogPost-Category.liquid diff --git a/src/Themes/BenRameyTheme/Views/BlogPost-Tags-TaxonomyField-Tags.Display.liquid b/src/BenRamey/BenRameyTheme/Views/BlogPost-Tags-TaxonomyField-Tags.Display.liquid similarity index 100% rename from src/Themes/BenRameyTheme/Views/BlogPost-Tags-TaxonomyField-Tags.Display.liquid rename to src/BenRamey/BenRameyTheme/Views/BlogPost-Tags-TaxonomyField-Tags.Display.liquid diff --git a/src/Themes/BenRameyTheme/Views/Content-Category.Summary.liquid b/src/BenRamey/BenRameyTheme/Views/Content-Category.Summary.liquid similarity index 100% rename from src/Themes/BenRameyTheme/Views/Content-Category.Summary.liquid rename to src/BenRamey/BenRameyTheme/Views/Content-Category.Summary.liquid diff --git a/src/Themes/BenRameyTheme/Views/Content-Category.liquid b/src/BenRamey/BenRameyTheme/Views/Content-Category.liquid similarity index 100% rename from src/Themes/BenRameyTheme/Views/Content-Category.liquid rename to src/BenRamey/BenRameyTheme/Views/Content-Category.liquid diff --git a/src/Themes/BenRameyTheme/Views/Layout.liquid b/src/BenRamey/BenRameyTheme/Views/Layout.liquid similarity index 100% rename from src/Themes/BenRameyTheme/Views/Layout.liquid rename to src/BenRamey/BenRameyTheme/Views/Layout.liquid diff --git a/src/Themes/BenRameyTheme/Views/Shared/NotFound.liquid b/src/BenRamey/BenRameyTheme/Views/Shared/NotFound.liquid similarity index 100% rename from src/Themes/BenRameyTheme/Views/Shared/NotFound.liquid rename to src/BenRamey/BenRameyTheme/Views/Shared/NotFound.liquid diff --git a/src/OapApi.v1.Client/ApplicationChangeSetDto.g.cs b/src/OAP/OapApi.v1.Client/ApplicationChangeSetDto.g.cs similarity index 100% rename from src/OapApi.v1.Client/ApplicationChangeSetDto.g.cs rename to src/OAP/OapApi.v1.Client/ApplicationChangeSetDto.g.cs diff --git a/src/OapApi.v1.Client/ApplicationCreateSetDto.g.cs b/src/OAP/OapApi.v1.Client/ApplicationCreateSetDto.g.cs similarity index 100% rename from src/OapApi.v1.Client/ApplicationCreateSetDto.g.cs rename to src/OAP/OapApi.v1.Client/ApplicationCreateSetDto.g.cs diff --git a/src/OapApi.v1.Client/ApplicationDto.g.cs b/src/OAP/OapApi.v1.Client/ApplicationDto.g.cs similarity index 100% rename from src/OapApi.v1.Client/ApplicationDto.g.cs rename to src/OAP/OapApi.v1.Client/ApplicationDto.g.cs diff --git a/src/OapApi.v1.Client/ApplicationStatus.g.cs b/src/OAP/OapApi.v1.Client/ApplicationStatus.g.cs similarity index 100% rename from src/OapApi.v1.Client/ApplicationStatus.g.cs rename to src/OAP/OapApi.v1.Client/ApplicationStatus.g.cs diff --git a/src/OapApi.v1.Client/ApplicationTermsCreateSetDto.g.cs b/src/OAP/OapApi.v1.Client/ApplicationTermsCreateSetDto.g.cs similarity index 100% rename from src/OapApi.v1.Client/ApplicationTermsCreateSetDto.g.cs rename to src/OAP/OapApi.v1.Client/ApplicationTermsCreateSetDto.g.cs diff --git a/src/OapApi.v1.Client/ApplicationTermsDto.g.cs b/src/OAP/OapApi.v1.Client/ApplicationTermsDto.g.cs similarity index 100% rename from src/OapApi.v1.Client/ApplicationTermsDto.g.cs rename to src/OAP/OapApi.v1.Client/ApplicationTermsDto.g.cs diff --git a/src/OapApi.v1.Client/CreateApplicationRequestDto.g.cs b/src/OAP/OapApi.v1.Client/CreateApplicationRequestDto.g.cs similarity index 100% rename from src/OapApi.v1.Client/CreateApplicationRequestDto.g.cs rename to src/OAP/OapApi.v1.Client/CreateApplicationRequestDto.g.cs diff --git a/src/OapApi.v1.Client/CreateApplicationResponseDto.g.cs b/src/OAP/OapApi.v1.Client/CreateApplicationResponseDto.g.cs similarity index 100% rename from src/OapApi.v1.Client/CreateApplicationResponseDto.g.cs rename to src/OAP/OapApi.v1.Client/CreateApplicationResponseDto.g.cs diff --git a/src/OapApi.v1.Client/DelegatingOapApiV1.g.cs b/src/OAP/OapApi.v1.Client/DelegatingOapApiV1.g.cs similarity index 100% rename from src/OapApi.v1.Client/DelegatingOapApiV1.g.cs rename to src/OAP/OapApi.v1.Client/DelegatingOapApiV1.g.cs diff --git a/src/OapApi.v1.Client/GetApplicationRequestDto.g.cs b/src/OAP/OapApi.v1.Client/GetApplicationRequestDto.g.cs similarity index 100% rename from src/OapApi.v1.Client/GetApplicationRequestDto.g.cs rename to src/OAP/OapApi.v1.Client/GetApplicationRequestDto.g.cs diff --git a/src/OapApi.v1.Client/GetApplicationResponseDto.g.cs b/src/OAP/OapApi.v1.Client/GetApplicationResponseDto.g.cs similarity index 100% rename from src/OapApi.v1.Client/GetApplicationResponseDto.g.cs rename to src/OAP/OapApi.v1.Client/GetApplicationResponseDto.g.cs diff --git a/src/OapApi.v1.Client/GetApplicationsRequestDto.g.cs b/src/OAP/OapApi.v1.Client/GetApplicationsRequestDto.g.cs similarity index 100% rename from src/OapApi.v1.Client/GetApplicationsRequestDto.g.cs rename to src/OAP/OapApi.v1.Client/GetApplicationsRequestDto.g.cs diff --git a/src/OapApi.v1.Client/GetApplicationsResponseDto.g.cs b/src/OAP/OapApi.v1.Client/GetApplicationsResponseDto.g.cs similarity index 100% rename from src/OapApi.v1.Client/GetApplicationsResponseDto.g.cs rename to src/OAP/OapApi.v1.Client/GetApplicationsResponseDto.g.cs diff --git a/src/OapApi.v1.Client/Http/HttpClientOapApiV1.g.cs b/src/OAP/OapApi.v1.Client/Http/HttpClientOapApiV1.g.cs similarity index 100% rename from src/OapApi.v1.Client/Http/HttpClientOapApiV1.g.cs rename to src/OAP/OapApi.v1.Client/Http/HttpClientOapApiV1.g.cs diff --git a/src/OapApi.v1.Client/Http/OapApiV1HttpHandler.g.cs b/src/OAP/OapApi.v1.Client/Http/OapApiV1HttpHandler.g.cs similarity index 100% rename from src/OapApi.v1.Client/Http/OapApiV1HttpHandler.g.cs rename to src/OAP/OapApi.v1.Client/Http/OapApiV1HttpHandler.g.cs diff --git a/src/OapApi.v1.Client/Http/OapApiV1HttpMapping.g.cs b/src/OAP/OapApi.v1.Client/Http/OapApiV1HttpMapping.g.cs similarity index 100% rename from src/OapApi.v1.Client/Http/OapApiV1HttpMapping.g.cs rename to src/OAP/OapApi.v1.Client/Http/OapApiV1HttpMapping.g.cs diff --git a/src/OapApi.v1.Client/IOapApiV1.g.cs b/src/OAP/OapApi.v1.Client/IOapApiV1.g.cs similarity index 100% rename from src/OapApi.v1.Client/IOapApiV1.g.cs rename to src/OAP/OapApi.v1.Client/IOapApiV1.g.cs diff --git a/src/OapApi.v1.Client/OapApi.v1.Client.csproj b/src/OAP/OapApi.v1.Client/OapApi.v1.Client.csproj similarity index 100% rename from src/OapApi.v1.Client/OapApi.v1.Client.csproj rename to src/OAP/OapApi.v1.Client/OapApi.v1.Client.csproj diff --git a/src/OapApi.v1.Client/OapApiV1Methods.g.cs b/src/OAP/OapApi.v1.Client/OapApiV1Methods.g.cs similarity index 100% rename from src/OapApi.v1.Client/OapApiV1Methods.g.cs rename to src/OAP/OapApi.v1.Client/OapApiV1Methods.g.cs diff --git a/src/OapApi.v1.Client/UpdateApplicationRequestDto.g.cs b/src/OAP/OapApi.v1.Client/UpdateApplicationRequestDto.g.cs similarity index 100% rename from src/OapApi.v1.Client/UpdateApplicationRequestDto.g.cs rename to src/OAP/OapApi.v1.Client/UpdateApplicationRequestDto.g.cs diff --git a/src/OapApi.v1.Client/UpdateApplicationResponseDto.g.cs b/src/OAP/OapApi.v1.Client/UpdateApplicationResponseDto.g.cs similarity index 100% rename from src/OapApi.v1.Client/UpdateApplicationResponseDto.g.cs rename to src/OAP/OapApi.v1.Client/UpdateApplicationResponseDto.g.cs diff --git a/src/Modules/OapApi.v1/Manifest.cs b/src/OAP/OapApi.v1/Manifest.cs similarity index 60% rename from src/Modules/OapApi.v1/Manifest.cs rename to src/OAP/OapApi.v1/Manifest.cs index 049eea5..43bd5b1 100644 --- a/src/Modules/OapApi.v1/Manifest.cs +++ b/src/OAP/OapApi.v1/Manifest.cs @@ -1,11 +1,14 @@ using OrchardCore.Modules.Manifest; [assembly: Module( - Name = "Overseas Auto Protection API", + Id = "OAP.APIv1", + Name = "Overseas Auto Protection API v1", Author = "Overseas Auto Protection", Website = "https://oaprotection.org/api/v1/", Version = "0.0.1", Description = "API for OAP services", - Category = "Content Management" + Category = "Content Management", + Dependencies = [ + "OAP.Content" + ] )] - \ No newline at end of file diff --git a/src/Modules/OapApi.v1/OapApi.v1.csproj b/src/OAP/OapApi.v1/OapApi.v1.csproj similarity index 82% rename from src/Modules/OapApi.v1/OapApi.v1.csproj rename to src/OAP/OapApi.v1/OapApi.v1.csproj index d54a45c..d67b5cf 100644 --- a/src/Modules/OapApi.v1/OapApi.v1.csproj +++ b/src/OAP/OapApi.v1/OapApi.v1.csproj @@ -11,14 +11,14 @@ - - + + diff --git a/src/Modules/OapApi.v1/OapApiV1.cs b/src/OAP/OapApi.v1/OapApiV1.cs similarity index 97% rename from src/Modules/OapApi.v1/OapApiV1.cs rename to src/OAP/OapApi.v1/OapApiV1.cs index f9123bf..9805551 100644 --- a/src/Modules/OapApi.v1/OapApiV1.cs +++ b/src/OAP/OapApi.v1/OapApiV1.cs @@ -6,6 +6,11 @@ namespace OapApi.v1; public sealed class OapApiV1 : IOapApiV1 { + public OapApiV1() + { + + } + public Task> CreateApplicationAsync(CreateApplicationRequestDto request, CancellationToken cancellationToken = default) => throw new NotImplementedException(); public Task> GetApplicationAsync(GetApplicationRequestDto request, CancellationToken cancellationToken = default) diff --git a/src/Modules/OapApi.v1/Startup.cs b/src/OAP/OapApi.v1/Startup.cs similarity index 100% rename from src/Modules/OapApi.v1/Startup.cs rename to src/OAP/OapApi.v1/Startup.cs diff --git a/src/Modules/OapApi.v1/swagger.json b/src/OAP/OapApi.v1/swagger.json similarity index 100% rename from src/Modules/OapApi.v1/swagger.json rename to src/OAP/OapApi.v1/swagger.json diff --git a/src/Themes/OapTheme/.eslintrc.js b/src/OAP/OapTheme/.eslintrc.js similarity index 100% rename from src/Themes/OapTheme/.eslintrc.js rename to src/OAP/OapTheme/.eslintrc.js diff --git a/src/Themes/OapTheme/Manifest.cs b/src/OAP/OapTheme/Manifest.cs similarity index 50% rename from src/Themes/OapTheme/Manifest.cs rename to src/OAP/OapTheme/Manifest.cs index 75c5d02..5f5f3c4 100644 --- a/src/Themes/OapTheme/Manifest.cs +++ b/src/OAP/OapTheme/Manifest.cs @@ -1,9 +1,13 @@ using OrchardCore.DisplayManagement.Manifest; [assembly: Theme( + Id = "OAP.Theme", Name = "OAP Theme", - Author = "Ben Ramey", + Author = "Overseas Auto Protection", Website = "https://oaprotection.org/", Version = "0.0.1", - Description = "Overseas Auto Protection site theme." + Description = "Overseas Auto Protection site theme.", + Dependencies = [ + "OAP.Content", + ] )] diff --git a/src/Themes/OapTheme/OapTheme.csproj b/src/OAP/OapTheme/OapTheme.csproj similarity index 71% rename from src/Themes/OapTheme/OapTheme.csproj rename to src/OAP/OapTheme/OapTheme.csproj index a5fbc71..b00ab9a 100644 --- a/src/Themes/OapTheme/OapTheme.csproj +++ b/src/OAP/OapTheme/OapTheme.csproj @@ -1,4 +1,4 @@ - + net8.0 @@ -7,6 +7,12 @@ enable + + + + + + @@ -16,6 +22,7 @@ + @@ -24,8 +31,11 @@ - + + + + diff --git a/src/Themes/OapTheme/ResourceManagementOptionsConfiguration.cs b/src/OAP/OapTheme/ResourceManagementOptionsConfiguration.cs similarity index 100% rename from src/Themes/OapTheme/ResourceManagementOptionsConfiguration.cs rename to src/OAP/OapTheme/ResourceManagementOptionsConfiguration.cs diff --git a/src/Themes/OapTheme/Scripts/site.js b/src/OAP/OapTheme/Scripts/site.js similarity index 100% rename from src/Themes/OapTheme/Scripts/site.js rename to src/OAP/OapTheme/Scripts/site.js diff --git a/src/Themes/OapTheme/Startup.cs b/src/OAP/OapTheme/Startup.cs similarity index 83% rename from src/Themes/OapTheme/Startup.cs rename to src/OAP/OapTheme/Startup.cs index 32deca4..5d43678 100644 --- a/src/Themes/OapTheme/Startup.cs +++ b/src/OAP/OapTheme/Startup.cs @@ -1,6 +1,5 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; -using OrchardCore.Data.Migration; using OrchardCore.Modules; using OrchardCore.ResourceManagement; @@ -11,6 +10,5 @@ public class Startup : StartupBase public override void ConfigureServices(IServiceCollection services) { services.AddTransient, ResourceManagementOptionsConfiguration>(); - services.AddDataMigration(); } } diff --git a/src/Themes/OapTheme/Styles/richtext.css b/src/OAP/OapTheme/Styles/richtext.css similarity index 100% rename from src/Themes/OapTheme/Styles/richtext.css rename to src/OAP/OapTheme/Styles/richtext.css diff --git a/src/Themes/OapTheme/Styles/site.css b/src/OAP/OapTheme/Styles/site.css similarity index 100% rename from src/Themes/OapTheme/Styles/site.css rename to src/OAP/OapTheme/Styles/site.css diff --git a/src/Themes/OapTheme/Styles/validation.css b/src/OAP/OapTheme/Styles/validation.css similarity index 100% rename from src/Themes/OapTheme/Styles/validation.css rename to src/OAP/OapTheme/Styles/validation.css diff --git a/src/OAP/OapTheme/Views/HtmlBodyPart.cshtml b/src/OAP/OapTheme/Views/HtmlBodyPart.cshtml new file mode 100644 index 0000000..e133731 --- /dev/null +++ b/src/OAP/OapTheme/Views/HtmlBodyPart.cshtml @@ -0,0 +1,5 @@ +@model OrchardCore.Html.ViewModels.HtmlBodyPartViewModel + +
+ @Html.Raw(Model.Html) +
diff --git a/src/OAP/OapTheme/Views/Layout.cshtml b/src/OAP/OapTheme/Views/Layout.cshtml new file mode 100644 index 0000000..48c3b6d --- /dev/null +++ b/src/OAP/OapTheme/Views/Layout.cshtml @@ -0,0 +1,36 @@ +@using OrchardCore.Admin.Models +@using OrchardCore.DisplayManagement +@using OrchardCore.DisplayManagement.ModelBinding +@using OrchardCore.Entities +@using OrchardCore.Users.Models + + + + + + + + @RenderTitleSegments(Site.SiteName, "before") + + + + + + + + + + + + @await RenderSectionAsync("HeadMeta", required: false) + + + @await RenderSectionAsync("Header", required: false) + + @await RenderBodyAsync() + + @await RenderSectionAsync("Footer", required: false) + + + + diff --git a/src/OAP/OapTheme/Views/_ViewImports.cshtml b/src/OAP/OapTheme/Views/_ViewImports.cshtml new file mode 100644 index 0000000..3f71228 --- /dev/null +++ b/src/OAP/OapTheme/Views/_ViewImports.cshtml @@ -0,0 +1,13 @@ +@* + For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 +*@ + +@inherits OrchardCore.DisplayManagement.Razor.RazorPage +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, OrchardCore.DisplayManagement +@addTagHelper *, OrchardCore.ResourceManagement +@addTagHelper *, OrchardCore.Menu +@using Microsoft.AspNetCore.Routing +@using Microsoft.Extensions.Options +@using OrchardCore.ContentManagement +@using OrchardCore.ContentManagement.Routing diff --git a/src/Themes/OapTheme/package-lock.json b/src/OAP/OapTheme/package-lock.json similarity index 100% rename from src/Themes/OapTheme/package-lock.json rename to src/OAP/OapTheme/package-lock.json diff --git a/src/Themes/OapTheme/package.json b/src/OAP/OapTheme/package.json similarity index 100% rename from src/Themes/OapTheme/package.json rename to src/OAP/OapTheme/package.json diff --git a/src/Themes/OapTheme/postcss.config.js b/src/OAP/OapTheme/postcss.config.js similarity index 100% rename from src/Themes/OapTheme/postcss.config.js rename to src/OAP/OapTheme/postcss.config.js diff --git a/src/Themes/OapTheme/tailwind.config.js b/src/OAP/OapTheme/tailwind.config.js similarity index 100% rename from src/Themes/OapTheme/tailwind.config.js rename to src/OAP/OapTheme/tailwind.config.js diff --git a/src/Themes/OapTheme/webpack.config.js b/src/OAP/OapTheme/webpack.config.js similarity index 100% rename from src/Themes/OapTheme/webpack.config.js rename to src/OAP/OapTheme/webpack.config.js diff --git a/src/Themes/OapTheme/wwwroot/site.css b/src/OAP/OapTheme/wwwroot/site.css similarity index 100% rename from src/Themes/OapTheme/wwwroot/site.css rename to src/OAP/OapTheme/wwwroot/site.css diff --git a/src/Themes/OapTheme/wwwroot/site.js b/src/OAP/OapTheme/wwwroot/site.js similarity index 100% rename from src/Themes/OapTheme/wwwroot/site.js rename to src/OAP/OapTheme/wwwroot/site.js diff --git a/src/OAP/OverseasAutoProtection/ContentTypes.cs b/src/OAP/OverseasAutoProtection/ContentTypes.cs new file mode 100644 index 0000000..3164a3d --- /dev/null +++ b/src/OAP/OverseasAutoProtection/ContentTypes.cs @@ -0,0 +1,7 @@ +namespace OverseasAutoProtection; +public static class ContentTypes +{ + public const string OapApplication = nameof(OapApplication); + public const string OapApplicationForm = nameof(OapApplicationForm); + public const string OapApplicationFormStep = nameof(OapApplicationFormStep); +} diff --git a/src/OAP/OverseasAutoProtection/Manifest.cs b/src/OAP/OverseasAutoProtection/Manifest.cs new file mode 100644 index 0000000..06d5705 --- /dev/null +++ b/src/OAP/OverseasAutoProtection/Manifest.cs @@ -0,0 +1,20 @@ +using OrchardCore.Modules.Manifest; + +[assembly: Module( + Id = "OAP.Content", + Name = "Overseas Auto Protection", + Author = "Overseas Auto Protection", + Website = "https://oaprotection.org/", + Version = "0.0.1", + Description = "The base OAP module, providing content types, parts, etc", + Category = "Content Management", + Dependencies = [ + "OrchardCore.ContentFields", + "OrchardCore.Autoroute", + "OrchardCore.Flows", + "OrchardCore.Forms", + "OrchardCore.Html", + "OrchardCore.Lists", + "OrchardCore.Title", + ] +)] diff --git a/src/OAP/OverseasAutoProtection/Migrations.cs b/src/OAP/OverseasAutoProtection/Migrations.cs new file mode 100644 index 0000000..164d1bb --- /dev/null +++ b/src/OAP/OverseasAutoProtection/Migrations.cs @@ -0,0 +1,118 @@ +using OrchardCore.Autoroute.Models; +using OrchardCore.ContentFields.Fields; +using OrchardCore.ContentFields.Settings; +using OrchardCore.ContentManagement.Metadata; +using OrchardCore.ContentManagement.Metadata.Settings; +using OrchardCore.Data.Migration; +using OrchardCore.Flows.Models; +using OrchardCore.Html.Models; +using OrchardCore.Html.Settings; +using OrchardCore.Lists.Models; +using OrchardCore.Mvc.Utilities; +using OrchardCore.Title.Models; +using OverseasAutoProtection.OapApplication; + +namespace OverseasAutoProtection; + +public class Migrations : DataMigration +{ + public Migrations(IContentDefinitionManager contentDefinitionManager) + { + m_contentDefinitionManager = contentDefinitionManager; + } + + public async Task CreateAsync() + { + await m_contentDefinitionManager + .AlterTypeDefinitionAsync(ContentTypes.OapApplicationFormStep, type => type + .Securable() + .Draftable() + .Versionable() + .WithPart(nameof(TitlePart), part => part + .WithPosition("1")) + .WithPart(nameof(AutoroutePart), part => part + .WithPosition("2") + .WithSettings(new AutoroutePartSettings + { + AllowCustomPath = true, + AllowUpdatePath = true, + })) + .WithPart(nameof(FlowPart), part => part + .WithPosition("3"))); + + await m_contentDefinitionManager + .AlterTypeDefinitionAsync(ContentTypes.OapApplicationForm, type => type + .Creatable() + .Listable() + .Securable() + .Draftable() + .Versionable() + .WithPart(nameof(AutoroutePart), part => part + .WithPosition("2") + .WithSettings(new AutoroutePartSettings + { + AllowCustomPath = true, + AllowUpdatePath = true, + })) + .WithPart(nameof(ListPart), part => part + .WithDisplayName("Form Steps") + .WithPosition("3") + .WithSettings(new ListPartSettings + { + PageSize = 10, + EnableOrdering = true, + ContainedContentTypes = [ContentTypes.OapApplicationFormStep] + }) + )); + + await m_contentDefinitionManager + .AlterPartDefinitionAsync(nameof(OapApplicationPart), builder => builder + .Attachable() + .WithField(nameof(OapApplicationPart.Status), field => field + .OfType(nameof(TextField)) + .WithDisplayName(nameof(OapApplicationPart.Status)) + .WithDescription("The status of the OAP Application.") + .WithEditor("PredefinedList") + .WithSettings(new TextFieldPredefinedListEditorSettings + { + Options = new[] + { + new ListValueOption { Name = OapApplicationStatuses.InProgress, Value = OapApplicationStatuses.InProgress.HtmlClassify() }, + new ListValueOption { Name = OapApplicationStatuses.Submitted, Value = OapApplicationStatuses.Submitted.HtmlClassify() }, + }, + DefaultValue = OapApplicationStatuses.InProgress.HtmlClassify(), + Editor = EditorOption.Radio, + })) + .WithDescription("Makes a content item into an OAP Application.")); + + await m_contentDefinitionManager + .AlterTypeDefinitionAsync(ContentTypes.OapApplication, type => type + .Creatable() + .Listable() + .Securable() + .WithPart(nameof(HtmlBodyPart), part => part + .WithDisplayName("Notes") + .WithSettings(new ContentTypePartSettings { Editor = "Wysiwyg", }) + ) + .WithPart(nameof(OapApplicationPart))); + + return 1; + } + + public async Task UpdateFrom1Async() + { + await m_contentDefinitionManager + .AlterTypeDefinitionAsync(ContentTypes.OapApplicationFormStep, type => type + .WithPart(nameof(HtmlBodyPart), part => part + .WithPosition("2") + .WithEditor("Wysiwyg") + .WithSettings(new HtmlBodyPartSettings + { + SanitizeHtml = true, + }))); + + return 2; + } + + private readonly IContentDefinitionManager m_contentDefinitionManager; +} diff --git a/src/OAP/OverseasAutoProtection/OapApplication/OapApplicationPart.cs b/src/OAP/OverseasAutoProtection/OapApplication/OapApplicationPart.cs new file mode 100644 index 0000000..c51f783 --- /dev/null +++ b/src/OAP/OverseasAutoProtection/OapApplication/OapApplicationPart.cs @@ -0,0 +1,10 @@ +using OrchardCore.ContentFields.Fields; +using OrchardCore.ContentManagement; + +namespace OverseasAutoProtection.OapApplication; +public class OapApplicationPart : ContentPart +{ + public TextField ApplicationId { get; set; } = new(); + public int Year { get; set; } + public TextField Status { get; set; } = new(); +} diff --git a/src/OAP/OverseasAutoProtection/OapApplication/OapApplicationStatuses.cs b/src/OAP/OverseasAutoProtection/OapApplication/OapApplicationStatuses.cs new file mode 100644 index 0000000..61aa492 --- /dev/null +++ b/src/OAP/OverseasAutoProtection/OapApplication/OapApplicationStatuses.cs @@ -0,0 +1,7 @@ +namespace OverseasAutoProtection.OapApplication; + +public static class OapApplicationStatuses +{ + public const string InProgress = nameof(InProgress); + public const string Submitted = nameof(Submitted); +} diff --git a/src/OAP/OverseasAutoProtection/OverseasAutoProtection.csproj b/src/OAP/OverseasAutoProtection/OverseasAutoProtection.csproj new file mode 100644 index 0000000..a33ce3b --- /dev/null +++ b/src/OAP/OverseasAutoProtection/OverseasAutoProtection.csproj @@ -0,0 +1,23 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + + + + + + + diff --git a/src/OAP/OverseasAutoProtection/Startup.cs b/src/OAP/OverseasAutoProtection/Startup.cs new file mode 100644 index 0000000..92d3f13 --- /dev/null +++ b/src/OAP/OverseasAutoProtection/Startup.cs @@ -0,0 +1,21 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Routing; +using Microsoft.Extensions.DependencyInjection; +using OrchardCore.Data.Migration; +using OverseasAutoProtection.OapApplication; + +namespace OverseasAutoProtection; + +public class Startup : OrchardCore.Modules.StartupBase +{ + public override void ConfigureServices(IServiceCollection services) + { + services.AddScoped(); + + services.AddDataMigration(); + } + + public override void Configure(IApplicationBuilder builder, IEndpointRouteBuilder routes, IServiceProvider serviceProvider) + { + } +} diff --git a/src/Themes/OapTheme/Controllers/ApplicationFormController.cs b/src/Themes/OapTheme/Controllers/ApplicationFormController.cs deleted file mode 100644 index 79daedf..0000000 --- a/src/Themes/OapTheme/Controllers/ApplicationFormController.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using OrchardCore.Data; - -namespace OapTheme.Controllers; -public class ApplicationFormController : Controller -{ - public ApplicationFormController(IDbConnectionAccessor dbConnectionAccessor) - { - m_dbConnectionAccessor = dbConnectionAccessor; - } - - public IActionResult Index() - { - return View(); - } - - private readonly IDbConnectionAccessor m_dbConnectionAccessor; -} diff --git a/src/Themes/OapTheme/Migrations.cs b/src/Themes/OapTheme/Migrations.cs deleted file mode 100644 index 47b1c6c..0000000 --- a/src/Themes/OapTheme/Migrations.cs +++ /dev/null @@ -1,88 +0,0 @@ -using OrchardCore.Autoroute.Models; -using OrchardCore.ContentFields.Fields; -using OrchardCore.ContentFields.Settings; -using OrchardCore.ContentManagement.Metadata; -using OrchardCore.ContentManagement.Metadata.Settings; -using OrchardCore.Data.Migration; -using OrchardCore.Flows.Models; -using OrchardCore.Lists.Models; - -namespace OapTheme; -public sealed class Migrations : DataMigration -{ - public Migrations(IContentDefinitionManager contentDefinitionManager) - { - m_contentDefinitionManager = contentDefinitionManager; - } - - public async Task Create() - { - await m_contentDefinitionManager.AlterTypeDefinitionAsync("ApplicationFormStep", type => type - .Draftable() - .Versionable() - .WithPart("ApplicationFormStep", part => part - .WithPosition("1")) - .WithPart("Autoroute", part => part - .WithPosition("2") - .WithSettings(new AutoroutePartSettings - { - AllowCustomPath = true, - AllowUpdatePath = true, - })) - .WithPart("Form", part => part - .WithPosition("3") - .WithSettings(new FlowPartSettings - { - ContainedContentTypes = new[] - { - "Form", - } - }))); - - await m_contentDefinitionManager.AlterPartDefinitionAsync("ApplicationFormStep", part => part - .WithField("Heading", field => field - .WithPosition("1") - .WithSettings(new TextFieldSettings - { - Hint = "Text to display at the top of the form step, above the instructions.", - Required = true, - })) - .WithField("Instructions", field => field - .WithPosition("2") - .WithEditor("Wysiwyg") - .WithSettings(new HtmlFieldSettings - { - SanitizeHtml = true, - }))); - - await m_contentDefinitionManager.AlterTypeDefinitionAsync("ApplicationForm", type => type - .DisplayedAs("Application Form") - .Draftable() - .Versionable() - .Securable() - .Listable() - .Creatable() - .WithPart("Autoroute", part => part - .WithPosition("2") - .WithSettings(new AutoroutePartSettings - { - AllowCustomPath = true, - AllowUpdatePath = true, - })) - .WithPart("Form Steps", part => part - .WithPosition("3") - .WithSettings(new ListPartSettings - { - PageSize = 10, - EnableOrdering = true, - ContainedContentTypes = new[] - { - "ApplicationFormStep", - } - }))); - - return 1; - } - - private readonly IContentDefinitionManager m_contentDefinitionManager; -} diff --git a/src/Themes/OapTheme/Views/HtmlBodyPart.liquid b/src/Themes/OapTheme/Views/HtmlBodyPart.liquid deleted file mode 100644 index b8dc459..0000000 --- a/src/Themes/OapTheme/Views/HtmlBodyPart.liquid +++ /dev/null @@ -1,3 +0,0 @@ -
- {{ Model.Html | sanitize_html | raw }} -
diff --git a/src/Themes/OapTheme/Views/Layout.liquid b/src/Themes/OapTheme/Views/Layout.liquid deleted file mode 100644 index 2457e19..0000000 --- a/src/Themes/OapTheme/Views/Layout.liquid +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - {% page_title Site.SiteName, position: "before", separator: " - " %} - - {% resources type: "Meta" %} - - {% link type: "image/x-icon", rel: "shortcut icon", href: "~/OapTheme/assets/favicon.ico" %} - - {% style name: "oaptheme-styles" %} - - {% resources type: "HeadLink" %} - {% resources type: "Stylesheet" %} - {% resources type: "HeadScript" %} - - - - {% render_section "Header", required: false %} - - {% render_body %} - - {% render_section "Footer", required: false %} - - {% resources type: "FootScript" %} - - - diff --git a/src/Themes/OapTheme/Views/Shared/NotFound.liquid b/src/Themes/OapTheme/Views/Shared/NotFound.liquid deleted file mode 100644 index eff68bf..0000000 --- a/src/Themes/OapTheme/Views/Shared/NotFound.liquid +++ /dev/null @@ -1,10 +0,0 @@ -
-

404 : Page not found

-

- Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. -

-

- Head back home - to try finding it again. -

-
\ No newline at end of file diff --git a/src/Twain.Web/Twain.Web.csproj b/src/Twain.Web/Twain.Web.csproj index 3408375..5288654 100644 --- a/src/Twain.Web/Twain.Web.csproj +++ b/src/Twain.Web/Twain.Web.csproj @@ -24,10 +24,12 @@ + - - - + + + +