From 42e614993bc721da707ceb3c22f5604af4514386 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 5 Jun 2020 13:24:44 +0300 Subject: [PATCH 01/10] blog admin separation: created solution folders --- modules/blogging/Volo.Blogging.sln | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/modules/blogging/Volo.Blogging.sln b/modules/blogging/Volo.Blogging.sln index 454f1e6a960..24554429a5c 100644 --- a/modules/blogging/Volo.Blogging.sln +++ b/modules/blogging/Volo.Blogging.sln @@ -43,6 +43,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Blogging.MongoDB.Tests EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Blogging.Domain.Tests", "test\Volo.Blogging.Domain.Tests\Volo.Blogging.Domain.Tests.csproj", "{B6D7EF20-9921-490A-AA95-47E3E174DC9B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "admin-app", "admin-app", "{BE2A423C-271E-469A-AD90-5640DEBEE9C1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "domain", "domain", "{A9EF3061-5205-46C7-ACAA-23931CB98E4F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "public-app", "public-app", "{1314C122-18F0-4C6B-895F-27645B6121FF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -122,23 +128,26 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {F1D954AD-001A-4533-A8CC-94DDCF70B552} = {42BF26EF-B8C7-42DC-9FFB-3653109B7776} - {9F3AECDD-0B96-4EB4-BB86-59B488350B76} = {42BF26EF-B8C7-42DC-9FFB-3653109B7776} - {237BF49B-5FD8-413C-BBD7-2313D91D0553} = {42BF26EF-B8C7-42DC-9FFB-3653109B7776} - {1678D922-E56D-4D6F-94F5-12AD13C1D919} = {42BF26EF-B8C7-42DC-9FFB-3653109B7776} - {87A423C6-900E-4D59-A4F2-B7C49D91E6F0} = {42BF26EF-B8C7-42DC-9FFB-3653109B7776} - {C20F42B4-0E93-43D3-B7CD-363D7E1B4750} = {42BF26EF-B8C7-42DC-9FFB-3653109B7776} - {03328648-6DE6-43C1-9A27-64771A73FAAD} = {42BF26EF-B8C7-42DC-9FFB-3653109B7776} - {A4DBA051-7FB9-4AD7-B9B7-6810B2268122} = {42BF26EF-B8C7-42DC-9FFB-3653109B7776} {0D50B2EE-5F62-4C1D-B04D-56BE0CF75967} = {EB4FB44A-FE39-4245-9DAD-D6437BCE3870} {14409939-5A35-4145-A5C4-F3AED1617243} = {EB4FB44A-FE39-4245-9DAD-D6437BCE3870} {BBE8D8BE-1B24-49FE-86EF-3848D4BB6829} = {25B3A516-5C0D-42E3-9294-E8A9346CEE4B} {0B9AAD44-1FCF-4AF1-838F-A09446E98E37} = {25B3A516-5C0D-42E3-9294-E8A9346CEE4B} {C949B953-80B3-4B36-B535-1AD74A34FEAC} = {25B3A516-5C0D-42E3-9294-E8A9346CEE4B} - {98C2D36A-F874-405D-8565-9CE59438E879} = {42BF26EF-B8C7-42DC-9FFB-3653109B7776} {4C818374-2DE8-422F-8585-975E8366DB26} = {EB4FB44A-FE39-4245-9DAD-D6437BCE3870} {0A29F64C-11F1-40B6-8E6D-91E86823775E} = {25B3A516-5C0D-42E3-9294-E8A9346CEE4B} {B6D7EF20-9921-490A-AA95-47E3E174DC9B} = {25B3A516-5C0D-42E3-9294-E8A9346CEE4B} + {BE2A423C-271E-469A-AD90-5640DEBEE9C1} = {42BF26EF-B8C7-42DC-9FFB-3653109B7776} + {A9EF3061-5205-46C7-ACAA-23931CB98E4F} = {42BF26EF-B8C7-42DC-9FFB-3653109B7776} + {1314C122-18F0-4C6B-895F-27645B6121FF} = {42BF26EF-B8C7-42DC-9FFB-3653109B7776} + {9F3AECDD-0B96-4EB4-BB86-59B488350B76} = {A9EF3061-5205-46C7-ACAA-23931CB98E4F} + {F1D954AD-001A-4533-A8CC-94DDCF70B552} = {A9EF3061-5205-46C7-ACAA-23931CB98E4F} + {87A423C6-900E-4D59-A4F2-B7C49D91E6F0} = {A9EF3061-5205-46C7-ACAA-23931CB98E4F} + {98C2D36A-F874-405D-8565-9CE59438E879} = {A9EF3061-5205-46C7-ACAA-23931CB98E4F} + {1678D922-E56D-4D6F-94F5-12AD13C1D919} = {1314C122-18F0-4C6B-895F-27645B6121FF} + {237BF49B-5FD8-413C-BBD7-2313D91D0553} = {1314C122-18F0-4C6B-895F-27645B6121FF} + {C20F42B4-0E93-43D3-B7CD-363D7E1B4750} = {1314C122-18F0-4C6B-895F-27645B6121FF} + {03328648-6DE6-43C1-9A27-64771A73FAAD} = {1314C122-18F0-4C6B-895F-27645B6121FF} + {A4DBA051-7FB9-4AD7-B9B7-6810B2268122} = {1314C122-18F0-4C6B-895F-27645B6121FF} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F2BAE819-78D4-407A-9201-22473B2850B0} From ec863c2d3cf3fbc8802b55a0f59bbd676e751147 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 5 Jun 2020 13:49:22 +0300 Subject: [PATCH 02/10] blog admin separation: separated applciation.contracts --- modules/blogging/Volo.Blogging.sln | 7 +++++ ...logging.Admin.Application.Contracts.csproj | 31 +++++++++++++++++++ ...BloggingAdminApplicationContractsModule.cs | 25 +++++++++++++++ ...oggingAdminPermissionDefinitionProvider.cs | 25 +++++++++++++++ .../Admin/BloggingAdminPermissions.cs | 23 ++++++++++++++ .../Admin/BloggingAdminRemoteServiceConsts.cs | 7 +++++ .../Volo/Blogging/Admin/Blogs/BlogDto.cs | 14 +++++++++ .../Blogging/Admin/Blogs}/CreateBlogDto.cs | 4 +-- .../Admin/Blogs/IBlogManagementAppService.cs | 20 ++++++++++++ .../Blogging/Admin/Blogs}/UpdateBlogDto.cs | 4 +-- .../Admin/ApplicationContracts/cs.json | 11 +++++++ .../Admin/ApplicationContracts/de.json | 11 +++++++ .../Admin/ApplicationContracts/en.json | 11 +++++++ .../Admin/ApplicationContracts/nl.json | 11 +++++++ .../Admin/ApplicationContracts/pl-PL.json | 11 +++++++ .../Admin/ApplicationContracts/pt-BR.json | 11 +++++++ .../Admin/ApplicationContracts/sl.json | 11 +++++++ .../Admin/ApplicationContracts/tr.json | 11 +++++++ .../Admin/ApplicationContracts/vi.json | 11 +++++++ .../Admin/ApplicationContracts/zh-Hans.json | 11 +++++++ .../Admin/ApplicationContracts/zh-Hant.json | 11 +++++++ .../BloggingPermissionDefinitionProvider.cs | 6 ---- .../Volo/Blogging/BloggingPermissions.cs | 9 ------ .../Volo/Blogging/Blogs/IBlogAppService.cs | 6 ---- .../Blogging/ApplicationContracts/cs.json | 6 +--- .../Blogging/ApplicationContracts/de.json | 10 ++---- .../Blogging/ApplicationContracts/en.json | 8 ++--- .../Blogging/ApplicationContracts/nl.json | 8 ++--- .../Blogging/ApplicationContracts/pl-PL.json | 8 ++--- .../Blogging/ApplicationContracts/pt-BR.json | 8 ++--- .../Blogging/ApplicationContracts/sl.json | 9 ++---- .../Blogging/ApplicationContracts/tr.json | 8 ++--- .../Blogging/ApplicationContracts/vi.json | 6 +--- .../ApplicationContracts/zh-Hans.json | 8 ++--- .../ApplicationContracts/zh-Hant.json | 8 ++--- 35 files changed, 298 insertions(+), 91 deletions(-) create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo.Blogging.Admin.Application.Contracts.csproj create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminApplicationContractsModule.cs create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminPermissionDefinitionProvider.cs create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminPermissions.cs create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminRemoteServiceConsts.cs create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/BlogDto.cs rename modules/blogging/src/{Volo.Blogging.Application.Contracts/Volo/Blogging/Blogs/Dtos => Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs}/CreateBlogDto.cs (82%) create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/IBlogManagementAppService.cs rename modules/blogging/src/{Volo.Blogging.Application.Contracts/Volo/Blogging/Blogs/Dtos => Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs}/UpdateBlogDto.cs (81%) create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/cs.json create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/de.json create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/en.json create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/nl.json create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/pl-PL.json create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/pt-BR.json create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/sl.json create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/tr.json create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/vi.json create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/zh-Hans.json create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/zh-Hant.json diff --git a/modules/blogging/Volo.Blogging.sln b/modules/blogging/Volo.Blogging.sln index 24554429a5c..0ccc23d2435 100644 --- a/modules/blogging/Volo.Blogging.sln +++ b/modules/blogging/Volo.Blogging.sln @@ -49,6 +49,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "domain", "domain", "{A9EF30 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "public-app", "public-app", "{1314C122-18F0-4C6B-895F-27645B6121FF}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Blogging.Admin.Application.Contracts", "src\Volo.Blogging.Admin.Application.Contracts\Volo.Blogging.Admin.Application.Contracts.csproj", "{D8DF4D56-644E-4ADF-9DB9-712DDA62B129}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -123,6 +125,10 @@ Global {B6D7EF20-9921-490A-AA95-47E3E174DC9B}.Debug|Any CPU.Build.0 = Debug|Any CPU {B6D7EF20-9921-490A-AA95-47E3E174DC9B}.Release|Any CPU.ActiveCfg = Release|Any CPU {B6D7EF20-9921-490A-AA95-47E3E174DC9B}.Release|Any CPU.Build.0 = Release|Any CPU + {D8DF4D56-644E-4ADF-9DB9-712DDA62B129}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8DF4D56-644E-4ADF-9DB9-712DDA62B129}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8DF4D56-644E-4ADF-9DB9-712DDA62B129}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8DF4D56-644E-4ADF-9DB9-712DDA62B129}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -148,6 +154,7 @@ Global {C20F42B4-0E93-43D3-B7CD-363D7E1B4750} = {1314C122-18F0-4C6B-895F-27645B6121FF} {03328648-6DE6-43C1-9A27-64771A73FAAD} = {1314C122-18F0-4C6B-895F-27645B6121FF} {A4DBA051-7FB9-4AD7-B9B7-6810B2268122} = {1314C122-18F0-4C6B-895F-27645B6121FF} + {D8DF4D56-644E-4ADF-9DB9-712DDA62B129} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F2BAE819-78D4-407A-9201-22473B2850B0} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo.Blogging.Admin.Application.Contracts.csproj b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo.Blogging.Admin.Application.Contracts.csproj new file mode 100644 index 00000000000..e7f7b6a8b5b --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo.Blogging.Admin.Application.Contracts.csproj @@ -0,0 +1,31 @@ + + + + + + + netstandard2.0 + Volo.Blogging.Admin.Application.Contracts + Volo.Blogging.Admin.Application.Contracts + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminApplicationContractsModule.cs b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminApplicationContractsModule.cs new file mode 100644 index 00000000000..5a192069c79 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminApplicationContractsModule.cs @@ -0,0 +1,25 @@ +using Volo.Abp.Localization; +using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; +using Volo.Blogging.Localization; + +namespace Volo.Blogging.Admin +{ + [DependsOn(typeof(BloggingDomainSharedModule))] + public class BloggingAdminApplicationContractsModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + Configure(options => + { + options.Resources + .Get() + .AddVirtualJson("Volo/Blogging/Localization/Resources/Blogging/Admin/ApplicationContracts"); + }); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminPermissionDefinitionProvider.cs b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminPermissionDefinitionProvider.cs new file mode 100644 index 00000000000..77c8f98e62c --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminPermissionDefinitionProvider.cs @@ -0,0 +1,25 @@ +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Localization; +using Volo.Blogging.Localization; + +namespace Volo.Blogging.Admin +{ + public class BloggingAdminPermissionDefinitionProvider : PermissionDefinitionProvider + { + public override void Define(IPermissionDefinitionContext context) + { + var bloggingGroup = context.AddGroup(BloggingAdminPermissions.GroupName, L("Permission:BloggingAdmin")); + + var blogs = bloggingGroup.AddPermission(BloggingAdminPermissions.Blogs.Default, L("Permission:Blogs")); + blogs.AddChild(BloggingAdminPermissions.Blogs.Management, L("Permission:Management")); + blogs.AddChild(BloggingAdminPermissions.Blogs.Update, L("Permission:Edit")); + blogs.AddChild(BloggingAdminPermissions.Blogs.Delete, L("Permission:Delete")); + blogs.AddChild(BloggingAdminPermissions.Blogs.Create, L("Permission:Create")); + } + + private static LocalizableString L(string name) + { + return LocalizableString.Create(name); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminPermissions.cs b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminPermissions.cs new file mode 100644 index 00000000000..9150af601b6 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminPermissions.cs @@ -0,0 +1,23 @@ +using Volo.Abp.Reflection; + +namespace Volo.Blogging.Admin +{ + public class BloggingAdminPermissions + { + public const string GroupName = "Blogging.Admin"; + + public static class Blogs + { + public const string Default = GroupName + ".Blog"; + public const string Management = Default + ".Management"; + public const string Delete = Default + ".Delete"; + public const string Update = Default + ".Update"; + public const string Create = Default + ".Create"; + } + + public static string[] GetAll() + { + return ReflectionHelper.GetPublicConstantsRecursively(typeof(BloggingAdminPermissions)); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminRemoteServiceConsts.cs b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminRemoteServiceConsts.cs new file mode 100644 index 00000000000..1c4282adad8 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminRemoteServiceConsts.cs @@ -0,0 +1,7 @@ +namespace Volo.Blogging.Admin +{ + public static class BloggingAdminRemoteServiceConsts + { + public const string RemoteServiceName = "BloggingAdmin"; + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/BlogDto.cs b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/BlogDto.cs new file mode 100644 index 00000000000..38b87e277ca --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/BlogDto.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace Volo.Blogging.Admin.Blogs +{ + public class BlogDto : FullAuditedEntityDto + { + public string Name { get; set; } + + public string ShortName { get; set; } + + public string Description { get; set; } + } +} diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Blogs/Dtos/CreateBlogDto.cs b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/CreateBlogDto.cs similarity index 82% rename from modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Blogs/Dtos/CreateBlogDto.cs rename to modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/CreateBlogDto.cs index 802e271e33a..5f473114041 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Blogs/Dtos/CreateBlogDto.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/CreateBlogDto.cs @@ -1,4 +1,4 @@ -namespace Volo.Blogging.Blogs.Dtos +namespace Volo.Blogging.Admin.Blogs { public class CreateBlogDto { @@ -8,4 +8,4 @@ public class CreateBlogDto public string Description { get; set; } } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/IBlogManagementAppService.cs b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/IBlogManagementAppService.cs new file mode 100644 index 00000000000..097945418f3 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/IBlogManagementAppService.cs @@ -0,0 +1,20 @@ +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Volo.Blogging.Admin.Blogs +{ + public interface IBlogManagementAppService : IApplicationService + { + Task> GetListAsync(); + + Task GetAsync(Guid id); + + Task Create(CreateBlogDto input); + + Task Update(Guid id, UpdateBlogDto input); + + Task Delete(Guid id); + } +} diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Blogs/Dtos/UpdateBlogDto.cs b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/UpdateBlogDto.cs similarity index 81% rename from modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Blogs/Dtos/UpdateBlogDto.cs rename to modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/UpdateBlogDto.cs index 2e3b0b7b4e0..529ace6e0d5 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Blogs/Dtos/UpdateBlogDto.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/UpdateBlogDto.cs @@ -1,4 +1,4 @@ -namespace Volo.Blogging.Blogs.Dtos +namespace Volo.Blogging.Admin.Blogs { public class UpdateBlogDto { @@ -8,4 +8,4 @@ public class UpdateBlogDto public string Description { get; set; } } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/cs.json b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/cs.json new file mode 100644 index 00000000000..1c8657c85c4 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/cs.json @@ -0,0 +1,11 @@ +{ + "culture": "cs", + "texts": { + "Permission:BloggingAdmin": "Blog", + "Permission:Blogs": "Blogy", + "Permission:Management": "Správa", + "Permission:Edit": "Upravit", + "Permission:Create": "Vytvořit", + "Permission:Delete": "Smazat" + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/de.json b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/de.json new file mode 100644 index 00000000000..5666cbb3688 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/de.json @@ -0,0 +1,11 @@ +{ + "culture": "de", + "texts": { + "Permission:BloggingAdmin": "Blog", + "Permission:Blogs": "Blogs", + "Permission:Management": "Verwaltung", + "Permission:Edit": "Bearbeiten", + "Permission:Create": "Erstellen", + "Permission:Delete": "Löschen" + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/en.json b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/en.json new file mode 100644 index 00000000000..2cc854a2f36 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/en.json @@ -0,0 +1,11 @@ +{ + "culture": "en", + "texts": { + "Permission:BloggingAdmin": "Blog", + "Permission:Blogs": "Blogs", + "Permission:Management": "Management", + "Permission:Edit": "Edit", + "Permission:Create": "Create", + "Permission:Delete": "Delete" + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/nl.json b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/nl.json new file mode 100644 index 00000000000..c1174611c1e --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/nl.json @@ -0,0 +1,11 @@ +{ + "culture": "nl", + "texts": { + "Permission:BloggingAdmin": "Blog", + "Permission:Blogs": "Blogs", + "Permission:Management": "Beheer", + "Permission:Edit": "Bewerk", + "Permission:Create": "Maak aan", + "Permission:Delete": "Verwijder" + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/pl-PL.json b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/pl-PL.json new file mode 100644 index 00000000000..e8f61354563 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/pl-PL.json @@ -0,0 +1,11 @@ +{ + "culture": "pl-PL", + "texts": { + "Permission:BloggingAdmin": "Blog", + "Permission:Blogs": "Blogi", + "Permission:Management": "Zarządzanie", + "Permission:Edit": "Edytuj", + "Permission:Create": "Utwórz", + "Permission:Delete": "Usuń" + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/pt-BR.json b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/pt-BR.json new file mode 100644 index 00000000000..09fd08fe5ac --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/pt-BR.json @@ -0,0 +1,11 @@ +{ + "culture": "pt-BR", + "texts": { + "Permission:BloggingAdmin": "Blog", + "Permission:Blogs": "Blogs", + "Permission:Management": "Gerenciamento", + "Permission:Edit": "Editar", + "Permission:Create": "Criar", + "Permission:Delete": "Excluir" + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/sl.json b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/sl.json new file mode 100644 index 00000000000..455c49008ca --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/sl.json @@ -0,0 +1,11 @@ +{ + "culture": "sl", + "texts": { + "Permission:BloggingAdmin": "Blog", + "Permission:Blogs": "Blogi", + "Permission:Management": "Upravljanje", + "Permission:Edit": "Urejanje", + "Permission:Create": "Ustvarjanje", + "Permission:Delete": "Brisanje" + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/tr.json b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/tr.json new file mode 100644 index 00000000000..dedb5d3dd6e --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/tr.json @@ -0,0 +1,11 @@ +{ + "culture": "tr", + "texts": { + "Permission:BloggingAdmin": "Blog", + "Permission:Blogs": "Bloglar", + "Permission:Management": "Yönetme", + "Permission:Edit": "Düzenle", + "Permission:Create": "Ekle", + "Permission:Delete": "Sil" + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/vi.json b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/vi.json new file mode 100644 index 00000000000..387083b1005 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/vi.json @@ -0,0 +1,11 @@ +{ + "culture": "vi", + "texts": { + "Permission:BloggingAdmin": "Blog", + "Permission:Blogs": "Blogs", + "Permission:Management": "Quản lý", + "Permission:Edit": "Sửa", + "Permission:Create": "Tạo", + "Permission:Delete": "Xóa" + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/zh-Hans.json b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/zh-Hans.json new file mode 100644 index 00000000000..a17bb45c097 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/zh-Hans.json @@ -0,0 +1,11 @@ +{ + "culture": "zh-Hans", + "texts": { + "Permission:BloggingAdmin": "博客", + "Permission:Blogs": "博客", + "Permission:Management": "管理", + "Permission:Edit": "编辑", + "Permission:Create": "创建", + "Permission:Delete": "删除" + } + } diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/zh-Hant.json b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/zh-Hant.json new file mode 100644 index 00000000000..2d2d28dcbba --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/zh-Hant.json @@ -0,0 +1,11 @@ +{ + "culture": "zh-Hant", + "texts": { + "Permission:BloggingAdmin": "部落格", + "Permission:Blogs": "部落格", + "Permission:Management": "管理", + "Permission:Edit": "標及", + "Permission:Create": "新增", + "Permission:Delete": "刪除" + } + } diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingPermissionDefinitionProvider.cs b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingPermissionDefinitionProvider.cs index 65a6ab1ab73..6c2361230de 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingPermissionDefinitionProvider.cs +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingPermissionDefinitionProvider.cs @@ -10,12 +10,6 @@ public override void Define(IPermissionDefinitionContext context) { var bloggingGroup = context.AddGroup(BloggingPermissions.GroupName, L("Permission:Blogging")); - var blogs = bloggingGroup.AddPermission(BloggingPermissions.Blogs.Default, L("Permission:Blogs")); - blogs.AddChild(BloggingPermissions.Blogs.Management, L("Permission:Management")); - blogs.AddChild(BloggingPermissions.Blogs.Update, L("Permission:Edit")); - blogs.AddChild(BloggingPermissions.Blogs.Delete, L("Permission:Delete")); - blogs.AddChild(BloggingPermissions.Blogs.Create, L("Permission:Create")); - var posts = bloggingGroup.AddPermission(BloggingPermissions.Posts.Default, L("Permission:Posts")); posts.AddChild(BloggingPermissions.Posts.Update, L("Permission:Edit")); posts.AddChild(BloggingPermissions.Posts.Delete, L("Permission:Delete")); diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingPermissions.cs b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingPermissions.cs index fae85acf880..7aa05452e33 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingPermissions.cs +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingPermissions.cs @@ -6,15 +6,6 @@ public class BloggingPermissions { public const string GroupName = "Blogging"; - public static class Blogs - { - public const string Default = GroupName + ".Blog"; - public const string Management = Default + ".Management"; - public const string Delete = Default + ".Delete"; - public const string Update = Default + ".Update"; - public const string Create = Default + ".Create"; - } - public static class Posts { public const string Default = GroupName + ".Post"; diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Blogs/IBlogAppService.cs b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Blogs/IBlogAppService.cs index fbac86d827a..0710101b93c 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Blogs/IBlogAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Blogs/IBlogAppService.cs @@ -13,11 +13,5 @@ public interface IBlogAppService : IApplicationService Task GetByShortNameAsync(string shortName); Task GetAsync(Guid id); - - Task Create(CreateBlogDto input); - - Task Update(Guid id, UpdateBlogDto input); - - Task Delete(Guid id); } } diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/cs.json b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/cs.json index 5b11dd808cc..30063c1d6d2 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/cs.json +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/cs.json @@ -5,10 +5,6 @@ "Permission:Blogs": "Blogy", "Permission:Posts": "Příspěvky", "Permission:Tags": "Tagy", - "Permission:Comments": "Komentáře", - "Permission:Management": "Správa", - "Permission:Edit": "Upravit", - "Permission:Create": "Vytvořit", - "Permission:Delete": "Smazat" + "Permission:Comments": "Komentáře" } } diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/de.json b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/de.json index 9455b3cd449..9f2a7d45107 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/de.json +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/de.json @@ -3,12 +3,8 @@ "texts": { "Permission:Blogging": "Blog", "Permission:Blogs": "Blogs", - "Permission:Posts": "Beitr�ge", + "Permission:Posts": "Beitr�ge", "Permission:Tags": "Tags", - "Permission:Comments": "Kommentare", - "Permission:Management": "Verwaltung", - "Permission:Edit": "Bearbeiten", - "Permission:Create": "Erstellen", - "Permission:Delete": "L�schen" + "Permission:Comments": "Kommentare" } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/en.json b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/en.json index 425f8733bb5..eb70a98276a 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/en.json +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/en.json @@ -5,10 +5,6 @@ "Permission:Blogs": "Blogs", "Permission:Posts": "Posts", "Permission:Tags": "Tags", - "Permission:Comments": "Comments", - "Permission:Management": "Management", - "Permission:Edit": "Edit", - "Permission:Create": "Create", - "Permission:Delete": "Delete" + "Permission:Comments": "Comments" } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/nl.json b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/nl.json index 7e34f16b79e..70440c84701 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/nl.json +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/nl.json @@ -5,10 +5,6 @@ "Permission:Blogs": "Blogs", "Permission:Posts": "Posts", "Permission:Tags": "Tags", - "Permission:Comments": "Kommentaar", - "Permission:Management": "Beheer", - "Permission:Edit": "Bewerk", - "Permission:Create": "Maak aan", - "Permission:Delete": "Verwijder" + "Permission:Comments": "Kommentaar" } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/pl-PL.json b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/pl-PL.json index 05ba8451c65..2a223d536bc 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/pl-PL.json +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/pl-PL.json @@ -5,10 +5,6 @@ "Permission:Blogs": "Blogi", "Permission:Posts": "Posty", "Permission:Tags": "Tagi", - "Permission:Comments": "Komentarze", - "Permission:Management": "Zarządzanie", - "Permission:Edit": "Edytuj", - "Permission:Create": "Utwórz", - "Permission:Delete": "Usuń" + "Permission:Comments": "Komentarze" } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/pt-BR.json b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/pt-BR.json index 364e0303e57..9dd2977079c 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/pt-BR.json +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/pt-BR.json @@ -5,10 +5,6 @@ "Permission:Blogs": "Blogs", "Permission:Posts": "Postagens", "Permission:Tags": "Etiquetas", - "Permission:Comments": "Comentários", - "Permission:Management": "Gerenciamento", - "Permission:Edit": "Editar", - "Permission:Create": "Criar", - "Permission:Delete": "Excluir" + "Permission:Comments": "Comentários" } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/sl.json b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/sl.json index a834583f0ad..34f2f2987c0 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/sl.json +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/sl.json @@ -5,10 +5,5 @@ "Permission:Blogs": "Blogi", "Permission:Posts": "Objave", "Permission:Tags": "Oznake", - "Permission:Comments": "Komentarji", - "Permission:Management": "Upravljanje", - "Permission:Edit": "Urejanje", - "Permission:Create": "Ustvarjanje", - "Permission:Delete": "Brisanje" - } -} \ No newline at end of file + "Permission:Comments": "Komentarji" +} diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/tr.json b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/tr.json index 9444a12b7b5..1d158bc6649 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/tr.json +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/tr.json @@ -5,10 +5,6 @@ "Permission:Blogs": "Bloglar", "Permission:Posts": "Yazılar", "Permission:Tags": "Etiketler", - "Permission:Comments": "Yorumlar", - "Permission:Management": "Yönetme", - "Permission:Edit": "Düzenle", - "Permission:Create": "Ekle", - "Permission:Delete": "Sil" + "Permission:Comments": "Yorumlar" } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/vi.json b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/vi.json index a32ee04bb9f..2f65d48fae6 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/vi.json +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/vi.json @@ -5,10 +5,6 @@ "Permission:Blogs": "Blogs", "Permission:Posts": "Bài viết", "Permission:Tags": "Thẻ", - "Permission:Comments": "Bình luận", - "Permission:Management": "Quản lý", - "Permission:Edit": "Sửa", - "Permission:Create": "Tạo", - "Permission:Delete": "Xóa" + "Permission:Comments": "Bình luận" } } diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hans.json b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hans.json index 16dd399bc0b..83fc688ab6d 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hans.json +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hans.json @@ -5,10 +5,6 @@ "Permission:Blogs": "博客", "Permission:Posts": "帖子", "Permission:Tags": "标签", - "Permission:Comments": "评论", - "Permission:Management": "管理", - "Permission:Edit": "编辑", - "Permission:Create": "创建", - "Permission:Delete": "删除" + "Permission:Comments": "评论" } - } \ No newline at end of file + } diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hant.json b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hant.json index bca246ba43b..b51405cb27b 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hant.json +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hant.json @@ -5,10 +5,6 @@ "Permission:Blogs": "部落格", "Permission:Posts": "文章", "Permission:Tags": "標籤", - "Permission:Comments": "評論", - "Permission:Management": "管理", - "Permission:Edit": "標及", - "Permission:Create": "新增", - "Permission:Delete": "刪除" + "Permission:Comments": "評論" } - } \ No newline at end of file + } From 493bf50037590cfe10fe989411f5b5cf12dac8af Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 5 Jun 2020 14:12:40 +0300 Subject: [PATCH 03/10] blog admin separation: application & httpApi --- modules/blogging/Volo.Blogging.sln | 14 ++++ .../Volo.Blogging.Admin.Application.csproj | 20 ++++++ .../Admin/BloggingAdminAppServiceBase.cs | 14 ++++ ...oggingAdminApplicationAutoMapperProfile.cs | 14 ++++ .../Admin/BloggingAdminApplicationModule.cs | 27 ++++++++ .../Admin/Blogs/BlogManagementAppService.cs | 64 +++++++++++++++++++ .../Volo.Blogging.Admin.HttpApi.csproj | 18 ++++++ .../Admin/BlogManagementController.cs | 56 ++++++++++++++++ .../Admin/BloggingAdminHttpApiModule.cs | 33 ++++++++++ .../Volo/Blogging/Blogs/BlogAppService.cs | 29 --------- .../Volo/Blogging/BlogsController.cs | 20 ------ 11 files changed, 260 insertions(+), 49 deletions(-) create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.csproj create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminAppServiceBase.cs create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationAutoMapperProfile.cs create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationModule.cs create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/Blogs/BlogManagementAppService.cs create mode 100644 modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo.Blogging.Admin.HttpApi.csproj create mode 100644 modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BlogManagementController.cs create mode 100644 modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BloggingAdminHttpApiModule.cs diff --git a/modules/blogging/Volo.Blogging.sln b/modules/blogging/Volo.Blogging.sln index 0ccc23d2435..7a3ceccf61b 100644 --- a/modules/blogging/Volo.Blogging.sln +++ b/modules/blogging/Volo.Blogging.sln @@ -51,6 +51,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "public-app", "public-app", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Blogging.Admin.Application.Contracts", "src\Volo.Blogging.Admin.Application.Contracts\Volo.Blogging.Admin.Application.Contracts.csproj", "{D8DF4D56-644E-4ADF-9DB9-712DDA62B129}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Blogging.Admin.Application", "src\Volo.Blogging.Admin.Application\Volo.Blogging.Admin.Application.csproj", "{CB5DEBB3-5C2E-48E9-AA42-497575BCC7A4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Blogging.Admin.HttpApi", "src\Volo.Blogging.Admin.HttpApi\Volo.Blogging.Admin.HttpApi.csproj", "{59BBAF94-CC8E-4313-9143-F2F5C36A7C45}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -129,6 +133,14 @@ Global {D8DF4D56-644E-4ADF-9DB9-712DDA62B129}.Debug|Any CPU.Build.0 = Debug|Any CPU {D8DF4D56-644E-4ADF-9DB9-712DDA62B129}.Release|Any CPU.ActiveCfg = Release|Any CPU {D8DF4D56-644E-4ADF-9DB9-712DDA62B129}.Release|Any CPU.Build.0 = Release|Any CPU + {CB5DEBB3-5C2E-48E9-AA42-497575BCC7A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB5DEBB3-5C2E-48E9-AA42-497575BCC7A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB5DEBB3-5C2E-48E9-AA42-497575BCC7A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB5DEBB3-5C2E-48E9-AA42-497575BCC7A4}.Release|Any CPU.Build.0 = Release|Any CPU + {59BBAF94-CC8E-4313-9143-F2F5C36A7C45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59BBAF94-CC8E-4313-9143-F2F5C36A7C45}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59BBAF94-CC8E-4313-9143-F2F5C36A7C45}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59BBAF94-CC8E-4313-9143-F2F5C36A7C45}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -155,6 +167,8 @@ Global {03328648-6DE6-43C1-9A27-64771A73FAAD} = {1314C122-18F0-4C6B-895F-27645B6121FF} {A4DBA051-7FB9-4AD7-B9B7-6810B2268122} = {1314C122-18F0-4C6B-895F-27645B6121FF} {D8DF4D56-644E-4ADF-9DB9-712DDA62B129} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1} + {CB5DEBB3-5C2E-48E9-AA42-497575BCC7A4} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1} + {59BBAF94-CC8E-4313-9143-F2F5C36A7C45} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F2BAE819-78D4-407A-9201-22473B2850B0} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.csproj b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.csproj new file mode 100644 index 00000000000..cf5354adb95 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.csproj @@ -0,0 +1,20 @@ + + + + + + + netstandard2.0 + Volo.Blogging.Admin.Application + Volo.Blogging.Admin.Application + + + + + + + + + + + diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminAppServiceBase.cs b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminAppServiceBase.cs new file mode 100644 index 00000000000..4e8ff9d3151 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminAppServiceBase.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Application.Services; +using Volo.Blogging.Localization; + +namespace Volo.Blogging.Admin +{ + public abstract class BloggingAdminAppServiceBase : ApplicationService + { + protected BloggingAdminAppServiceBase() + { + ObjectMapperContext = typeof(BloggingAdminApplicationModule); + LocalizationResource = typeof(BloggingResource); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationAutoMapperProfile.cs b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationAutoMapperProfile.cs new file mode 100644 index 00000000000..2f2cf745630 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationAutoMapperProfile.cs @@ -0,0 +1,14 @@ +using AutoMapper; +using Volo.Blogging.Admin.Blogs; +using Volo.Blogging.Blogs; + +namespace Volo.Blogging.Admin +{ + public class BloggingAdminApplicationAutoMapperProfile : Profile + { + public BloggingAdminApplicationAutoMapperProfile() + { + CreateMap(); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationModule.cs b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationModule.cs new file mode 100644 index 00000000000..2de8b3af07a --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationModule.cs @@ -0,0 +1,27 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AutoMapper; +using Volo.Abp.Caching; +using Volo.Abp.Modularity; +using Volo.Blogging.Comments; +using Volo.Blogging.Posts; + +namespace Volo.Blogging.Admin +{ + [DependsOn( + typeof(BloggingDomainModule), + typeof(BloggingAdminApplicationContractsModule), + typeof(AbpCachingModule), + typeof(AbpAutoMapperModule))] + public class BloggingAdminApplicationModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAutoMapperObjectMapper(); + Configure(options => + { + options.AddProfile(validate: true); + }); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/Blogs/BlogManagementAppService.cs b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/Blogs/BlogManagementAppService.cs new file mode 100644 index 00000000000..1f43085461a --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/Blogs/BlogManagementAppService.cs @@ -0,0 +1,64 @@ +using Microsoft.AspNetCore.Authorization; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Blogging.Blogs; + +namespace Volo.Blogging.Admin.Blogs +{ + public class BlogManagementAppService : BloggingAdminAppServiceBase, IBlogManagementAppService + { + private readonly IBlogRepository _blogRepository; + + public BlogManagementAppService(IBlogRepository blogRepository) + { + _blogRepository = blogRepository; + } + + public async Task> GetListAsync() + { + var blogs = await _blogRepository.GetListAsync(); + + return new ListResultDto( + ObjectMapper.Map, List>(blogs) + ); + } + + public async Task GetAsync(Guid id) + { + var blog = await _blogRepository.GetAsync(id); + + return ObjectMapper.Map(blog); + } + + [Authorize(BloggingAdminPermissions.Blogs.Create)] + public async Task Create(CreateBlogDto input) + { + var newBlog = await _blogRepository.InsertAsync(new Blog(GuidGenerator.Create(), input.Name, input.ShortName) + { + Description = input.Description + }); + + return ObjectMapper.Map(newBlog); + } + + [Authorize(BloggingAdminPermissions.Blogs.Update)] + public async Task Update(Guid id, UpdateBlogDto input) + { + var blog = await _blogRepository.GetAsync(id); + + blog.SetName(input.Name); + blog.SetShortName(input.ShortName); + blog.Description = input.Description; + + return ObjectMapper.Map(blog); + } + + [Authorize(BloggingAdminPermissions.Blogs.Delete)] + public async Task Delete(Guid id) + { + await _blogRepository.DeleteAsync(id); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo.Blogging.Admin.HttpApi.csproj b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo.Blogging.Admin.HttpApi.csproj new file mode 100644 index 00000000000..e9435610dfd --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo.Blogging.Admin.HttpApi.csproj @@ -0,0 +1,18 @@ + + + + + + + netcoreapp3.1 + Volo.Blogging.Admin.HttpApi + Volo.Blogging.Admin.HttpApi + + + + + + + + + diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BlogManagementController.cs b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BlogManagementController.cs new file mode 100644 index 00000000000..c59bad9bafd --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BlogManagementController.cs @@ -0,0 +1,56 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Blogging.Admin.Blogs; + +namespace Volo.Blogging.Admin +{ + [RemoteService(Name = BloggingAdminRemoteServiceConsts.RemoteServiceName)] + [Area("bloggingAdmin")] + [Route("api/blogging/blogs/admin")] + public class BlogManagementController : AbpController, IBlogManagementAppService + { + private readonly IBlogManagementAppService _blogManagementAppService; + + public BlogManagementController(IBlogManagementAppService blogManagementAppService) + { + _blogManagementAppService = blogManagementAppService; + } + + [HttpGet] + public async Task> GetListAsync() + { + return await _blogManagementAppService.GetListAsync(); + } + + [HttpGet] + [Route("{id}")] + public async Task GetAsync(Guid id) + { + return await _blogManagementAppService.GetAsync(id); + } + + [HttpPost] + public async Task Create(CreateBlogDto input) + { + return await _blogManagementAppService.Create(input); + } + + [HttpPut] + [Route("{id}")] + public async Task Update(Guid id, UpdateBlogDto input) + { + return await _blogManagementAppService.Update(id, input); + } + + [HttpDelete] + [Route("{id}")] + public async Task Delete(Guid id) + { + await _blogManagementAppService.Delete(id); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BloggingAdminHttpApiModule.cs b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BloggingAdminHttpApiModule.cs new file mode 100644 index 00000000000..bd88cc14d5e --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BloggingAdminHttpApiModule.cs @@ -0,0 +1,33 @@ +using Localization.Resources.AbpUi; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Localization; +using Volo.Abp.Modularity; +using Volo.Blogging.Localization; +using Microsoft.Extensions.DependencyInjection; + +namespace Volo.Blogging.Admin +{ + [DependsOn( + typeof(BloggingAdminApplicationContractsModule), + typeof(AbpAspNetCoreMvcModule))] + public class BloggingAdminHttpApiModule : AbpModule + { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(BloggingAdminHttpApiModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.Resources + .Get() + .AddBaseTypes(typeof(AbpUiResource)); + }); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Blogs/BlogAppService.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Blogs/BlogAppService.cs index 88b9a754101..1b0a903d2e7 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Blogs/BlogAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Blogs/BlogAppService.cs @@ -44,34 +44,5 @@ public async Task GetAsync(Guid id) return ObjectMapper.Map(blog); } - - [Authorize(BloggingPermissions.Blogs.Create)] - public async Task Create(CreateBlogDto input) - { - var newBlog = await _blogRepository.InsertAsync(new Blog(GuidGenerator.Create(), input.Name, input.ShortName) - { - Description = input.Description - }); - - return ObjectMapper.Map(newBlog); - } - - [Authorize(BloggingPermissions.Blogs.Update)] - public async Task Update(Guid id, UpdateBlogDto input) - { - var blog = await _blogRepository.GetAsync(id); - - blog.SetName(input.Name); - blog.SetShortName(input.ShortName); - blog.Description = input.Description; - - return ObjectMapper.Map(blog); - } - - [Authorize(BloggingPermissions.Blogs.Delete)] - public async Task Delete(Guid id) - { - await _blogRepository.DeleteAsync(id); - } } } diff --git a/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BlogsController.cs b/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BlogsController.cs index cb67ac3fb75..9ef141b3de1 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BlogsController.cs +++ b/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BlogsController.cs @@ -40,25 +40,5 @@ public async Task GetAsync(Guid id) { return await _blogAppService.GetAsync(id); } - - [HttpPost] - public async Task Create(CreateBlogDto input) - { - return await _blogAppService.Create(input); - } - - [HttpPut] - [Route("{id}")] - public async Task Update(Guid id, UpdateBlogDto input) - { - return await _blogAppService.Update(id, input); - } - - [HttpDelete] - [Route("{id}")] - public async Task Delete(Guid id) - { - await _blogAppService.Delete(id); - } } } From 2ed51718e4d96c50009b936bcc201c7c3c79798f Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 5 Jun 2020 14:19:03 +0300 Subject: [PATCH 04/10] blog admin separation: httpapi.client --- modules/blogging/Volo.Blogging.sln | 7 +++++++ .../Volo.Blogging.Admin.HttpApi.Client.csproj | 18 ++++++++++++++++++ .../Admin/BloggingAdminHttpApiClientModule.cs | 19 +++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo.Blogging.Admin.HttpApi.Client.csproj create mode 100644 modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo/Blogging/Admin/BloggingAdminHttpApiClientModule.cs diff --git a/modules/blogging/Volo.Blogging.sln b/modules/blogging/Volo.Blogging.sln index 7a3ceccf61b..ef368c71a0f 100644 --- a/modules/blogging/Volo.Blogging.sln +++ b/modules/blogging/Volo.Blogging.sln @@ -55,6 +55,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Blogging.Admin.Applica EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Blogging.Admin.HttpApi", "src\Volo.Blogging.Admin.HttpApi\Volo.Blogging.Admin.HttpApi.csproj", "{59BBAF94-CC8E-4313-9143-F2F5C36A7C45}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Blogging.Admin.HttpApi.Client", "src\Volo.Blogging.Admin.HttpApi.Client\Volo.Blogging.Admin.HttpApi.Client.csproj", "{58A63CC9-C886-448B-AB4E-068600294D86}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -141,6 +143,10 @@ Global {59BBAF94-CC8E-4313-9143-F2F5C36A7C45}.Debug|Any CPU.Build.0 = Debug|Any CPU {59BBAF94-CC8E-4313-9143-F2F5C36A7C45}.Release|Any CPU.ActiveCfg = Release|Any CPU {59BBAF94-CC8E-4313-9143-F2F5C36A7C45}.Release|Any CPU.Build.0 = Release|Any CPU + {58A63CC9-C886-448B-AB4E-068600294D86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58A63CC9-C886-448B-AB4E-068600294D86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58A63CC9-C886-448B-AB4E-068600294D86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58A63CC9-C886-448B-AB4E-068600294D86}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -169,6 +175,7 @@ Global {D8DF4D56-644E-4ADF-9DB9-712DDA62B129} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1} {CB5DEBB3-5C2E-48E9-AA42-497575BCC7A4} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1} {59BBAF94-CC8E-4313-9143-F2F5C36A7C45} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1} + {58A63CC9-C886-448B-AB4E-068600294D86} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F2BAE819-78D4-407A-9201-22473B2850B0} diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo.Blogging.Admin.HttpApi.Client.csproj b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo.Blogging.Admin.HttpApi.Client.csproj new file mode 100644 index 00000000000..55b11f728d2 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo.Blogging.Admin.HttpApi.Client.csproj @@ -0,0 +1,18 @@ + + + + + + + netstandard2.0 + Volo.Blogging.Admin.HttpApi.Client + Volo.Blogging.Admin.HttpApi.Client + + + + + + + + + diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo/Blogging/Admin/BloggingAdminHttpApiClientModule.cs b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo/Blogging/Admin/BloggingAdminHttpApiClientModule.cs new file mode 100644 index 00000000000..9ccb1b5d15d --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo/Blogging/Admin/BloggingAdminHttpApiClientModule.cs @@ -0,0 +1,19 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Http.Client; +using Volo.Abp.Modularity; + +namespace Volo.Blogging.Admin +{ + [DependsOn( + typeof(BloggingAdminApplicationContractsModule), + typeof(AbpHttpClientModule))] + public class BloggingAdminHttpApiClientModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddHttpClientProxies(typeof(BloggingAdminApplicationContractsModule).Assembly, + BloggingAdminRemoteServiceConsts.RemoteServiceName); + } + + } +} From f9c14c353b290fe94ee65cc4041d2829f175aa99 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 5 Jun 2020 14:19:55 +0300 Subject: [PATCH 05/10] blog admin separation: added FodyWeavers.xml --- .../Volo.Blogging.Admin.Application.Contracts/FodyWeavers.xml | 3 +++ .../src/Volo.Blogging.Admin.Application/FodyWeavers.xml | 3 +++ .../src/Volo.Blogging.Admin.HttpApi.Client/FodyWeavers.xml | 3 +++ .../blogging/src/Volo.Blogging.Admin.HttpApi/FodyWeavers.xml | 3 +++ 4 files changed, 12 insertions(+) create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/FodyWeavers.xml create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application/FodyWeavers.xml create mode 100644 modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/FodyWeavers.xml create mode 100644 modules/blogging/src/Volo.Blogging.Admin.HttpApi/FodyWeavers.xml diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/FodyWeavers.xml new file mode 100644 index 00000000000..be0de3a9084 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.Admin.Application/FodyWeavers.xml new file mode 100644 index 00000000000..be0de3a9084 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/FodyWeavers.xml new file mode 100644 index 00000000000..be0de3a9084 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/FodyWeavers.xml new file mode 100644 index 00000000000..be0de3a9084 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file From 50f7ad93ca172e147f59b0ed736410cd4dc7a79b Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 5 Jun 2020 14:47:23 +0300 Subject: [PATCH 06/10] blog admin separation: web --- modules/blogging/Volo.Blogging.sln | 7 ++ .../FodyWeavers.xsd | 30 +++++++ .../FodyWeavers.xsd | 30 +++++++ .../AbpBloggingAdminWebAutoMapperProfile.cs | 16 ++++ .../BloggingAdminMenuContributor.cs} | 15 ++-- .../BloggingAdminWebModule.cs | 53 ++++++++++++ .../Volo.Blogging.Admin.Web/FodyWeavers.xml | 3 + .../Volo.Blogging.Admin.Web/FodyWeavers.xsd | 30 +++++++ .../Pages/Blogging}/Admin/Blogs/Create.cshtml | 5 +- .../Blogging}/Admin/Blogs/Create.cshtml.cs | 17 ++-- .../Pages/Blogging}/Admin/Blogs/Edit.cshtml | 8 +- .../Blogging}/Admin/Blogs/Edit.cshtml.cs | 20 ++--- .../Pages/Blogging}/Admin/Blogs/Index.cshtml | 15 ++-- .../Blogging}/Admin/Blogs/Index.cshtml.cs | 10 +-- .../Pages/Blogging}/Admin/Blogs/create.js | 0 .../Pages/Blogging}/Admin/Blogs/edit.js | 0 .../Pages/Blogging}/Admin/Blogs/index.js | 8 +- .../Pages/BloggingAdminPage.cs | 17 ++++ .../Pages/BloggingAdminPageModel.cs | 12 +++ .../Pages/_ViewImports.cshtml | 5 ++ .../Properties/launchSettings.json | 27 ++++++ .../Volo.Blogging.Admin.Web.csproj | 85 +++++++++++++++++++ .../compilerconfig.json | 18 ++++ .../compilerconfig.json.defaults | 49 +++++++++++ .../AbpBloggingWebAutoMapperProfile.cs | 7 -- .../Volo.Blogging.Web/BloggingWebModule.cs | 5 -- .../Pages/Blogs/Index.cshtml.cs | 3 +- .../Volo.Blogging.Web.csproj | 6 ++ 28 files changed, 430 insertions(+), 71 deletions(-) create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/FodyWeavers.xsd create mode 100644 modules/blogging/src/Volo.Blogging.Admin.HttpApi/FodyWeavers.xsd create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebAutoMapperProfile.cs rename modules/blogging/src/{Volo.Blogging.Web/BloggingMenuContributor.cs => Volo.Blogging.Admin.Web/BloggingAdminMenuContributor.cs} (63%) create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Web/FodyWeavers.xml create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Web/FodyWeavers.xsd rename modules/blogging/src/{Volo.Blogging.Web/Pages => Volo.Blogging.Admin.Web/Pages/Blogging}/Admin/Blogs/Create.cshtml (80%) rename modules/blogging/src/{Volo.Blogging.Web/Pages => Volo.Blogging.Admin.Web/Pages/Blogging}/Admin/Blogs/Create.cshtml.cs (72%) rename modules/blogging/src/{Volo.Blogging.Web/Pages => Volo.Blogging.Admin.Web/Pages/Blogging}/Admin/Blogs/Edit.cshtml (76%) rename modules/blogging/src/{Volo.Blogging.Web/Pages => Volo.Blogging.Admin.Web/Pages/Blogging}/Admin/Blogs/Edit.cshtml.cs (78%) rename modules/blogging/src/{Volo.Blogging.Web/Pages => Volo.Blogging.Admin.Web/Pages/Blogging}/Admin/Blogs/Index.cshtml (75%) rename modules/blogging/src/{Volo.Blogging.Web/Pages => Volo.Blogging.Admin.Web/Pages/Blogging}/Admin/Blogs/Index.cshtml.cs (65%) rename modules/blogging/src/{Volo.Blogging.Web/Pages => Volo.Blogging.Admin.Web/Pages/Blogging}/Admin/Blogs/create.js (100%) rename modules/blogging/src/{Volo.Blogging.Web/Pages => Volo.Blogging.Admin.Web/Pages/Blogging}/Admin/Blogs/edit.js (100%) rename modules/blogging/src/{Volo.Blogging.Web/Pages => Volo.Blogging.Admin.Web/Pages/Blogging}/Admin/Blogs/index.js (90%) create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Web/Pages/BloggingAdminPage.cs create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Web/Pages/BloggingAdminPageModel.cs create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Web/Pages/_ViewImports.cshtml create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Web/Properties/launchSettings.json create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Web/compilerconfig.json create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Web/compilerconfig.json.defaults diff --git a/modules/blogging/Volo.Blogging.sln b/modules/blogging/Volo.Blogging.sln index ef368c71a0f..607d2c3b1b9 100644 --- a/modules/blogging/Volo.Blogging.sln +++ b/modules/blogging/Volo.Blogging.sln @@ -57,6 +57,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Blogging.Admin.HttpApi EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Blogging.Admin.HttpApi.Client", "src\Volo.Blogging.Admin.HttpApi.Client\Volo.Blogging.Admin.HttpApi.Client.csproj", "{58A63CC9-C886-448B-AB4E-068600294D86}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Blogging.Admin.Web", "src\Volo.Blogging.Admin.Web\Volo.Blogging.Admin.Web.csproj", "{DB75CA32-96A5-4D10-8DD0-E62A3D0DDBCB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -147,6 +149,10 @@ Global {58A63CC9-C886-448B-AB4E-068600294D86}.Debug|Any CPU.Build.0 = Debug|Any CPU {58A63CC9-C886-448B-AB4E-068600294D86}.Release|Any CPU.ActiveCfg = Release|Any CPU {58A63CC9-C886-448B-AB4E-068600294D86}.Release|Any CPU.Build.0 = Release|Any CPU + {DB75CA32-96A5-4D10-8DD0-E62A3D0DDBCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB75CA32-96A5-4D10-8DD0-E62A3D0DDBCB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB75CA32-96A5-4D10-8DD0-E62A3D0DDBCB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB75CA32-96A5-4D10-8DD0-E62A3D0DDBCB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -176,6 +182,7 @@ Global {CB5DEBB3-5C2E-48E9-AA42-497575BCC7A4} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1} {59BBAF94-CC8E-4313-9143-F2F5C36A7C45} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1} {58A63CC9-C886-448B-AB4E-068600294D86} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1} + {DB75CA32-96A5-4D10-8DD0-E62A3D0DDBCB} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F2BAE819-78D4-407A-9201-22473B2850B0} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/FodyWeavers.xsd new file mode 100644 index 00000000000..3f3946e282d --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/FodyWeavers.xsd new file mode 100644 index 00000000000..3f3946e282d --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebAutoMapperProfile.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebAutoMapperProfile.cs new file mode 100644 index 00000000000..082daf9bae8 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebAutoMapperProfile.cs @@ -0,0 +1,16 @@ +using AutoMapper; +using Volo.Blogging.Admin.Blogs; +using Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs; +using EditModel = Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs.EditModel; + +namespace Volo.Blogging.Admin +{ + public class AbpBloggingAdminWebAutoMapperProfile : Profile + { + public AbpBloggingAdminWebAutoMapperProfile() + { + CreateMap(); + CreateMap(); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.Web/BloggingMenuContributor.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminMenuContributor.cs similarity index 63% rename from modules/blogging/src/Volo.Blogging.Web/BloggingMenuContributor.cs rename to modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminMenuContributor.cs index cac26eb3124..935a9248358 100644 --- a/modules/blogging/src/Volo.Blogging.Web/BloggingMenuContributor.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminMenuContributor.cs @@ -1,13 +1,10 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Localization; -using System.Threading.Tasks; +using System.Threading.Tasks; using Volo.Abp.UI.Navigation; using Volo.Blogging.Localization; -namespace Volo.Blogging +namespace Volo.Blogging.Admin { - public class BloggingMenuContributor : IMenuContributor + public class BloggingAdminMenuContributor : IMenuContributor { public async Task ConfigureMenuAsync(MenuConfigurationContext context) { @@ -21,14 +18,14 @@ private async Task ConfigureMainMenu(MenuConfigurationContext context) { var l = context.GetLocalizer(); - if (await context.IsGrantedAsync(BloggingPermissions.Blogs.Management)) + if (await context.IsGrantedAsync(BloggingAdminPermissions.Blogs.Management)) { var managementRootMenuItem = new ApplicationMenuItem("BlogManagement", l["Menu:BlogManagement"]); //TODO: Using the same permission. Reconsider. - if (await context.IsGrantedAsync(BloggingPermissions.Blogs.Management)) + if (await context.IsGrantedAsync(BloggingAdminPermissions.Blogs.Management)) { - managementRootMenuItem.AddItem(new ApplicationMenuItem("BlogManagement.Blogs", l["Menu:Blogs"], "~/Admin/Blogs")); + managementRootMenuItem.AddItem(new ApplicationMenuItem("BlogManagement.Blogs", l["Menu:Blogs"], "~/Blogging/Admin/Blogs")); } context.Menu.AddItem(managementRootMenuItem); diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs new file mode 100644 index 00000000000..f9fae675cdc --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs @@ -0,0 +1,53 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AspNetCore.Mvc.Localization; +using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.AutoMapper; +using Volo.Abp.Modularity; +using Volo.Abp.UI.Navigation; +using Volo.Abp.VirtualFileSystem; +using Volo.Blogging.Localization; + +namespace Volo.Blogging.Admin +{ + [DependsOn( + typeof(BloggingAdminHttpApiModule), + typeof(AbpAspNetCoreMvcUiBootstrapModule), + typeof(AbpAspNetCoreMvcUiBundlingModule), + typeof(AbpAutoMapperModule) + )] + public class BloggingAdminWebModule : AbpModule + { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + context.Services.PreConfigure(options => + { + options.AddAssemblyResource(typeof(BloggingResource), typeof(BloggingAdminWebModule).Assembly); + }); + + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(BloggingAdminWebModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.MenuContributors.Add(new BloggingAdminMenuContributor()); + }); + + Configure(options => + { + options.FileSets.AddEmbedded("Volo.Blogging"); + }); + + context.Services.AddAutoMapperObjectMapper(); + Configure(options => + { + options.AddProfile(validate: true); + }); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.Admin.Web/FodyWeavers.xml new file mode 100644 index 00000000000..be0de3a9084 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.Admin.Web/FodyWeavers.xsd new file mode 100644 index 00000000000..3f3946e282d --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Create.cshtml b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml similarity index 80% rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Create.cshtml rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml index d9b2ab6cdf5..b338ad39801 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Create.cshtml +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml @@ -1,8 +1,7 @@ @page @using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal -@using Volo.Blogging.Pages.Blog -@inherits BloggingPage -@model Volo.Blogging.Pages.Admin.Blogs.CreateModel +@inherits Volo.Blogging.Admin.Pages.Blogging.BloggingAdminPage +@model Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs.CreateModel @{ Layout = null; } diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Create.cshtml.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml.cs similarity index 72% rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Create.cshtml.cs rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml.cs index f8c40a1b01b..a24d94932ed 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Create.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml.cs @@ -2,23 +2,20 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; -using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; +using Volo.Blogging.Admin.Blogs; using Volo.Blogging.Blogs; -using Volo.Blogging.Blogs.Dtos; -using Volo.Blogging.Pages.Blog; -namespace Volo.Blogging.Pages.Admin.Blogs +namespace Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs { - public class CreateModel : BloggingPageModel + public class CreateModel : BloggingAdminPageModel { - private readonly IBlogAppService _blogAppService; + private readonly IBlogManagementAppService _blogAppService; private readonly IAuthorizationService _authorization; [BindProperty] public BlogCreateModalView Blog { get; set; } = new BlogCreateModalView(); - public CreateModel(IBlogAppService blogAppService, IAuthorizationService authorization) + public CreateModel(IBlogManagementAppService blogAppService, IAuthorizationService authorization) { _blogAppService = blogAppService; _authorization = authorization; @@ -26,7 +23,7 @@ public CreateModel(IBlogAppService blogAppService, IAuthorizationService authori public virtual async Task OnGetAsync() { - if (!await _authorization.IsGrantedAsync(BloggingPermissions.Blogs.Create)) + if (!await _authorization.IsGrantedAsync(BloggingAdminPermissions.Blogs.Create)) { return Redirect("/"); } @@ -59,4 +56,4 @@ public class BlogCreateModalView } } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Edit.cshtml b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml similarity index 76% rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Edit.cshtml rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml index adf10f48ab4..73e45d30bee 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Edit.cshtml +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml @@ -1,13 +1,11 @@ @page @using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal -@using Volo.Blogging.Pages.Blog -@inherits BloggingPage -@model Volo.Blogging.Pages.Admin.Blogs.EditModel +@inherits Volo.Blogging.Admin.Pages.Blogging.BloggingAdminPage +@model Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs.EditModel @{ Layout = null; } - @@ -17,4 +15,4 @@ - \ No newline at end of file + diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Edit.cshtml.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml.cs similarity index 78% rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Edit.cshtml.cs rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml.cs index 9c407202618..21934d02b93 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Edit.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml.cs @@ -1,20 +1,16 @@ using System; using System.ComponentModel.DataAnnotations; -using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; +using Volo.Blogging.Admin.Blogs; using Volo.Blogging.Blogs; -using Volo.Blogging.Blogs.Dtos; -using Volo.Blogging.Pages.Blog; -using Volo.Blogging.Posts; -namespace Volo.Blogging.Pages.Admin.Blogs +namespace Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs { - public class EditModel : BloggingPageModel + public class EditModel : BloggingAdminPageModel { - private readonly IBlogAppService _blogAppService; + private readonly IBlogManagementAppService _blogAppService; private readonly IAuthorizationService _authorization; [BindProperty(SupportsGet = true)] @@ -23,7 +19,7 @@ public class EditModel : BloggingPageModel [BindProperty] public BlogEditViewModel Blog { get; set; } = new BlogEditViewModel(); - public EditModel(IBlogAppService blogAppService, IAuthorizationService authorization) + public EditModel(IBlogManagementAppService blogAppService, IAuthorizationService authorization) { _blogAppService = blogAppService; _authorization = authorization; @@ -31,7 +27,7 @@ public EditModel(IBlogAppService blogAppService, IAuthorizationService authoriza public virtual async Task OnGetAsync() { - if (!await _authorization.IsGrantedAsync(BloggingPermissions.Blogs.Update)) + if (!await _authorization.IsGrantedAsync(BloggingAdminPermissions.Blogs.Update)) { return Redirect("/"); } @@ -74,5 +70,5 @@ public class BlogEditViewModel } } - -} \ No newline at end of file + +} diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Index.cshtml b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml similarity index 75% rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Index.cshtml rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml index 375641331c7..a52643499bd 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Index.cshtml +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml @@ -1,18 +1,17 @@ @page @using Microsoft.AspNetCore.Authorization -@using Volo.Blogging -@using Volo.Blogging.Pages.Blog -@inherits BloggingPage -@model Volo.Blogging.Pages.Admin.Blogs.IndexModel +@using Volo.Blogging.Admin +@inherits Volo.Blogging.Admin.Pages.Blogging.BloggingAdminPage +@model Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs.IndexModel @inject IAuthorizationService Authorization @{ ViewBag.PageTitle = "Blogs"; } @section scripts { - - - + + + } @@ -22,7 +21,7 @@

@L["Blogs"]

- @if (await Authorization.IsGrantedAsync(BloggingPermissions.Blogs.Create)) + @if (await Authorization.IsGrantedAsync(BloggingAdminPermissions.Blogs.Create)) { } diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Index.cshtml.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml.cs similarity index 65% rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Index.cshtml.cs rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml.cs index 038f2e63f3d..22a09389ef3 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Index.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml.cs @@ -1,12 +1,10 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; -using Volo.Blogging.Pages.Blog; -namespace Volo.Blogging.Pages.Admin.Blogs +namespace Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs { - public class IndexModel : BloggingPageModel + public class IndexModel : BloggingAdminPageModel { private readonly IAuthorizationService _authorization; @@ -17,7 +15,7 @@ public IndexModel(IAuthorizationService authorization) public virtual async Task OnGetAsync() { - if (!await _authorization.IsGrantedAsync(BloggingPermissions.Blogs.Management)) + if (!await _authorization.IsGrantedAsync(BloggingAdminPermissions.Blogs.Management)) { return Redirect("/"); } @@ -25,4 +23,4 @@ public virtual async Task OnGetAsync() return Page(); } } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/create.js b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/create.js similarity index 100% rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/create.js rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/create.js diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/edit.js b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/edit.js similarity index 100% rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/edit.js rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/edit.js diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/index.js b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/index.js similarity index 90% rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/index.js rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/index.js index c2a18e083dd..8f97eb761eb 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/index.js +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/index.js @@ -1,8 +1,8 @@ $(function () { var l = abp.localization.getResource('Blogging'); - var _createModal = new abp.ModalManager(abp.appPath + 'Admin/Blogs/Create'); - var _editModal = new abp.ModalManager(abp.appPath + 'Admin/Blogs/Edit'); + var _createModal = new abp.ModalManager(abp.appPath + 'Blogging/Admin/Blogs/Create'); + var _editModal = new abp.ModalManager(abp.appPath + 'Blogging/Admin/Blogs/Edit'); var _dataTable = $('#BlogsTable').DataTable(abp.libs.datatables.normalizeConfiguration({ processing: true, @@ -14,7 +14,7 @@ autoWidth: false, scrollCollapse: true, order: [[3, "desc"]], - ajax: abp.libs.datatables.createAjax(volo.blogging.blogs.getList), + ajax: abp.libs.datatables.createAjax(volo.blogging.admin.blogManagement.getList), columnDefs: [ { rowAction: { @@ -79,4 +79,4 @@ _dataTable.ajax.reload(); }); -}); \ No newline at end of file +}); diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/BloggingAdminPage.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/BloggingAdminPage.cs new file mode 100644 index 00000000000..819c3aa3cd4 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/BloggingAdminPage.cs @@ -0,0 +1,17 @@ +using Microsoft.AspNetCore.Mvc.Localization; +using Microsoft.AspNetCore.Mvc.Razor.Internal; +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; +using Volo.Blogging.Localization; + +namespace Volo.Blogging.Admin.Pages.Blogging +{ + public abstract class BloggingAdminPage : AbpPage + { + [RazorInject] + public IHtmlLocalizer L { get; set; } + + public const string DefaultTitle = "Blogging"; + + public const int MaxShortContentLength = 200; + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/BloggingAdminPageModel.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/BloggingAdminPageModel.cs new file mode 100644 index 00000000000..67951fc08bd --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/BloggingAdminPageModel.cs @@ -0,0 +1,12 @@ +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; + +namespace Volo.Blogging.Admin.Pages +{ + public abstract class BloggingAdminPageModel : AbpPageModel + { + public BloggingAdminPageModel() + { + ObjectMapperContext = typeof(BloggingAdminWebModule); + } + } +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/_ViewImports.cshtml b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/_ViewImports.cshtml new file mode 100644 index 00000000000..caae8c9ac57 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/_ViewImports.cshtml @@ -0,0 +1,5 @@ +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling +@addTagHelper *, Volo.Blogging.Web \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Properties/launchSettings.json b/modules/blogging/src/Volo.Blogging.Admin.Web/Properties/launchSettings.json new file mode 100644 index 00000000000..64a5fd912c7 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:50000/", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "Volo.Blogging.Web": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "http://localhost:50014/" + } + } +} \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj new file mode 100644 index 00000000000..17898b5ca6f --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj @@ -0,0 +1,85 @@ + + + + + + + netcoreapp3.1 + Volo.Blogging.Admin.Web + Volo.Blogging.Admin.Web + 2.8 + Library + true + Volo.Blogging.Admin + + + + + + + + + + + + + + + + + + + + true + PreserveNewest + + + true + PreserveNewest + + + true + PreserveNewest + + + Index.css + + + new.css + + + blog.css + + + _home.css + + + true + PreserveNewest + + + + + + + + new.css + + + blog.css + + + + + + Create.cshtml + + + Edit.cshtml + + + Index.cshtml + + + + diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/compilerconfig.json b/modules/blogging/src/Volo.Blogging.Admin.Web/compilerconfig.json new file mode 100644 index 00000000000..d8e67fbecae --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/compilerconfig.json @@ -0,0 +1,18 @@ +[ + { + "outputFile": "Pages/Blog/Shared/Styles/blog.css", + "inputFile": "Pages/Blog/Shared/Styles/blog.scss" + }, + { + "outputFile": "Pages/Blog/Shared/Styles/_home.css", + "inputFile": "Pages/Blog/Shared/Styles/_home.scss" + }, + { + "outputFile": "Pages/Blog/Posts/Index.css", + "inputFile": "Pages/Blog/Posts/Index.scss" + }, + { + "outputFile": "Pages/Blogs/Shared/Styles/blog.css", + "inputFile": "Pages/Blogs/Shared/Styles/blog.scss" + } +] \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/compilerconfig.json.defaults b/modules/blogging/src/Volo.Blogging.Admin.Web/compilerconfig.json.defaults new file mode 100644 index 00000000000..c75eb7d519c --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/compilerconfig.json.defaults @@ -0,0 +1,49 @@ +{ + "compilers": { + "less": { + "autoPrefix": "", + "cssComb": "none", + "ieCompat": true, + "strictMath": false, + "strictUnits": false, + "relativeUrls": true, + "rootPath": "", + "sourceMapRoot": "", + "sourceMapBasePath": "", + "sourceMap": false + }, + "sass": { + "includePath": "", + "indentType": "space", + "indentWidth": 2, + "outputStyle": "nested", + "Precision": 5, + "relativeUrls": true, + "sourceMapRoot": "", + "sourceMap": false + }, + "stylus": { + "sourceMap": false + }, + "babel": { + "sourceMap": false + }, + "coffeescript": { + "bare": false, + "runtimeMode": "node", + "sourceMap": false + } + }, + "minifiers": { + "css": { + "enabled": true, + "termSemicolons": true, + "gzip": false + }, + "javascript": { + "enabled": true, + "termSemicolons": true, + "gzip": false + } + } +} \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Web/AbpBloggingWebAutoMapperProfile.cs b/modules/blogging/src/Volo.Blogging.Web/AbpBloggingWebAutoMapperProfile.cs index ccd4a029535..e5d40c6be3f 100644 --- a/modules/blogging/src/Volo.Blogging.Web/AbpBloggingWebAutoMapperProfile.cs +++ b/modules/blogging/src/Volo.Blogging.Web/AbpBloggingWebAutoMapperProfile.cs @@ -1,12 +1,7 @@ using AutoMapper; using Volo.Abp.AutoMapper; -using Volo.Blogging.Blogs; -using Volo.Blogging.Blogs.Dtos; -using Volo.Blogging.Pages.Admin.Blogs; using Volo.Blogging.Pages.Blog.Posts; using Volo.Blogging.Posts; -using EditModel = Volo.Blogging.Pages.Admin.Blogs.EditModel; -using IndexModel = Volo.Blogging.Pages.Blog.IndexModel; namespace Volo.Blogging { @@ -16,8 +11,6 @@ public AbpBloggingWebAutoMapperProfile() { CreateMap().Ignore(x=>x.Tags); CreateMap(); - CreateMap(); - CreateMap(); } } } diff --git a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs index 432857686f7..e238f48a370 100644 --- a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs +++ b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs @@ -37,11 +37,6 @@ public override void PreConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => - { - options.MenuContributors.Add(new BloggingMenuContributor()); - }); - Configure(options => { options.FileSets.AddEmbedded("Volo.Blogging"); diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Index.cshtml.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Index.cshtml.cs index 2835b05dc5a..32a451c8be1 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Index.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Index.cshtml.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; @@ -34,4 +33,4 @@ public virtual async Task OnGetAsync() return Page(); } } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj index 3760fa05392..62978d2a84f 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj +++ b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj @@ -33,4 +33,10 @@ + + <_ContentIncludedByDefault Remove="Pages\Admin\Blogs\Create.cshtml" /> + <_ContentIncludedByDefault Remove="Pages\Admin\Blogs\Edit.cshtml" /> + <_ContentIncludedByDefault Remove="Pages\Admin\Blogs\Index.cshtml" /> + + From 022c1bc3d0c5e1014f719a92a801c7220d44fb45 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 5 Jun 2020 14:55:50 +0300 Subject: [PATCH 07/10] blog admin separation: fix unit tests & rename app service methods --- .../Admin/Blogs/IBlogManagementAppService.cs | 6 ++-- .../FodyWeavers.xsd | 30 +++++++++++++++++++ .../Admin/Blogs/BlogManagementAppService.cs | 6 ++-- .../Admin/BlogManagementController.cs | 12 ++++---- .../Blogging/Admin/Blogs/Create.cshtml.cs | 2 +- .../Pages/Blogging/Admin/Blogs/Edit.cshtml.cs | 2 +- .../Volo.Blogging.Application.Tests.csproj | 1 + .../Volo/Blogging/BlogAppService_Tests.cs | 18 +++++------ .../Blogging/BloggingApplicationTestModule.cs | 2 ++ 9 files changed, 55 insertions(+), 24 deletions(-) create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Application/FodyWeavers.xsd diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/IBlogManagementAppService.cs b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/IBlogManagementAppService.cs index 097945418f3..3554413d5f8 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/IBlogManagementAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/IBlogManagementAppService.cs @@ -11,10 +11,10 @@ public interface IBlogManagementAppService : IApplicationService Task GetAsync(Guid id); - Task Create(CreateBlogDto input); + Task CreateAsync(CreateBlogDto input); - Task Update(Guid id, UpdateBlogDto input); + Task UpdateAsync(Guid id, UpdateBlogDto input); - Task Delete(Guid id); + Task DeleteAsync(Guid id); } } diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.Admin.Application/FodyWeavers.xsd new file mode 100644 index 00000000000..3f3946e282d --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/Blogs/BlogManagementAppService.cs b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/Blogs/BlogManagementAppService.cs index 1f43085461a..1df6f52c9b0 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/Blogs/BlogManagementAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/Blogs/BlogManagementAppService.cs @@ -33,7 +33,7 @@ public async Task GetAsync(Guid id) } [Authorize(BloggingAdminPermissions.Blogs.Create)] - public async Task Create(CreateBlogDto input) + public async Task CreateAsync(CreateBlogDto input) { var newBlog = await _blogRepository.InsertAsync(new Blog(GuidGenerator.Create(), input.Name, input.ShortName) { @@ -44,7 +44,7 @@ public async Task Create(CreateBlogDto input) } [Authorize(BloggingAdminPermissions.Blogs.Update)] - public async Task Update(Guid id, UpdateBlogDto input) + public async Task UpdateAsync(Guid id, UpdateBlogDto input) { var blog = await _blogRepository.GetAsync(id); @@ -56,7 +56,7 @@ public async Task Update(Guid id, UpdateBlogDto input) } [Authorize(BloggingAdminPermissions.Blogs.Delete)] - public async Task Delete(Guid id) + public async Task DeleteAsync(Guid id) { await _blogRepository.DeleteAsync(id); } diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BlogManagementController.cs b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BlogManagementController.cs index c59bad9bafd..782a05a42e9 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BlogManagementController.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BlogManagementController.cs @@ -34,23 +34,23 @@ public async Task GetAsync(Guid id) } [HttpPost] - public async Task Create(CreateBlogDto input) + public async Task CreateAsync(CreateBlogDto input) { - return await _blogManagementAppService.Create(input); + return await _blogManagementAppService.CreateAsync(input); } [HttpPut] [Route("{id}")] - public async Task Update(Guid id, UpdateBlogDto input) + public async Task UpdateAsync(Guid id, UpdateBlogDto input) { - return await _blogManagementAppService.Update(id, input); + return await _blogManagementAppService.UpdateAsync(id, input); } [HttpDelete] [Route("{id}")] - public async Task Delete(Guid id) + public async Task DeleteAsync(Guid id) { - await _blogManagementAppService.Delete(id); + await _blogManagementAppService.DeleteAsync(id); } } } diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml.cs index a24d94932ed..b2d89fbd557 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml.cs @@ -35,7 +35,7 @@ public virtual async Task OnPostAsync() { var blogDto = ObjectMapper.Map(Blog); - await _blogAppService.Create(blogDto); + await _blogAppService.CreateAsync(blogDto); return NoContent(); } diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml.cs index 21934d02b93..536810e0158 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml.cs @@ -41,7 +41,7 @@ public virtual async Task OnGetAsync() public virtual async Task OnPostAsync() { - await _blogAppService.Update(Blog.Id, new UpdateBlogDto() + await _blogAppService.UpdateAsync(Blog.Id, new UpdateBlogDto() { Name = Blog.Name, ShortName = Blog.ShortName, diff --git a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj index e41384500bc..2bc4009d261 100644 --- a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj +++ b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj @@ -11,6 +11,7 @@ + diff --git a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/BlogAppService_Tests.cs b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/BlogAppService_Tests.cs index 7c67db978be..8726330b393 100644 --- a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/BlogAppService_Tests.cs +++ b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/BlogAppService_Tests.cs @@ -1,13 +1,9 @@ -using System; -using System.Linq; +using System.Linq; using System.Threading.Tasks; using Shouldly; using Volo.Blogging.Blogs; -using Volo.Blogging.Blogs.Dtos; -using Volo.Blogging.Comments; -using Volo.Blogging.Comments.Dtos; using Volo.Blogging.Pages.Blogs.Shared.Helpers; -using Volo.Blogging.Posts; +using Volo.Blogging.Admin.Blogs; using Xunit; namespace Volo.Blogging @@ -15,11 +11,13 @@ namespace Volo.Blogging public class BlogAppService_Tests : BloggingApplicationTestBase { private readonly IBlogAppService _blogAppService; + private readonly IBlogManagementAppService _blogManagementAppService; private readonly IBlogRepository _blogRepository; public BlogAppService_Tests() { _blogAppService = GetRequiredService(); + _blogManagementAppService = GetRequiredService(); _blogRepository = GetRequiredService(); } @@ -68,7 +66,7 @@ public async Task Should_Create_A_Blog() var shortName = "test shortName"; var description = "test description"; - var blogDto = await _blogAppService.Create(new CreateBlogDto() { Name = name, ShortName = name, Description = description }); + var blogDto = await _blogManagementAppService.CreateAsync(new CreateBlogDto() { Name = name, ShortName = name, Description = description }); UsingDbContext(context => { @@ -85,9 +83,9 @@ public async Task Should_Update_A_Blog() { var newDescription = "new description"; - var oldBlog = (await _blogRepository.GetListAsync()).FirstOrDefault(); ; + var oldBlog = (await _blogManagementAppService.GetListAsync()).Items.FirstOrDefault(); ; - await _blogAppService.Update(oldBlog.Id, new UpdateBlogDto() + await _blogManagementAppService.UpdateAsync(oldBlog.Id, new UpdateBlogDto() { Description = newDescription, Name = oldBlog.Name, ShortName = oldBlog.ShortName }); UsingDbContext(context => @@ -102,7 +100,7 @@ public async Task Should_Delete_A_Blog() { var blog = (await _blogRepository.GetListAsync()).First(); - await _blogAppService.Delete(blog.Id); + await _blogManagementAppService.DeleteAsync(blog.Id); } } } diff --git a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/BloggingApplicationTestModule.cs b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/BloggingApplicationTestModule.cs index ab2cbd12dd6..fb3934ee5f8 100644 --- a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/BloggingApplicationTestModule.cs +++ b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/BloggingApplicationTestModule.cs @@ -1,11 +1,13 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Modularity; +using Volo.Blogging.Admin; using Volo.Blogging.EntityFrameworkCore; namespace Volo.Blogging { [DependsOn( typeof(BloggingApplicationModule), + typeof(BloggingAdminApplicationModule), typeof(BloggingEntityFrameworkCoreTestModule), typeof(BloggingTestBaseModule))] public class BloggingApplicationTestModule : AbpModule From 9a6cccf1604d9c571fc9f8151889b6fe4422fc32 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 5 Jun 2020 14:59:39 +0300 Subject: [PATCH 08/10] blog admin separation: updated nupkg package list --- nupkg/common.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nupkg/common.ps1 b/nupkg/common.ps1 index 8fc6f7c06c1..aa773a77555 100644 --- a/nupkg/common.ps1 +++ b/nupkg/common.ps1 @@ -147,6 +147,11 @@ $projects = ( "modules/blogging/src/Volo.Blogging.HttpApi", "modules/blogging/src/Volo.Blogging.MongoDB", "modules/blogging/src/Volo.Blogging.Web", + "modules/blogging/src/Volo.Blogging.Admin.Application", + "modules/blogging/src/Volo.Blogging.Admin.Application.Contracts", + "modules/blogging/src/Volo.Blogging.Admin.HttpApi", + "modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client", + "modules/blogging/src/Volo.Blogging.Admin.Web", # modules/client-simulation "modules/client-simulation/src/Volo.ClientSimulation", From 61dbb7c139f01dde3a176c1239e20cca705e7b70 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 5 Jun 2020 15:59:08 +0300 Subject: [PATCH 09/10] blog admin separation: Volo.Blogging.Admin.HttpApi.Client\FodyWeavers.xsd --- .../FodyWeavers.xsd | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/FodyWeavers.xsd diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/FodyWeavers.xsd new file mode 100644 index 00000000000..3f3946e282d --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file From 589960e529459a749f9e19566d4cf87a70599c54 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 5 Jun 2020 17:26:56 +0300 Subject: [PATCH 10/10] blog admin separation: fixes & enhancements --- .../BloggingTestAppModule.cs | 15 +++--- .../Volo.BloggingTestApp.csproj | 2 + ...BloggingAdminApplicationContractsModule.cs | 2 +- .../Admin/ApplicationContracts/en.json | 2 +- .../BloggingAdminMenuContributor.cs | 2 +- .../BloggingAdminWebModule.cs | 2 +- .../Pages/Blogging/Admin/Blogs/Create.cshtml | 2 +- .../Pages/Blogging/Admin/Blogs/Edit.cshtml | 2 +- .../Pages/Blogging/Admin/Blogs/Index.cshtml | 25 +++++---- .../Pages/Blogging/Admin/Blogs/index.js | 6 +-- .../Volo.Blogging.Admin.Web.csproj | 51 ------------------- .../Blogging/ApplicationContracts/sl.json | 1 + .../ApplicationContracts/zh-Hans.json | 16 +++--- .../ApplicationContracts/zh-Hant.json | 16 +++--- .../Blogging/Localization/Resources/en.json | 4 +- .../Volo.Blogging.Web.csproj | 6 --- 16 files changed, 53 insertions(+), 101 deletions(-) diff --git a/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs b/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs index 8d57cb8aee6..3d371921459 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs +++ b/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs @@ -33,6 +33,7 @@ using Volo.Abp.UI; using Volo.Abp.VirtualFileSystem; using Volo.Blogging; +using Volo.Blogging.Admin; using Volo.Blogging.Files; using Volo.BloggingTestApp.EntityFrameworkCore; using Volo.BloggingTestApp.MongoDB; @@ -42,6 +43,8 @@ namespace Volo.BloggingTestApp [DependsOn( typeof(BloggingWebModule), typeof(BloggingApplicationModule), + typeof(BloggingAdminWebModule), + typeof(BloggingAdminApplicationModule), #if MONGODB typeof(BloggingTestAppMongoDbModule), #else @@ -105,12 +108,12 @@ public override void ConfigureServices(ServiceConfigurationContext context) options.CustomSchemaIds(type => type.FullName); }); - var cultures = new List - { - new CultureInfo("cs"), - new CultureInfo("en"), - new CultureInfo("tr"), - new CultureInfo("zh-Hans") + var cultures = new List + { + new CultureInfo("cs"), + new CultureInfo("en"), + new CultureInfo("tr"), + new CultureInfo("zh-Hans") }; Configure(options => diff --git a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj index a677553ee5e..6e269e702ac 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj +++ b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj @@ -26,6 +26,8 @@ + + diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminApplicationContractsModule.cs b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminApplicationContractsModule.cs index 5a192069c79..b2b6d000c04 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminApplicationContractsModule.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminApplicationContractsModule.cs @@ -18,7 +18,7 @@ public override void ConfigureServices(ServiceConfigurationContext context) { options.Resources .Get() - .AddVirtualJson("Volo/Blogging/Localization/Resources/Blogging/Admin/ApplicationContracts"); + .AddVirtualJson("Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts"); }); } } diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/en.json b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/en.json index 2cc854a2f36..f3708eacad3 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/en.json +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/en.json @@ -1,7 +1,7 @@ { "culture": "en", "texts": { - "Permission:BloggingAdmin": "Blog", + "Permission:BloggingAdmin": "Blogging", "Permission:Blogs": "Blogs", "Permission:Management": "Management", "Permission:Edit": "Edit", diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminMenuContributor.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminMenuContributor.cs index 935a9248358..00587382995 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminMenuContributor.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminMenuContributor.cs @@ -28,7 +28,7 @@ private async Task ConfigureMainMenu(MenuConfigurationContext context) managementRootMenuItem.AddItem(new ApplicationMenuItem("BlogManagement.Blogs", l["Menu:Blogs"], "~/Blogging/Admin/Blogs")); } - context.Menu.AddItem(managementRootMenuItem); + context.Menu.GetAdministration().AddItem(managementRootMenuItem); } } } diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs index f9fae675cdc..f62333fb02b 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs @@ -40,7 +40,7 @@ public override void ConfigureServices(ServiceConfigurationContext context) Configure(options => { - options.FileSets.AddEmbedded("Volo.Blogging"); + options.FileSets.AddEmbedded("Volo.Blogging.Admin"); }); context.Services.AddAutoMapperObjectMapper(); diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml index b338ad39801..b70e1f11b4c 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml @@ -7,7 +7,7 @@ } - + diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml index 73e45d30bee..a9343352c25 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml @@ -6,7 +6,7 @@ Layout = null; } - + diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml index a52643499bd..4aaf4b4d08f 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml @@ -1,17 +1,20 @@ @page @using Microsoft.AspNetCore.Authorization @using Volo.Blogging.Admin +@using Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs @inherits Volo.Blogging.Admin.Pages.Blogging.BloggingAdminPage -@model Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs.IndexModel +@model IndexModel @inject IAuthorizationService Authorization @{ ViewBag.PageTitle = "Blogs"; } @section scripts { - - - + + + + + } @@ -31,13 +34,13 @@ - - @L["Actions"] - @L["Name"] - @L["ShortName"] - @L["CreationTime"] - @L["Description"] - + + @L["Actions"] + @L["Name"] + @L["ShortName"] + @L["CreationTime"] + @L["Description"] + diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/index.js b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/index.js index 8f97eb761eb..a89f4cf9954 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/index.js +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/index.js @@ -22,7 +22,7 @@ [ { text: l('Edit'), - visible: abp.auth.isGranted('Blogging.Blog.Update'), + visible: abp.auth.isGranted('Blogging.Admin.Blog.Update'), action: function (data) { _editModal.open({ blogId: data.record.id @@ -31,10 +31,10 @@ }, { text: l('Delete'), - visible: abp.auth.isGranted('Blogging.Blog.Delete'), + visible: abp.auth.isGranted('Blogging.Admin.Blog.Delete'), confirmMessage: function (data) { return l('BlogDeletionWarningMessage') }, action: function (data) { - volo.blogging.blogs + volo.blogging.admin.blogManagement .delete(data.record.id) .then(function () { _dataTable.ajax.reload(); diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj index 17898b5ca6f..d15cf9c770d 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj @@ -29,57 +29,6 @@ - - true - PreserveNewest - - - true - PreserveNewest - - - true - PreserveNewest - - - Index.css - - - new.css - - - blog.css - - - _home.css - - - true - PreserveNewest - - - - - - - - new.css - - - blog.css - - - - - - Create.cshtml - - - Edit.cshtml - - - Index.cshtml - diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/sl.json b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/sl.json index 34f2f2987c0..cad2be999f8 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/sl.json +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/sl.json @@ -6,4 +6,5 @@ "Permission:Posts": "Objave", "Permission:Tags": "Oznake", "Permission:Comments": "Komentarji" + } } diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hans.json b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hans.json index 83fc688ab6d..afc509cd353 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hans.json +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hans.json @@ -1,10 +1,10 @@ { - "culture": "zh-Hans", - "texts": { - "Permission:Blogging": "博客", - "Permission:Blogs": "博客", - "Permission:Posts": "帖子", - "Permission:Tags": "标签", - "Permission:Comments": "评论" - } + "culture": "zh-Hans", + "texts": { + "Permission:Blogging": "博客", + "Permission:Blogs": "博客", + "Permission:Posts": "帖子", + "Permission:Tags": "标签", + "Permission:Comments": "评论" } +} diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hant.json b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hant.json index b51405cb27b..487be120e5c 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hant.json +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/zh-Hant.json @@ -1,10 +1,10 @@ { - "culture": "zh-Hant", - "texts": { - "Permission:Blogging": "部落格", - "Permission:Blogs": "部落格", - "Permission:Posts": "文章", - "Permission:Tags": "標籤", - "Permission:Comments": "評論" - } + "culture": "zh-Hant", + "texts": { + "Permission:Blogging": "部落格", + "Permission:Blogs": "部落格", + "Permission:Posts": "文章", + "Permission:Tags": "標籤", + "Permission:Comments": "評論" } +} diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/en.json b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/en.json index 18f8e00c8a3..8ffe3d8fa72 100644 --- a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/en.json +++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/en.json @@ -2,7 +2,7 @@ "culture": "en", "texts": { "Menu:Blogs": "Blogs", - "Menu:BlogManagement": "Blog Management", + "Menu:BlogManagement": "Blogging", "Title": "Title", "Delete": "Delete", "Reply": "Reply", @@ -46,4 +46,4 @@ "ShareOn": "Share on", "TitleLengthWarning": "Keep your title size under 60 characters to be SEO friendly!" } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj index 62978d2a84f..3760fa05392 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj +++ b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj @@ -33,10 +33,4 @@ - - <_ContentIncludedByDefault Remove="Pages\Admin\Blogs\Create.cshtml" /> - <_ContentIncludedByDefault Remove="Pages\Admin\Blogs\Edit.cshtml" /> - <_ContentIncludedByDefault Remove="Pages\Admin\Blogs\Index.cshtml" /> - -