From 42fd7dad47bb96881f90236da895bb4e08aaa966 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 15 Nov 2024 15:07:55 +0800 Subject: [PATCH 1/7] Check & move related blog posts on deletion --- .../Volo/CmsKit/Admin/Blogs/BlogDto.cs | 2 + .../Admin/Blogs/IBlogAdminAppService.cs | 5 ++ .../CmsKit/Admin/Blogs/BlogAdminAppService.cs | 44 ++++++++++++-- ...CmsKitAdminApplicationAutoMapperProfile.cs | 2 +- .../Blogs/BlogAdminClientProxy.Generated.cs | 14 +++++ .../CmsKit/Admin/Blogs/BlogAdminController.cs | 15 +++++ .../Pages/CmsKit/Blogs/DeleteBlogModal.cshtml | 59 +++++++++++++++++++ .../CmsKit/Blogs/DeleteBlogModal.cshtml.cs | 57 ++++++++++++++++++ .../Pages/CmsKit/Blogs/index.js | 46 ++++++++++++--- .../CmsKit/Localization/Resources/ar.json | 6 +- .../CmsKit/Localization/Resources/cs.json | 6 +- .../CmsKit/Localization/Resources/de-DE.json | 6 +- .../CmsKit/Localization/Resources/de.json | 6 +- .../CmsKit/Localization/Resources/el.json | 6 +- .../CmsKit/Localization/Resources/en-GB.json | 6 +- .../CmsKit/Localization/Resources/en.json | 6 +- .../CmsKit/Localization/Resources/es.json | 6 +- .../CmsKit/Localization/Resources/fa.json | 6 +- .../CmsKit/Localization/Resources/fi.json | 6 +- .../CmsKit/Localization/Resources/fr.json | 6 +- .../CmsKit/Localization/Resources/hi.json | 6 +- .../CmsKit/Localization/Resources/hr.json | 6 +- .../CmsKit/Localization/Resources/hu.json | 6 +- .../CmsKit/Localization/Resources/is.json | 6 +- .../CmsKit/Localization/Resources/it.json | 6 +- .../CmsKit/Localization/Resources/nl.json | 6 +- .../CmsKit/Localization/Resources/pl-PL.json | 6 +- .../CmsKit/Localization/Resources/pt-BR.json | 6 +- .../CmsKit/Localization/Resources/ro-RO.json | 6 +- .../CmsKit/Localization/Resources/ru.json | 6 +- .../CmsKit/Localization/Resources/sk.json | 6 +- .../CmsKit/Localization/Resources/sl.json | 6 +- .../CmsKit/Localization/Resources/sv.json | 6 +- .../CmsKit/Localization/Resources/tr.json | 6 +- .../CmsKit/Localization/Resources/vi.json | 6 +- .../Localization/Resources/zh-Hans.json | 6 +- .../Localization/Resources/zh-Hant.json | 6 +- .../Volo/CmsKit/Blogs/BlogPost.cs | 7 ++- .../CmsKit/Blogs/BlogWithBlogPostCount.cs | 14 +++++ .../Volo/CmsKit/Blogs/IBlogPostRepository.cs | 2 + .../Volo/CmsKit/Blogs/IBlogRepository.cs | 7 +++ .../CmsKit/Blogs/EfCoreBlogPostRepository.cs | 13 ++++ .../Volo/CmsKit/Blogs/EfCoreBlogRepository.cs | 25 ++++++++ .../MongoDB/Blogs/MongoBlogPostRepository.cs | 20 +++++++ .../MongoDB/Blogs/MongoBlogRepository.cs | 27 +++++++++ 45 files changed, 484 insertions(+), 43 deletions(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/DeleteBlogModal.cshtml create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/DeleteBlogModal.cshtml.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogWithBlogPostCount.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogDto.cs index 0245b1348e..93c5374281 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogDto.cs @@ -11,4 +11,6 @@ public class BlogDto : ExtensibleEntityDto, IHasConcurrencyStamp public string Slug { get; set; } public string ConcurrencyStamp { get; set; } + + public int BlogPostCount { get; set; } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogAdminAppService.cs index 647c2bde15..d0b4cbdd4c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogAdminAppService.cs @@ -1,8 +1,13 @@ using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; namespace Volo.CmsKit.Admin.Blogs; public interface IBlogAdminAppService : ICrudAppService { + Task> GetAllListAsync(); + + Task MoveAllBlogPostsAsync(Guid blogId, Guid? assignToBlogId); } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogAdminAppService.cs index d5f32c4bfc..e3ef03e2de 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogAdminAppService.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Volo.Abp.Application.Dtos; @@ -20,16 +21,19 @@ namespace Volo.CmsKit.Admin.Blogs; public class BlogAdminAppService : CmsKitAdminAppServiceBase, IBlogAdminAppService { protected IBlogRepository BlogRepository { get; } + protected IBlogPostRepository BlogPostRepository { get; } protected BlogManager BlogManager { get; } protected BlogFeatureManager BlogFeatureManager { get; } public BlogAdminAppService( IBlogRepository blogRepository, - BlogManager blogManager, + BlogManager blogManager, + IBlogPostRepository blogPostRepository, BlogFeatureManager blogFeatureManager = null) { BlogRepository = blogRepository; BlogManager = blogManager; + BlogPostRepository = blogPostRepository; BlogFeatureManager = blogFeatureManager; } @@ -37,20 +41,44 @@ public class BlogAdminAppService : CmsKitAdminAppServiceBase, IBlogAdminAppServi { var blog = await BlogRepository.GetAsync(id); - return ObjectMapper.Map(blog); + var blogDto = ObjectMapper.Map(blog); + blogDto.BlogPostCount = await BlogPostRepository.GetCountAsync(blogId : blog.Id); + + return blogDto; } public virtual async Task> GetListAsync(BlogGetListInput input) { var totalCount = await BlogRepository.GetCountAsync(input.Filter); - var blogs = await BlogRepository.GetListAsync( + var blogs = await BlogRepository.GetListWithBlogPostCountAsync( input.Filter, input.Sorting, input.MaxResultCount, input.SkipCount); + + var blogDtos = new PagedResultDto(totalCount, ObjectMapper.Map, List>(blogs.Select(x => x.Blog).ToList())); + + foreach (var blogDto in blogDtos.Items) + { + blogDto.BlogPostCount = blogs.First(x => x.Blog.Id == blogDto.Id).BlogPostCount; + } - return new PagedResultDto(totalCount, ObjectMapper.Map, List>(blogs)); + return blogDtos; + } + + public virtual async Task> GetAllListAsync() + { + var blogs = await BlogRepository.GetListWithBlogPostCountAsync(maxResultCount: int.MaxValue); + + var blogDtos = new ListResultDto(ObjectMapper.Map, List>(blogs.Select(x => x.Blog).ToList())); + + foreach (var blogDto in blogDtos.Items) + { + blogDto.BlogPostCount = blogs.First(x => x.Blog.Id == blogDto.Id).BlogPostCount; + } + + return blogDtos; } [Authorize(CmsKitAdminPermissions.Blogs.Create)] @@ -79,10 +107,18 @@ public class BlogAdminAppService : CmsKitAdminAppServiceBase, IBlogAdminAppServi return ObjectMapper.Map(blog); } + + [Authorize(CmsKitAdminPermissions.Blogs.Delete)] + public virtual async Task MoveAllBlogPostsAsync(Guid blogId, Guid? assignToBlogId) + { + var blog = await BlogRepository.GetAsync(blogId); + await BlogPostRepository.UpdateBlogAsync(blog.Id, assignToBlogId); + } [Authorize(CmsKitAdminPermissions.Blogs.Delete)] public virtual Task DeleteAsync(Guid id) { + return BlogRepository.DeleteAsync(id); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs index a6a0d6512a..60f8ccb8a8 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs @@ -38,7 +38,7 @@ public class CmsKitAdminApplicationAutoMapperProfile : Profile CreateMap(MemberList.Source).MapExtraProperties(); CreateMap(MemberList.Source).MapExtraProperties(); - CreateMap().MapExtraProperties(); + CreateMap().Ignore(b => b.BlogPostCount).MapExtraProperties(); CreateMap(MemberList.Destination); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/Volo/CmsKit/Admin/Blogs/BlogAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/Volo/CmsKit/Admin/Blogs/BlogAdminClientProxy.Generated.cs index d102ea4d1f..7f53a52340 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/Volo/CmsKit/Admin/Blogs/BlogAdminClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/Volo/CmsKit/Admin/Blogs/BlogAdminClientProxy.Generated.cs @@ -57,4 +57,18 @@ public partial class BlogAdminClientProxy : ClientProxyBase> GetAllListAsync() + { + return RequestAsync>(nameof(GetAllListAsync)); + } + + public virtual async Task MoveAllBlogPostsAsync(Guid blogId, Guid? assignToBlogId) + { + await RequestAsync(nameof(MoveAllBlogPostsAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), blogId }, + { typeof(Guid?), assignToBlogId } + }); + } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs index e7d59ddbcd..8bf95e99a3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs @@ -62,4 +62,19 @@ public class BlogAdminController : CmsKitAdminController, IBlogAdminAppService { return BlogAdminAppService.DeleteAsync(id); } + + [HttpGet] + [Route("all")] + public Task> GetAllListAsync() + { + throw new NotImplementedException(); + } + + [HttpPut] + [Route("{id}/move-all-blog-posts")] + [Authorize(CmsKitAdminPermissions.Blogs.Delete)] + public Task MoveAllBlogPostsAsync(Guid blogId, [FromQuery]Guid? assignToBlogId) + { + return BlogAdminAppService.MoveAllBlogPostsAsync(blogId, assignToBlogId); + } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/DeleteBlogModal.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/DeleteBlogModal.cshtml new file mode 100644 index 0000000000..5f32d8e9bf --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/DeleteBlogModal.cshtml @@ -0,0 +1,59 @@ +@page +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal +@using Volo.CmsKit.Admin.Web.Pages.CmsKit.Blogs +@using Volo.CmsKit.Localization +@model DeleteBlogModal +@inject IHtmlLocalizer L +@{ + Layout = null; +} + +
+ @{ + var deleteAllClicked = "checked"; + var deleteButtonDisabled = ""; + + + + + + +

@L.GetString("BlogDeletionConfirmationMessage", Model.Blog.Name).Value

+ + @if (Model.Blog.BlogPostCount > 0) + { +

@L.GetString("ChooseAnActionForBlog", Model.Blog.BlogPostCount).Value

+ + + if (Model.Blog.OtherBlogs.Any()) + { + deleteAllClicked = ""; + deleteButtonDisabled = "disabled"; +
+ + +
+ + } + +
+ + +
+ } +
+ + + + +
+ } + +
diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/DeleteBlogModal.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/DeleteBlogModal.cshtml.cs new file mode 100644 index 0000000000..08e320b6f5 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/DeleteBlogModal.cshtml.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; +using Volo.Abp.ObjectExtending; +using Volo.CmsKit.Admin.Blogs; + +namespace Volo.CmsKit.Admin.Web.Pages.CmsKit.Blogs; + +public class DeleteBlogModal : CmsKitAdminPageModel +{ + [BindProperty] + public BlogInfoModel Blog { get; set; } + + protected IBlogAdminAppService BlogAdminAppService { get; } + + public DeleteBlogModal(IBlogAdminAppService blogAdminAppService) + { + BlogAdminAppService = blogAdminAppService; + } + + public virtual async Task OnGetAsync(Guid id) + { + var blog = await BlogAdminAppService.GetAsync(id); + var allBlogs = await BlogAdminAppService.GetAllListAsync(); + + Blog = new BlogInfoModel + { + Id = blog.Id, + Name = blog.Name, + BlogPostCount = blog.BlogPostCount, + OtherBlogs = allBlogs.Items.Where(b => b.Id != blog.Id).Select(e => new KeyValuePair(e.Id, e.Name)).ToList() + }; + } + + public virtual async Task OnPostAsync() + { + await BlogAdminAppService.MoveAllBlogPostsAsync(Blog.Id, Blog.AssignToBlogId); + await BlogAdminAppService.DeleteAsync(Blog.Id); + return NoContent(); + } + + public class BlogInfoModel : ExtensibleObject + { + public Guid Id { get; set; } + + public string Name { get; set; } + + public int BlogPostCount { get; set; } + + public List> OtherBlogs { get; set; } + + public Guid? AssignToBlogId { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/index.js b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/index.js index 0ead857f17..eef9af3f09 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/index.js +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/index.js @@ -6,6 +6,35 @@ $(function () { var updateModal = new abp.ModalManager({ viewUrl: abp.appPath + "CmsKit/Blogs/UpdateModal", modalClass: 'updateBlog' }); var featuresModal = new abp.ModalManager(abp.appPath + "CmsKit/Blogs/FeaturesModal"); + + var deleteBlogModal = new abp.ModalManager(abp.appPath + 'CmsKit/Blogs/DeleteBlogModal'); + + deleteBlogModal.onResult(function(){ + abp.notify.success(l('DeletedSuccessfully')); + }); + + deleteBlogModal.onOpen(function () { + var $form = deleteBlogModal.getForm(); + $form.find('#assign').click(function () { + $form.find('#Blog_AssignToBlogId').show(); + $form.find('[type=submit]').attr("disabled","disabled") + }) + $form.find('#deleteAll').click(function () { + $form.find('#Blog_AssignToBlogId').hide(); + $form.find('#Blog_AssignToBlogId').val(""); + $form.find('[type=submit]').removeAttr("disabled"); + }) + + $("#Blog_AssignToBlogId").on("change", function () { + var val = $(this).val(); + if(val === ''){ + $form.find('[type=submit]').attr("disabled","disabled") + }else{ + $form.find('[type=submit]').removeAttr("disabled"); + } + }) + }) + var blogsService = volo.cmsKit.admin.blogs.blogAdmin; var dataTable = $("#BlogsTable").DataTable(abp.libs.datatables.normalizeConfiguration({ @@ -41,16 +70,10 @@ $(function () { { text: l('Delete'), visible: abp.auth.isGranted('CmsKit.Blogs.Delete'), - confirmMessage: function (data) { - return l("BlogDeletionConfirmationMessage", data.record.name) - }, action: function (data) { - blogsService - .delete(data.record.id) - .then(function () { - dataTable.ajax.reloadEx(); - abp.notify.success(l('DeletedSuccessfully')); - }); + deleteBlogModal.open({ + id: data.record.id + }); } } ] @@ -74,6 +97,7 @@ $(function () { createModal.open(); }); + createModal.onResult(function () { dataTable.ajax.reloadEx(); }); @@ -81,4 +105,8 @@ $(function () { updateModal.onResult(function () { dataTable.ajax.reloadEx(); }); + + deleteBlogModal.onResult(function () { + dataTable.ajax.reloadEx(); + }); }); \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ar.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ar.json index c86c314d87..1236f52999 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ar.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ar.json @@ -237,6 +237,10 @@ "CssClass": "فئة CSS", "TagsHelpText": "يجب أن تكون العلامات مفصولة بفواصل (على سبيل المثال: tag1، tag2، tag3)", "ThisPartOfContentCouldntBeLoaded": "لا يمكن تحميل هذا الجزء من المحتوى.", - "DuplicateCommentAttemptMessage": "تم اكتشاف محاولة نشر تعليق مكررة. لقد تم بالفعل تقديم تعليقك." + "DuplicateCommentAttemptMessage": "تم اكتشاف محاولة نشر تعليق مكررة. لقد تم بالفعل تقديم تعليقك.", + "ChooseAnActionForBlog": "اختر إجراءً للمدونة", + "AssignBlogPostsToOtherBlog": "تعيين مشاركات المدونة إلى مدونة أخرى", + "SelectAnBlogToAssign": "حدد مدونة لتعيين مشاركات المدونة إليها", + "DeleteAllBlogPostsOfThisBlog": "حذف جميع مشاركات المدونة" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/cs.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/cs.json index c4534837fa..946336668f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/cs.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/cs.json @@ -227,6 +227,10 @@ "CssClass": "Třída CSS", "TagsHelpText": "Značky by měly být odděleny čárkami (např.: tag1, tag2, tag3)", "ThisPartOfContentCouldntBeLoaded": "Tato část obsahu nemohla být načtena.", - "DuplicateCommentAttemptMessage": "Byl zjištěn duplicitní pokus o vložení komentáře. Váš komentář již byl odeslán." + "DuplicateCommentAttemptMessage": "Byl zjištěn duplicitní pokus o vložení komentáře. Váš komentář již byl odeslán.", + "ChooseAnActionForBlog": "Vyberte akci pro blog", + "AssignBlogPostsToOtherBlog": "Přiřaďte blogové příspěvky k jinému blogu", + "SelectAnBlogToAssign": "Vyberte blog, ke kterému chcete přiřadit blogové příspěvky", + "DeleteAllBlogPostsOfThisBlog": "Smazat všechny blogové příspěvky tohoto blogu" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/de-DE.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/de-DE.json index 98b8b731c4..49b5f96ff5 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/de-DE.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/de-DE.json @@ -161,6 +161,10 @@ "YourFullName": "Ihren vollständigen Namen", "YourMessage": "Ihre Nachricht", "YourReply": "Ihre Antwort", - "ThisPartOfContentCouldntBeLoaded": "Dieser Teil des Inhalts konnte nicht geladen werden." + "ThisPartOfContentCouldntBeLoaded": "Dieser Teil des Inhalts konnte nicht geladen werden.", + "ChooseAnActionForBlog": "Wählen Sie eine Aktion für den Blog", + "AssignBlogPostsToOtherBlog": "Blogbeiträge einem anderen Blog zuweisen", + "SelectAnBlogToAssign": "Wählen Sie einen Blog aus, um Blogbeiträge zuzuweisen", + "DeleteAllBlogPostsOfThisBlog": "Alle Blogbeiträge dieses Blogs löschen" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/de.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/de.json index 31bae240c3..e950983d9c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/de.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/de.json @@ -227,6 +227,10 @@ "CssClass": "CSS-Klasse", "TagsHelpText": "Tags sollten durch Kommas getrennt werden (z. B. Tag1, Tag2, Tag3).", "ThisPartOfContentCouldntBeLoaded": "Dieser Teil des Inhalts konnte nicht geladen werden.", - "DuplicateCommentAttemptMessage": "Es wurde versucht, einen doppelten Kommentar zu posten. Ihr Kommentar wurde bereits übermittelt." + "DuplicateCommentAttemptMessage": "Es wurde versucht, einen doppelten Kommentar zu posten. Ihr Kommentar wurde bereits übermittelt.", + "ChooseAnActionForBlog": "Wählen Sie eine Aktion für den Blog", + "AssignBlogPostsToOtherBlog": "Blogbeiträge einem anderen Blog zuweisen", + "SelectAnBlogToAssign": "Wählen Sie einen Blog aus, um Blogbeiträge zuzuweisen", + "DeleteAllBlogPostsOfThisBlog": "Alle Blogbeiträge dieses Blogs löschen" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/el.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/el.json index 695cdd21eb..5c3bd58461 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/el.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/el.json @@ -184,6 +184,10 @@ "SelectAStatus": "Επιλέξτε μια κατάσταση", "Status": "Κατάσταση", "CmsKit.BlogPost.ScrollIndex": "Γραμμή γρήγορης πλοήγησης σε αναρτήσεις ιστολογίου", - "ThisPartOfContentCouldntBeLoaded": "Αυτό το τμήμα του περιεχομένου δεν μπορούσε να φορτωθεί." + "ThisPartOfContentCouldntBeLoaded": "Αυτό το τμήμα του περιεχομένου δεν μπορούσε να φορτωθεί.", + "ChooseAnActionForBlog": "Επιλέξτε μια ενέργεια για το ιστολόγιο", + "AssignBlogPostsToOtherBlog": "Ανάθεση αναρτήσεων ιστολογίου σε άλλο ιστολόγιο", + "SelectAnBlogToAssign": "Επιλέξτε ένα ιστολόγιο για να αναθέσετε αναρτήσεις ιστολογίου", + "DeleteAllBlogPostsOfThisBlog": "Διαγραφή όλων των αναρτήσεων ιστολογίου αυτού του ιστολογίου" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en-GB.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en-GB.json index f6256d81ba..b8b9060f45 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en-GB.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en-GB.json @@ -28,6 +28,10 @@ "Undo": "Undo", "Update": "Update", "YourComment": "Your comment", - "YourReply": "Your reply" + "YourReply": "Your reply", + "ChooseAnActionForBlog": "Choose an action for the blog", + "AssignBlogPostsToOtherBlog": "Assign blog posts to another blog", + "SelectAnBlogToAssign": "Select a blog to assign", + "DeleteAllBlogPostsOfThisBlog": "Delete all blog posts of this blog" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json index 149f1072bf..596b9250f6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json @@ -255,6 +255,10 @@ "CommentAlertMessage": "There are {0} comments waiting for approval", "Settings:Menu:CmsKit": "CMS", "CommentsAwaitingApproval": "Comments Awaiting Approval", - "CommentSubmittedForApproval": "Your comment has been submitted for approval." + "CommentSubmittedForApproval": "Your comment has been submitted for approval.", + "ChooseAnActionForBlog": "Choose an action for the blog", + "AssignBlogPostsToOtherBlog": "Assign blog posts to another blog", + "SelectAnBlogToAssign": "Select a blog to assign", + "DeleteAllBlogPostsOfThisBlog": "Delete all blog posts of this blog" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/es.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/es.json index e1ff8d7fc8..ffe5b410be 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/es.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/es.json @@ -227,6 +227,10 @@ "CssClass": "Clase CSS", "TagsHelpText": "Las etiquetas deben estar separadas por comas (por ejemplo: etiqueta1, etiqueta2, etiqueta3)", "ThisPartOfContentCouldntBeLoaded": "Esta parte del contenido no se pudo cargar.", - "DuplicateCommentAttemptMessage": "Intento de publicación de comentario duplicado detectado. Tu comentario ya ha sido enviado." + "DuplicateCommentAttemptMessage": "Intento de publicación de comentario duplicado detectado. Tu comentario ya ha sido enviado.", + "ChooseAnActionForBlog": "Elija una acción para el blog", + "AssignBlogPostsToOtherBlog": "Asignar publicaciones de blog a otro blog", + "SelectAnBlogToAssign": "Seleccione un blog para asignar publicaciones de blog", + "DeleteAllBlogPostsOfThisBlog": "Eliminar todas las publicaciones de blog de este blog" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fa.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fa.json index e044cde1a5..fa6695709d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fa.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fa.json @@ -183,6 +183,10 @@ "Status": "وضعیت", "CmsKit.BlogPost.ScrollIndex": "نوار پیمایش سریع در پست های وبلاگ", "CmsKit.BlogPost.PreventXssFeature": "جلوگیری از XSS", - "ThisPartOfContentCouldntBeLoaded": "این قسمت از محتوا قابل بارگیری نیست." + "ThisPartOfContentCouldntBeLoaded": "این قسمت از محتوا قابل بارگیری نیست.", + "ChooseAnActionForBlog": "یک عمل برای وبلاگ انتخاب کنید", + "AssignBlogPostsToOtherBlog": "پست های وبلاگ را به وبلاگ دیگری اختصاص دهید", + "SelectAnBlogToAssign": "یک وبلاگ برای اختصاص دادن انتخاب کنید", + "DeleteAllBlogPostsOfThisBlog": "تمام پست های وبلاگ این وبلاگ را حذف کنید" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fi.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fi.json index 82d622f05f..f13dc7620c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fi.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fi.json @@ -227,6 +227,10 @@ "CssClass": "CSS-luokka", "TagsHelpText": "Tunnisteet on erotettava pilkuilla (esim. tag1, tag2, tag3)", "ThisPartOfContentCouldntBeLoaded": "Tämä sisällön osa ei voitu ladata.", - "DuplicateCommentAttemptMessage": "Kopiokommenttiyritys havaittiin. Kommenttisi on jo lähetetty." + "DuplicateCommentAttemptMessage": "Kopiokommenttiyritys havaittiin. Kommenttisi on jo lähetetty.", + "ChooseAnActionForBlog": "Valitse toiminto blogille", + "AssignBlogPostsToOtherBlog": "Määritä blogiviestit toiseen blogiin", + "SelectAnBlogToAssign": "Valitse blogi, johon haluat määrittää", + "DeleteAllBlogPostsOfThisBlog": "Poista tämän blogin kaikki blogiviestit" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fr.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fr.json index 634c1fec85..f2828aa40e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fr.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fr.json @@ -227,6 +227,10 @@ "CssClass": "Classe CSS", "TagsHelpText": "Les balises doivent être séparées par des virgules (par exemple : tag1, tag2, tag3)", "ThisPartOfContentCouldntBeLoaded": "Cette partie du contenu n'a pas pu être chargée.", - "DuplicateCommentAttemptMessage": "Tentative de publication de commentaire en double détectée. Votre commentaire a déjà été soumis." + "DuplicateCommentAttemptMessage": "Tentative de publication de commentaire en double détectée. Votre commentaire a déjà été soumis.", + "ChooseAnActionForBlog": "Choisissez une action pour le blog", + "AssignBlogPostsToOtherBlog": "Attribuer des articles de blog à un autre blog", + "SelectAnBlogToAssign": "Sélectionnez un blog à attribuer", + "DeleteAllBlogPostsOfThisBlog": "Supprimer tous les articles de blog de ce blog" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hi.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hi.json index dcea398df5..ad2dbc18d9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hi.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hi.json @@ -227,6 +227,10 @@ "CssClass": "सीएसएस क्लास", "TagsHelpText": "टैग को अल्पविराम से अलग किया जाना चाहिए (जैसे: टैग1, टैग2, टैग3)", "ThisPartOfContentCouldntBeLoaded": "यह भाग लोड नहीं किया जा सका।", - "DuplicateCommentAttemptMessage": "डुप्लिकेट टिप्पणी पोस्ट प्रयास का पता चला। आपकी टिप्पणी पहले ही सबमिट की जा चुकी है." + "DuplicateCommentAttemptMessage": "डुप्लिकेट टिप्पणी पोस्ट प्रयास का पता चला। आपकी टिप्पणी पहले ही सबमिट की जा चुकी है.", + "ChooseAnActionForBlog": "ब्लॉग के लिए कोई कार्रवाई चुनें", + "AssignBlogPostsToOtherBlog": "अन्य ब्लॉग को ब्लॉग पोस्ट असाइन करें", + "SelectAnBlogToAssign": "असाइन करने के लिए एक ब्लॉग चुनें", + "DeleteAllBlogPostsOfThisBlog": "इस ब्लॉग के सभी ब्लॉग पोस्ट हटाएं" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hr.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hr.json index d2dff83aee..8e35745e21 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hr.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hr.json @@ -227,6 +227,10 @@ "CssClass": "CSS klasa", "TagsHelpText": "Oznake trebaju biti odvojene zarezom (npr. oznaka1, oznaka2, oznaka3)", "ThisPartOfContentCouldntBeLoaded": "Ovaj dio sadržaja nije bilo moguće učitati.", - "DuplicateCommentAttemptMessage": "Otkriven pokušaj postavljanja duplikata komentara. Vaš komentar je već poslan." + "DuplicateCommentAttemptMessage": "Otkriven pokušaj postavljanja duplikata komentara. Vaš komentar je već poslan.", + "ChooseAnActionForBlog": "Odaberite radnju za blog", + "AssignBlogPostsToOtherBlog": "Dodijelite postove na blogu drugom blogu", + "SelectAnBlogToAssign": "Odaberite blog za dodjelu", + "DeleteAllBlogPostsOfThisBlog": "Izbrišite sve postove na blogu" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hu.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hu.json index 219d9f95a7..9a3e4fb64e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hu.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hu.json @@ -227,6 +227,10 @@ "CssClass": "CSS osztály", "TagsHelpText": "A címkéket vesszővel kell elválasztani (pl.: tag1, tag2, tag3)", "ThisPartOfContentCouldntBeLoaded": "A tartalom ezen része nem tölthető be.", - "DuplicateCommentAttemptMessage": "Ismétlődő megjegyzés közzétételi kísérlet észlelve. Megjegyzését már elküldtük." + "DuplicateCommentAttemptMessage": "Ismétlődő megjegyzés közzétételi kísérlet észlelve. Megjegyzését már elküldtük.", + "ChooseAnActionForBlog": "Válasszon egy műveletet a bloghoz", + "AssignBlogPostsToOtherBlog": "Blogbejegyzések hozzárendelése egy másik bloghoz", + "SelectAnBlogToAssign": "Válasszon egy blogot a hozzárendeléshez", + "DeleteAllBlogPostsOfThisBlog": "Ez a művelet törli az összes blogbejegyzést ebből a blogból. Biztos vagy benne?" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/is.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/is.json index 6788847dd7..bf02d1ff68 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/is.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/is.json @@ -227,6 +227,10 @@ "CssClass": "CSS flokkur", "TagsHelpText": "Merki ættu að vera aðskilin með kommum (td: tag1, tag2, tag3)", "ThisPartOfContentCouldntBeLoaded": "Þessi hluti af efni gat ekki verið hlaðið inn.", - "DuplicateCommentAttemptMessage": "Tvítekin tilraun til að skrifa athugasemd fannst. Athugasemd þín hefur þegar verið send." + "DuplicateCommentAttemptMessage": "Tvítekin tilraun til að skrifa athugasemd fannst. Athugasemd þín hefur þegar verið send.", + "ChooseAnActionForBlog": "Veldu aðgerð fyrir blogg", + "AssignBlogPostsToOtherBlog": "Úthluta bloggfærslum til annars bloggs", + "SelectAnBlogToAssign": "Veldu blogg til að úthluta", + "DeleteAllBlogPostsOfThisBlog": "Eyða öllum bloggfærslum þessa bloggs" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/it.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/it.json index c6d84a4f62..7506c439f3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/it.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/it.json @@ -227,6 +227,10 @@ "CssClass": "Classe CSS", "TagsHelpText": "I tag devono essere separati da virgole (ad esempio: tag1, tag2, tag3)", "ThisPartOfContentCouldntBeLoaded": "Questa parte del contenuto non può essere caricata.", - "DuplicateCommentAttemptMessage": "Rilevato tentativo di pubblicare commenti duplicati. Il tuo commento è già stato inviato." + "DuplicateCommentAttemptMessage": "Rilevato tentativo di pubblicare commenti duplicati. Il tuo commento è già stato inviato.", + "ChooseAnActionForBlog": "Scegli un'azione per il blog", + "AssignBlogPostsToOtherBlog": "Assegna i post del blog ad un altro blog", + "SelectAnBlogToAssign": "Seleziona un blog a cui assegnare i post del blog", + "DeleteAllBlogPostsOfThisBlog": "Elimina tutti i post del blog di questo blog" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/nl.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/nl.json index b7c275078a..1d367dfa5c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/nl.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/nl.json @@ -227,6 +227,10 @@ "CssClass": "CSS-klasse", "TagsHelpText": "Tags moeten door komma's worden gescheiden (bijvoorbeeld: tag1, tag2, tag3)", "ThisPartOfContentCouldntBeLoaded": "Dit deel van de inhoud kon niet worden geladen.", - "DuplicateCommentAttemptMessage": "Dubbele poging tot posten van commentaar gedetecteerd. Uw reactie is al verzonden." + "DuplicateCommentAttemptMessage": "Dubbele poging tot posten van commentaar gedetecteerd. Uw reactie is al verzonden.", + "ChooseAnActionForBlog": "Kies een actie voor de blog", + "AssignBlogPostsToOtherBlog": "Wijs blogberichten toe aan een andere blog", + "SelectAnBlogToAssign": "Selecteer een blog om toe te wijzen", + "DeleteAllBlogPostsOfThisBlog": "Verwijder alle blogberichten van deze blog" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pl-PL.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pl-PL.json index 5237c0dc95..0b084f585c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pl-PL.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pl-PL.json @@ -227,6 +227,10 @@ "CssClass": "Klasa CSS", "TagsHelpText": "Tagi powinny być oddzielone przecinkami (np. tag1, tag2, tag3)", "ThisPartOfContentCouldntBeLoaded": "Ta część zawartości nie mogła zostać załadowana.", - "DuplicateCommentAttemptMessage": "Wykryto zduplikowaną próbę opublikowania komentarza. Twój komentarz został już przesłany." + "DuplicateCommentAttemptMessage": "Wykryto zduplikowaną próbę opublikowania komentarza. Twój komentarz został już przesłany.", + "ChooseAnActionForBlog": "Wybierz akcję dla bloga", + "AssignBlogPostsToOtherBlog": "Przypisz posty na blogu do innego bloga", + "SelectAnBlogToAssign": "Wybierz blog, do którego chcesz przypisać posty na blogu", + "DeleteAllBlogPostsOfThisBlog": "Usuń wszystkie posty na blogu tego bloga" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pt-BR.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pt-BR.json index 3182469634..3991bc0595 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pt-BR.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pt-BR.json @@ -227,6 +227,10 @@ "CssClass": "Classe CSS", "TagsHelpText": "As tags devem ser separadas por vírgula (por exemplo: tag1, tag2, tag3)", "ThisPartOfContentCouldntBeLoaded": "Esta parte do conteúdo não pôde ser carregada.", - "DuplicateCommentAttemptMessage": "Tentativa duplicada de postagem de comentário detectada. Seu comentário já foi enviado." + "DuplicateCommentAttemptMessage": "Tentativa duplicada de postagem de comentário detectada. Seu comentário já foi enviado.", + "ChooseAnActionForBlog": "Escolha uma ação para o blog", + "AssignBlogPostsToOtherBlog": "Atribuir postagens de blog a outro blog", + "SelectAnBlogToAssign": "Selecione um blog para atribuir", + "DeleteAllBlogPostsOfThisBlog": "Excluir todas as postagens de blog deste blog" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ro-RO.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ro-RO.json index 7b9173f477..c6b486a11a 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ro-RO.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ro-RO.json @@ -227,6 +227,10 @@ "CssClass": "Clasa CSS", "TagsHelpText": "Etichetele ar trebui să fie separate prin virgulă (de exemplu: tag1, tag2, tag3)", "ThisPartOfContentCouldntBeLoaded": "Această parte a conţinutului nu a putut fi încărcată.", - "DuplicateCommentAttemptMessage": "A fost detectată o încercare de postare de comentarii duplicată. Comentariul dvs. a fost deja trimis." + "DuplicateCommentAttemptMessage": "A fost detectată o încercare de postare de comentarii duplicată. Comentariul dvs. a fost deja trimis.", + "ChooseAnActionForBlog": "Alegeţi o acţiune pentru blog", + "AssignBlogPostsToOtherBlog": "Atribuiţi postările de blog la alt blog", + "SelectAnBlogToAssign": "Selectaţi un blog pentru a atribui postările de blog", + "DeleteAllBlogPostsOfThisBlog": "Ştergeţi toate postările de blog ale acestui blog" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ru.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ru.json index 491435bc02..c23671c843 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ru.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ru.json @@ -227,6 +227,10 @@ "CssClass": "CSS-класс", "TagsHelpText": "Теги должны быть разделены запятыми (например: тег1, тег2, тег3).", "ThisPartOfContentCouldntBeLoaded": "Эта часть содержимого не может быть загружена.", - "DuplicateCommentAttemptMessage": "Обнаружена повторная попытка публикации комментария. Ваш комментарий уже отправлен." + "DuplicateCommentAttemptMessage": "Обнаружена повторная попытка публикации комментария. Ваш комментарий уже отправлен.", + "ChooseAnActionForBlog": "Выберите действие для блога", + "AssignBlogPostsToOtherBlog": "Назначить сообщения в блоге другому блогу", + "SelectAnBlogToAssign": "Выберите блог для назначения", + "DeleteAllBlogPostsOfThisBlog": "Удалить все сообщения в блоге этого блога" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sk.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sk.json index c579340750..a1ff2cfb01 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sk.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sk.json @@ -227,6 +227,10 @@ "CssClass": "CSS trieda", "TagsHelpText": "Značky by mali byť oddelené čiarkou (napr.: tag1, tag2, tag3)", "ThisPartOfContentCouldntBeLoaded": "Táto časť obsahu sa nedá načítať.", - "DuplicateCommentAttemptMessage": "Zistil sa duplicitný pokus o uverejnenie komentára. Váš komentár už bol odoslaný." + "DuplicateCommentAttemptMessage": "Zistil sa duplicitný pokus o uverejnenie komentára. Váš komentár už bol odoslaný.", + "ChooseAnActionForBlog": "Vyberte akciu pre blog", + "AssignBlogPostsToOtherBlog": "Priradiť blogové príspevky k inému blogu", + "SelectAnBlogToAssign": "Vyberte blog, na ktorý chcete priradiť blogové príspevky", + "DeleteAllBlogPostsOfThisBlog": "Zmazať všetky blogové príspevky tohto blogu" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sl.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sl.json index 6e3157f56e..b4d525c3e4 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sl.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sl.json @@ -227,6 +227,10 @@ "CssClass": "Razred CSS", "TagsHelpText": "Oznake morajo biti ločene z vejicami (npr. oznaka1, oznaka2, oznaka3)", "ThisPartOfContentCouldntBeLoaded": "Ta del vsebine ni bil naložen.", - "DuplicateCommentAttemptMessage": "Zaznan poskus podvojene objave komentarja. Vaš komentar je že oddan." + "DuplicateCommentAttemptMessage": "Zaznan poskus podvojene objave komentarja. Vaš komentar je že oddan.", + "ChooseAnActionForBlog": "Izberite dejanje za blog", + "AssignBlogPostsToOtherBlog": "Dodeli objave v blogu drugemu blogu", + "SelectAnBlogToAssign": "Izberite blog, ki mu želite dodeliti objave", + "DeleteAllBlogPostsOfThisBlog": "Izbriši vse objave v tem blogu" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sv.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sv.json index 6e8962915b..f9604657ce 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sv.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sv.json @@ -254,6 +254,10 @@ "CommentAlertMessage": "Det finns {0} kommentarer som väntar på godkännande", "Settings:Menu:CmsKit": "CMS", "CommentsAwaitingApproval": "Kommentarer som väntar på godkännande", - "CommentSubmittedForApproval": "Din kommentar har skickats in för godkännande." + "CommentSubmittedForApproval": "Din kommentar har skickats in för godkännande.", + "ChooseAnActionForBlog": "Välj en åtgärd för bloggen", + "AssignBlogPostsToOtherBlog": "Tilldela blogginlägg till en annan blogg", + "SelectAnBlogToAssign": "Välj en blogg att tilldela", + "DeleteAllBlogPostsOfThisBlog": "Radera alla blogginlägg i denna blogg" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json index 3605cb9d3b..0e5d6d7c11 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json @@ -218,6 +218,10 @@ "CaptchaCode": "Captcha kodu", "CommentTextRequired": "Yorum zorunlu", "PopularTags": "Popüler Etiketler", - "ThisPartOfContentCouldntBeLoaded": "Bu içerik yüklenemedi" + "ThisPartOfContentCouldntBeLoaded": "Bu içerik yüklenemedi", + "ChooseAnActionForBlog": "Blog için bir eylem seçin", + "AssignBlogPostsToOtherBlog": "Diğer bloglara blog yazıları atayın", + "SelectAnBlogToAssign": "Atanacak bir blog seçin", + "DeleteAllBlogPostsOfThisBlog": "Bu blogun tüm blog yazılarını sil" } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/vi.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/vi.json index 1ec430edc3..0a2159e104 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/vi.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/vi.json @@ -227,6 +227,10 @@ "CssClass": "Lớp CSS", "TagsHelpText": "Các thẻ phải được phân tách bằng dấu phẩy (ví dụ: tag1, tag2, tag3)", "ThisPartOfContentCouldntBeLoaded": "Phần này của nội dung không thể được tải.", - "DuplicateCommentAttemptMessage": "Đã phát hiện nỗ lực đăng bình luận trùng lặp. Bình luận của bạn đã được gửi." + "DuplicateCommentAttemptMessage": "Đã phát hiện nỗ lực đăng bình luận trùng lặp. Bình luận của bạn đã được gửi.", + "ChooseAnActionForBlog": "Chọn một hành động cho blog", + "AssignBlogPostsToOtherBlog": "Gán bài đăng trên blog cho blog khác", + "SelectAnBlogToAssign": "Chọn một blog để gán", + "DeleteAllBlogPostsOfThisBlog": "Xóa tất cả bài đăng trên blog của blog này" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hans.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hans.json index c02fcf614d..18ae3004cb 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hans.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hans.json @@ -227,6 +227,10 @@ "CssClass": "CSS 类", "TagsHelpText": "标签应以逗号分隔(例如:标签 1,标签 2,标签 3)", "ThisPartOfContentCouldntBeLoaded": "这部分内容无法加载。", - "DuplicateCommentAttemptMessage": "检测到重复发表评论。您的评论已经提交。" + "DuplicateCommentAttemptMessage": "检测到重复发表评论。您的评论已经提交。", + "ChooseAnActionForBlog": "选择博客的操作", + "AssignBlogPostsToOtherBlog": "将博客文章分配给其他博客", + "SelectAnBlogToAssign": "选择要分配的博客", + "DeleteAllBlogPostsOfThisBlog": "删除此博客的所有博客文章" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hant.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hant.json index 866fd3fcea..80c30a6be3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hant.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hant.json @@ -227,6 +227,10 @@ "CssClass": "CSS類", "TagsHelpText": "標籤應以逗號分隔(例如:tag1、tag2、tag3)", "ThisPartOfContentCouldntBeLoaded": "這部分內容無法加載", - "DuplicateCommentAttemptMessage": "偵測到重複的評論貼文嘗試。您的評論已經提交。" + "DuplicateCommentAttemptMessage": "偵測到重複的評論貼文嘗試。您的評論已經提交。", + "ChooseAnActionForBlog": "選擇部落格的操作", + "AssignBlogPostsToOtherBlog": "將部落格文章分配給其他部落格", + "SelectAnBlogToAssign": "選擇要分配的部落格", + "DeleteAllBlogPostsOfThisBlog": "刪除此部落格的所有部落格文章" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPost.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPost.cs index 3a4cf26c1b..a34a303008 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPost.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPost.cs @@ -53,7 +53,7 @@ public class BlogPost : FullAuditedAggregateRoot, IMultiTenant, IHasEntity ) : base(id) { TenantId = tenantId; - BlogId = blogId; + SetBlogId(blogId); AuthorId = authorId; SetTitle(title); SetSlug(slug); @@ -68,6 +68,11 @@ public class BlogPost : FullAuditedAggregateRoot, IMultiTenant, IHasEntity Title = Check.NotNullOrWhiteSpace(title, nameof(title), BlogPostConsts.MaxTitleLength); } + public virtual void SetBlogId(Guid blogId) + { + BlogId = blogId; + } + internal void SetSlug(string slug) { Check.NotNullOrWhiteSpace(slug, nameof(slug), BlogPostConsts.MaxSlugLength, BlogPostConsts.MinSlugLength); diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogWithBlogPostCount.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogWithBlogPostCount.cs new file mode 100644 index 0000000000..9a84402375 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogWithBlogPostCount.cs @@ -0,0 +1,14 @@ +namespace Volo.CmsKit.Blogs; + +public class BlogWithBlogPostCount +{ + public Blog Blog { get; set; } + + public int BlogPostCount { get; set; } + + public BlogWithBlogPostCount(Blog blog, int blogPostCount) + { + Blog = blog; + BlogPostCount = blogPostCount; + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostRepository.cs index 404d21dc83..b96cd6157b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostRepository.cs @@ -44,4 +44,6 @@ public interface IBlogPostRepository : IBasicRepository Task GetAuthorHasBlogPostAsync(Guid id, CancellationToken cancellationToken = default); Task HasBlogPostWaitingForReviewAsync(CancellationToken cancellationToken = default); + + Task UpdateBlogAsync(Guid sourceBlogId, Guid? targetBlogId, CancellationToken cancellationToken = default); } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogRepository.cs index 60005db319..aebdfc3f24 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogRepository.cs @@ -16,6 +16,13 @@ public interface IBlogRepository : IBasicRepository CancellationToken cancellationToken = default ); + Task> GetListWithBlogPostCountAsync( + string filter = null, + string sorting = null, + int maxResultCount = int.MaxValue, + int skipCount = 0, + CancellationToken cancellationToken = default); + Task GetCountAsync( string filter = null, CancellationToken cancellationToken = default diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs index 266a04a910..272503a9d4 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs @@ -160,4 +160,17 @@ public class EfCoreBlogPostRepository : EfCoreRepository x.Status == BlogPostStatus.WaitingForReview, GetCancellationToken(cancellationToken)); } + + public async Task UpdateBlogAsync(Guid sourceBlogId, Guid? targetBlogId, CancellationToken cancellationToken = default) + { + if (targetBlogId != null) + { + await (await GetDbSetAsync()).Where(x => x.BlogId == sourceBlogId).ExecuteUpdateAsync(x => x.SetProperty(b => b.BlogId, targetBlogId.Value), GetCancellationToken(cancellationToken)); + + } + else + { + await (await GetDbSetAsync()).Where(x => x.BlogId == sourceBlogId).ExecuteDeleteAsync(GetCancellationToken(cancellationToken)); + } + } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogRepository.cs index daf915f675..5234577f02 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogRepository.cs @@ -43,6 +43,31 @@ public class EfCoreBlogRepository : EfCoreRepository> GetListWithBlogPostCountAsync( + string filter = null, + string sorting = null, + int maxResultCount = int.MaxValue, + int skipCount = 0, + CancellationToken cancellationToken = default) + { + var blogs = await (await GetListQueryAsync(filter)).OrderBy(sorting.IsNullOrEmpty() ? "creationTime desc" : sorting) + .PageBy(skipCount, maxResultCount).ToListAsync(GetCancellationToken(cancellationToken)); + + var blogIds = blogs.Select(x => x.Id).ToArray(); + + var blogPostCount = await (await GetDbContextAsync()).Set() + .Where(blogPost => blogIds.Contains(blogPost.BlogId)) + .GroupBy(blogPost => blogPost.BlogId) + .Select(x => new + { + BlogId = x.Key, + Count = x.Count() + }) + .ToListAsync(GetCancellationToken(cancellationToken)); + + return blogs.Select(blog => new BlogWithBlogPostCount(blog, blogPostCount.FirstOrDefault(x => x.BlogId == blog.Id)?.Count ?? 0)).ToList(); + } + public virtual async Task GetCountAsync(string filter = null, CancellationToken cancellationToken = default) { var query = await GetListQueryAsync(filter); diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogPostRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogPostRepository.cs index d3ae31926b..d27fdf16b6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogPostRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogPostRepository.cs @@ -192,4 +192,24 @@ public class MongoBlogPostRepository : MongoDbRepository x.Status == BlogPostStatus.WaitingForReview, cancellationToken); } + + public async Task UpdateBlogAsync(Guid sourceBlogId, Guid? targetBlogId, CancellationToken cancellationToken = default) + { + cancellationToken = GetCancellationToken(cancellationToken); + var blogPosts = await (await GetMongoQueryableAsync(cancellationToken)).Where(x => x.BlogId == sourceBlogId).ToListAsync(cancellationToken); + if (targetBlogId.HasValue) + { + foreach (var blogPost in blogPosts) + { + blogPost.SetBlogId(targetBlogId.Value); + } + + await UpdateManyAsync(blogPosts, false, cancellationToken); + } + else + { + + await DeleteManyAsync(blogPosts, false, cancellationToken); + } + } } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs index b34c452621..98567899e5 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs @@ -49,6 +49,33 @@ public class MongoBlogRepository : MongoDbRepository> GetListWithBlogPostCountAsync( + string filter = null, + string sorting = null, + int maxResultCount = int.MaxValue, + int skipCount = 0, + CancellationToken cancellationToken = default) + { + var token = GetCancellationToken(cancellationToken); + + var blogs = await GetListQueryAsync(filter, token); + + var blogIds = blogs.OrderBy(sorting.IsNullOrEmpty() ? "creationTime desc" : sorting) + .PageBy(skipCount, maxResultCount).Select(x => x.Id).ToList(); + + var blogPostCount = await (await GetMongoQueryableAsync(token)) + .Where(blogPost => blogIds.Contains(blogPost.Id)) + .GroupBy(blogPost => blogPost.BlogId) + .Select(x => new + { + BlogId = x.Key, + Count = x.Count() + }) + .ToListAsync(GetCancellationToken(cancellationToken)); + + return blogs.Select(blog => new BlogWithBlogPostCount(blog, blogPostCount.FirstOrDefault(x => x.BlogId == blog.Id) != null ? blogPostCount.FirstOrDefault(x => x.BlogId == blog.Id).Count : 0)).ToList(); + } + public virtual async Task GetCountAsync(string filter = null, CancellationToken cancellationToken = default) { var token = GetCancellationToken(cancellationToken); From fbabdea134f271834a2e006d000ecf048962b7e9 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 15 Nov 2024 21:21:35 +0800 Subject: [PATCH 2/7] Update modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogAdminAppService.cs Co-authored-by: Engincan VESKE --- .../Volo/CmsKit/Admin/Blogs/IBlogAdminAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogAdminAppService.cs index d0b4cbdd4c..e0f2b3311b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogAdminAppService.cs @@ -9,5 +9,5 @@ public interface IBlogAdminAppService : ICrudAppService> GetAllListAsync(); - Task MoveAllBlogPostsAsync(Guid blogId, Guid? assignToBlogId); + Task MoveAllBlogPostsAsync(Guid blogId, Guid? assignToBlogId = null); } From 784e0de090a2ea0c1d36e1db836913e19b496316 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 15 Nov 2024 21:21:43 +0800 Subject: [PATCH 3/7] Update modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostRepository.cs Co-authored-by: Engincan VESKE --- .../Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostRepository.cs index b96cd6157b..885d0de800 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostRepository.cs @@ -45,5 +45,5 @@ public interface IBlogPostRepository : IBasicRepository Task HasBlogPostWaitingForReviewAsync(CancellationToken cancellationToken = default); - Task UpdateBlogAsync(Guid sourceBlogId, Guid? targetBlogId, CancellationToken cancellationToken = default); + Task UpdateBlogAsync(Guid sourceBlogId, Guid? targetBlogId = null, CancellationToken cancellationToken = default); } \ No newline at end of file From 9c467d0414577c3183128b95d3c0e4d7277b22ba Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 15 Nov 2024 21:23:01 +0800 Subject: [PATCH 4/7] improve --- .../Volo/CmsKit/Admin/Blogs/BlogAdminController.cs | 2 +- .../Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs index 8bf95e99a3..f90215ed38 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs @@ -67,7 +67,7 @@ public class BlogAdminController : CmsKitAdminController, IBlogAdminAppService [Route("all")] public Task> GetAllListAsync() { - throw new NotImplementedException(); + return BlogAdminAppService.GetAllListAsync(); } [HttpPut] diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs index 272503a9d4..1160387151 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs @@ -161,7 +161,7 @@ public class EfCoreBlogPostRepository : EfCoreRepository x.Status == BlogPostStatus.WaitingForReview, GetCancellationToken(cancellationToken)); } - public async Task UpdateBlogAsync(Guid sourceBlogId, Guid? targetBlogId, CancellationToken cancellationToken = default) + public async Task UpdateBlogAsync(Guid sourceBlogId, Guid? targetBlogId = null, CancellationToken cancellationToken = default) { if (targetBlogId != null) { From 6fc7a35049b8bff04cd2a7d7d1498993900d8b82 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 15 Nov 2024 21:26:00 +0800 Subject: [PATCH 5/7] update proxy files --- .../Blogs/BlogAdminClientProxy.Generated.cs | 4 +- .../cms-kit-admin-generate-proxy.json | 117 ++++++++++++++++++ 2 files changed, 119 insertions(+), 2 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/Volo/CmsKit/Admin/Blogs/BlogAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/Volo/CmsKit/Admin/Blogs/BlogAdminClientProxy.Generated.cs index 7f53a52340..7eb5d91f3b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/Volo/CmsKit/Admin/Blogs/BlogAdminClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/Volo/CmsKit/Admin/Blogs/BlogAdminClientProxy.Generated.cs @@ -58,9 +58,9 @@ public partial class BlogAdminClientProxy : ClientProxyBase> GetAllListAsync() + public virtual async Task> GetAllListAsync() { - return RequestAsync>(nameof(GetAllListAsync)); + return await RequestAsync>(nameof(GetAllListAsync)); } public virtual async Task MoveAllBlogPostsAsync(Guid blogId, Guid? assignToBlogId) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/cms-kit-admin-generate-proxy.json b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/cms-kit-admin-generate-proxy.json index cf4bbd1034..8f0e7e677d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/cms-kit-admin-generate-proxy.json +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/cms-kit-admin-generate-proxy.json @@ -16,6 +16,39 @@ "type": "Volo.CmsKit.Admin.Blogs.IBlogAdminAppService", "name": "IBlogAdminAppService", "methods": [ + { + "name": "GetAllListAsync", + "parametersOnMethod": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + } + }, + { + "name": "MoveAllBlogPostsAsync", + "parametersOnMethod": [ + { + "name": "blogId", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "assignToBlogId", + "typeAsString": "System.Nullable`1[[System.Guid, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib", + "type": "System.Guid?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + }, { "name": "GetAsync", "parametersOnMethod": [ @@ -353,6 +386,90 @@ }, "allowAnonymous": false, "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + }, + "GetAllListAsync": { + "uniqueName": "GetAllListAsync", + "name": "GetAllListAsync", + "httpMethod": "GET", + "url": "api/cms-kit-admin/blogs/all", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.CmsKit.Admin.Blogs.IBlogAdminAppService" + }, + "MoveAllBlogPostsAsyncByBlogIdAndAssignToBlogId": { + "uniqueName": "MoveAllBlogPostsAsyncByBlogIdAndAssignToBlogId", + "name": "MoveAllBlogPostsAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-admin/blogs/{id}/move-all-blog-posts", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "blogId", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "assignToBlogId", + "typeAsString": "System.Nullable`1[[System.Guid, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib", + "type": "System.Guid?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "blogId", + "name": "blogId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "assignToBlogId", + "name": "assignToBlogId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Query", + "descriptorName": "" + }, + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": null, + "typeSimple": null, + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": false, + "implementFrom": "Volo.CmsKit.Admin.Blogs.IBlogAdminAppService" } } }, From f1bc6f88216967981a6ee0f5d379586101384ade Mon Sep 17 00:00:00 2001 From: enisn Date: Fri, 22 Nov 2024 15:20:04 +0300 Subject: [PATCH 6/7] Add BlazorWebApp option to Acme.Bookstore tutorial --- docs/en/tutorials/book-store/part-01.md | 6 +++--- docs/en/tutorials/book-store/part-02.md | 10 +++++----- docs/en/tutorials/book-store/part-03.md | 8 ++++---- docs/en/tutorials/book-store/part-04.md | 2 +- docs/en/tutorials/book-store/part-05.md | 8 ++++---- docs/en/tutorials/book-store/part-06.md | 2 +- docs/en/tutorials/book-store/part-07.md | 2 +- docs/en/tutorials/book-store/part-08.md | 2 +- docs/en/tutorials/book-store/part-09.md | 12 ++++++------ docs/en/tutorials/book-store/part-10.md | 6 +++--- 10 files changed, 29 insertions(+), 29 deletions(-) diff --git a/docs/en/tutorials/book-store/part-01.md b/docs/en/tutorials/book-store/part-01.md index 8f1d5df346..390f62e931 100644 --- a/docs/en/tutorials/book-store/part-01.md +++ b/docs/en/tutorials/book-store/part-01.md @@ -2,7 +2,7 @@ ````json //[doc-params] { - "UI": ["MVC","Blazor","BlazorServer","NG"], + "UI": ["MVC","Blazor","BlazorServer", "BlazorWebApp","NG"], "DB": ["EF","Mongo"] } ```` @@ -36,7 +36,7 @@ abp install-libs > We suggest you install [Yarn](https://classic.yarnpkg.com/) to prevent possible package inconsistencies, if you haven't installed it yet. -{{if UI=="Blazor" || UI=="BlazorServer"}} +{{if UI=="Blazor" || UI=="BlazorWebApp"}} ### Bundling and Minification @@ -440,7 +440,7 @@ ABP can [**automagically**](../../framework/api-development/auto-controllers.md) ### Swagger UI -The startup template is configured to run the [Swagger UI](https://swagger.io/tools/swagger-ui/) using the [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) library. Run the application ({{if UI=="MVC"}}`Acme.BookStore.Web`{{else if UI=="BlazorServer"}}`Acme.BookStore.Blazor`{{else}}`Acme.BookStore.HttpApi.Host`{{end}}) by pressing `CTRL+F5` and navigate to `https://localhost:/swagger/` on your browser. Replace `` with your own port number. +The startup template is configured to run the [Swagger UI](https://swagger.io/tools/swagger-ui/) using the [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) library. Run the application ({{if UI=="MVC"}}`Acme.BookStore.Web`{{else if UI=="BlazorServer" || UI=="BlazorWebApp" || UI=="BlazorServer"}}`Acme.BookStore.Blazor`{{else}}`Acme.BookStore.HttpApi.Host`{{end}}) by pressing `CTRL+F5` and navigate to `https://localhost:/swagger/` on your browser. Replace `` with your own port number. You will see some built-in service endpoints as well as the `Book` service and its REST-style endpoints: diff --git a/docs/en/tutorials/book-store/part-02.md b/docs/en/tutorials/book-store/part-02.md index df5a5ac598..bb812e7d81 100644 --- a/docs/en/tutorials/book-store/part-02.md +++ b/docs/en/tutorials/book-store/part-02.md @@ -2,7 +2,7 @@ ````json //[doc-params] { - "UI": ["MVC","Blazor","BlazorServer","NG"], + "UI": ["MVC","Blazor","BlazorServer", "BlazorWebApp", "NG"], "DB": ["EF","Mongo"] } ```` @@ -514,13 +514,13 @@ Now you can see the final result on your browser: ![Book list final result](images/bookstore-book-list-angular.png) -{{else if UI == "Blazor" || UI == "BlazorServer"}} +{{else if UI == "Blazor" || UI == "BlazorServer" || UI == "BlazorWebApp"}} ## Create a Books Page -It's time to create something visible and usable! Right click on the `Pages` folder under the {{ if UI == "Blazor"}}`Acme.BookStore.Blazor.Client`{{ else }}`Acme.BookStore.Blazor`{{ end }} project and add a new **razor component**, named `Books.razor`: +It's time to create something visible and usable! Right click on the `Pages` folder under the {{ if UI == "BlazorServer" }}`Acme.BookStore.Blazor`{{ else }}`Acme.BookStore.Blazor.Client`{{ end }} project and add a new **razor component**, named `Books.razor`: -{{ if UI == "Blazor"}} +{{ if UI == "Blazor" || UI == "BlazorWebApp" }} ![blazor-add-books-component](images/blazor-add-books-component-client.png) {{ else }} ![blazor-add-books-component](images/blazor-add-books-component.png) @@ -540,7 +540,7 @@ Replace the contents of this component as shown below: ### Add the Books Page to the Main Menu -Open the `BookStoreMenuContributor` class in the {{ if UI == "Blazor"}}`Acme.BookStore.Blazor.Client`{{ else }}`Acme.BookStore.Blazor`{{ end }} project add the following code to the end of the `ConfigureMainMenuAsync` method: +Open the `BookStoreMenuContributor` class in the {{ if UI == "BlazorServer"}}`Acme.BookStore.Blazor`{{ else }}`Acme.BookStore.Blazor.Client`{{ end }} project add the following code to the end of the `ConfigureMainMenuAsync` method: ````csharp context.Menu.AddItem( diff --git a/docs/en/tutorials/book-store/part-03.md b/docs/en/tutorials/book-store/part-03.md index a770d62f29..65f6d482dd 100644 --- a/docs/en/tutorials/book-store/part-03.md +++ b/docs/en/tutorials/book-store/part-03.md @@ -2,7 +2,7 @@ ````json //[doc-params] { - "UI": ["MVC","Blazor","BlazorServer","NG"], + "UI": ["MVC","Blazor","BlazorServer","BlazorWebApp","NG"], "DB": ["EF","Mongo"] } ```` @@ -1101,7 +1101,7 @@ Clicking the "Delete" action calls the `delete` method which then shows a confir {{end}} -{{if UI == "Blazor" || UI == "BlazorServer"}} +{{if UI == "Blazor" || UI == "BlazorServer" || UI == "BlazorWebApp"}} ## Creating a New Book @@ -1292,13 +1292,13 @@ We can now define a modal to edit the book. Add the following code to the end of The base `AbpCrudPageBase` uses the [object to object mapping](../../framework/infrastructure/object-to-object-mapping.md) system to convert an incoming `BookDto` object to a `CreateUpdateBookDto` object. So, we need to define the mapping. -Open the `BookStoreBlazorAutoMapperProfile` inside the `Acme.BookStore.Blazor.Client` project and change the content as the following: +Open the `BookStoreBlazorAutoMapperProfile` inside the {{ if UI == "BlazorServer" }}`Acme.BookStore.Blazor`{{ else }}`Acme.BookStore.Blazor.Client`{{ end }} project and change the content as the following: ````csharp using Acme.BookStore.Books; using AutoMapper; -namespace Acme.BookStore.Blazor.Client; +{{ if UI == "BlazorServer" }}namespace Acme.BookStore.Blazor;{{ else }}namespace Acme.BookStore.Blazor.Client;{{ end }} public class BookStoreBlazorAutoMapperProfile : Profile { diff --git a/docs/en/tutorials/book-store/part-04.md b/docs/en/tutorials/book-store/part-04.md index b529748efb..4ab950b0e1 100644 --- a/docs/en/tutorials/book-store/part-04.md +++ b/docs/en/tutorials/book-store/part-04.md @@ -2,7 +2,7 @@ ````json //[doc-params] { - "UI": ["MVC","Blazor","BlazorServer","NG"], + "UI": ["MVC","Blazor","BlazorServer","BlazorWebApp","NG"], "DB": ["EF","Mongo"] } ```` diff --git a/docs/en/tutorials/book-store/part-05.md b/docs/en/tutorials/book-store/part-05.md index 947eec65f0..95ee1f53a6 100644 --- a/docs/en/tutorials/book-store/part-05.md +++ b/docs/en/tutorials/book-store/part-05.md @@ -2,7 +2,7 @@ ````json //[doc-params] { - "UI": ["MVC","Blazor","BlazorServer","NG"], + "UI": ["MVC","Blazor","BlazorServer","BlazorWebApp","NG"], "DB": ["EF","Mongo"] } ```` @@ -389,11 +389,11 @@ Open the `/src/app/book/book.component.html` file and replace the edit and delet * Added `*abpPermission="'BookStore.Books.Edit'"` that hides the edit action if the current user has no editing permission. * Added `*abpPermission="'BookStore.Books.Delete'"` that hides the delete action if the current user has no delete permission. -{{else if UI == "Blazor"}} +{{else if UI == "Blazor" || UI == "BlazorServer" || UI == "BlazorWebApp"}} ### Authorize the Razor Component -Open the `/Pages/Books.razor` file in the `Acme.BookStore.Blazor.Client` project and add an `Authorize` attribute just after the `@page` directive and the following namespace imports (`@using` lines), as shown below: +Open the `/Pages/Books.razor` file in the {{ if UI == "BlazorServer" }}`Acme.BookStore.Blazor`{{ else }}`Acme.BookStore.Blazor.Client`{{ end }} project and add an `Authorize` attribute just after the `@page` directive and the following namespace imports (`@using` lines), as shown below: ````html @page "/books" @@ -479,7 +479,7 @@ You can run and test the permissions. Remove a book related permission from the Even we have secured all the layers of the book management page, it is still visible on the main menu of the application. We should hide the menu item if the current user has no permission. -Open the `BookStoreMenuContributor` class in the `Acme.BookStore.Blazor.Client` project, find the code block below: +Open the `BookStoreMenuContributor` class in the {{ if UI == "BlazorServer" }}`Acme.BookStore.Blazor`{{ else }}`Acme.BookStore.Blazor.Client`{{ end }} project, find the code block below: ````csharp context.Menu.AddItem( diff --git a/docs/en/tutorials/book-store/part-06.md b/docs/en/tutorials/book-store/part-06.md index a19248ec64..58a83cfc16 100644 --- a/docs/en/tutorials/book-store/part-06.md +++ b/docs/en/tutorials/book-store/part-06.md @@ -2,7 +2,7 @@ ````json //[doc-params] { - "UI": ["MVC","Blazor","BlazorServer","NG"], + "UI": ["MVC","Blazor","BlazorServer", "BlazorWebApp", "NG"], "DB": ["EF","Mongo"] } ```` diff --git a/docs/en/tutorials/book-store/part-07.md b/docs/en/tutorials/book-store/part-07.md index 70d73da97b..b8aa17ace8 100644 --- a/docs/en/tutorials/book-store/part-07.md +++ b/docs/en/tutorials/book-store/part-07.md @@ -2,7 +2,7 @@ ````json //[doc-params] { - "UI": ["MVC","Blazor","BlazorServer","NG"], + "UI": ["MVC","Blazor","BlazorServer","BlazorWebApp","NG"], "DB": ["EF","Mongo"] } ```` diff --git a/docs/en/tutorials/book-store/part-08.md b/docs/en/tutorials/book-store/part-08.md index 61412ba770..679b6d84ca 100644 --- a/docs/en/tutorials/book-store/part-08.md +++ b/docs/en/tutorials/book-store/part-08.md @@ -2,7 +2,7 @@ ````json //[doc-params] { - "UI": ["MVC","Blazor","BlazorServer","NG"], + "UI": ["MVC","Blazor","BlazorServer","BlazorWebApp","NG"], "DB": ["EF","Mongo"] } ```` diff --git a/docs/en/tutorials/book-store/part-09.md b/docs/en/tutorials/book-store/part-09.md index c42dd22d8a..4c31b72bc5 100644 --- a/docs/en/tutorials/book-store/part-09.md +++ b/docs/en/tutorials/book-store/part-09.md @@ -2,7 +2,7 @@ ````json //[doc-params] { - "UI": ["MVC","Blazor","BlazorServer","NG"], + "UI": ["MVC","Blazor","BlazorServer","BlazorWebApp","NG"], "DB": ["EF","Mongo"] } ```` @@ -839,13 +839,13 @@ That's all! This is a fully working CRUD page, you can create, edit and delete a {{end}} -{{if UI == "Blazor" || UI == "BlazorServer"}} +{{if UI == "Blazor" || UI == "BlazorServer" || UI == "BlazorWebApp"}} ## The Author Management Page ### Authors Razor Component -Create a new Razor Component Page, `/Pages/Authors.razor`, in the `Acme.BookStore.Blazor.Client` project with the following content: +Create a new Razor Component Page, `/Pages/Authors.razor`, in the {{ if UI == "BlazorServer" }}`Acme.BookStore.Blazor`{{ else }}`Acme.BookStore.Blazor.Client`{{ end }} project with the following content: ````xml @page "/authors" @@ -1046,7 +1046,7 @@ using Blazorise.DataGrid; using Microsoft.AspNetCore.Authorization; using Volo.Abp.Application.Dtos; -namespace Acme.BookStore.Blazor.Client.Pages; +{{ if UI == "BlazorServer" }}namespace Acme.BookStore.Blazor.Pages;{{ else }}namespace Acme.BookStore.Blazor.Client.Pages;{{ end }} public partial class Authors { @@ -1192,7 +1192,7 @@ This class typically defines the properties and methods used by the `Authors.raz `Authors` class uses the `IObjectMapper` in the `OpenEditAuthorModal` method. So, we need to define this mapping. -Open the `BookStoreBlazorAutoMapperProfile.cs` in the `Acme.BookStore.Blazor.Client` project and add the following mapping code in the constructor: +Open the `BookStoreBlazorAutoMapperProfile.cs` in the {{ if UI == "BlazorServer" }}`Acme.BookStore.Blazor`{{ else }}`Acme.BookStore.Blazor.Client`{{ end }} project and add the following mapping code in the constructor: ````csharp CreateMap(); @@ -1202,7 +1202,7 @@ You will need to declare a `using Acme.BookStore.Authors;` statement to the begi ### Add to the Main Menu -Open the `BookStoreMenuContributor.cs` in the `Acme.BookStore.Blazor.Client` project and add the following code to the end of the `ConfigureMainMenuAsync` method: +Open the `BookStoreMenuContributor.cs` in the {{ if UI == "BlazorServer" }}`Acme.BookStore.Blazor`{{ else }}`Acme.BookStore.Blazor.Client`{{ end }} project and add the following code to the end of the `ConfigureMainMenuAsync` method: ````csharp if (await context.IsGrantedAsync(BookStorePermissions.Authors.Default)) diff --git a/docs/en/tutorials/book-store/part-10.md b/docs/en/tutorials/book-store/part-10.md index 5a6acb752b..928881ffec 100644 --- a/docs/en/tutorials/book-store/part-10.md +++ b/docs/en/tutorials/book-store/part-10.md @@ -2,7 +2,7 @@ ````json //[doc-params] { - "UI": ["MVC","Blazor","BlazorServer","NG"], + "UI": ["MVC","Blazor","BlazorServer","BlazorWebApp","NG"], "DB": ["EF","Mongo"] } ```` @@ -1071,11 +1071,11 @@ That's all. Just run the application and try to create or edit an author. {{end}} -{{if UI == "Blazor" || UI == "BlazorServer"}} +{{if UI == "Blazor" || UI == "BlazorServer" || UI == "BlazorWebApp" }} ### The Book List -It is very easy to show the *Author Name* in the book list. Open the `/Pages/Books.razor` file in the `Acme.BookStore.Blazor.Client` project and add the following `DataGridColumn` definition just after the `Name` (book name) column: +It is very easy to show the *Author Name* in the book list. Open the `/Pages/Books.razor` file in the {{ if UI == "BlazorServer" }}`Acme.BookStore.Blazor`{{ else }}`Acme.BookStore.Blazor.Client`{{ end }} project and add the following `DataGridColumn` definition just after the `Name` (book name) column: ````xml Date: Fri, 22 Nov 2024 16:39:10 +0300 Subject: [PATCH 7/7] Update part-01.md --- docs/en/tutorials/book-store/part-01.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/tutorials/book-store/part-01.md b/docs/en/tutorials/book-store/part-01.md index 390f62e931..a808c36034 100644 --- a/docs/en/tutorials/book-store/part-01.md +++ b/docs/en/tutorials/book-store/part-01.md @@ -440,7 +440,7 @@ ABP can [**automagically**](../../framework/api-development/auto-controllers.md) ### Swagger UI -The startup template is configured to run the [Swagger UI](https://swagger.io/tools/swagger-ui/) using the [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) library. Run the application ({{if UI=="MVC"}}`Acme.BookStore.Web`{{else if UI=="BlazorServer" || UI=="BlazorWebApp" || UI=="BlazorServer"}}`Acme.BookStore.Blazor`{{else}}`Acme.BookStore.HttpApi.Host`{{end}}) by pressing `CTRL+F5` and navigate to `https://localhost:/swagger/` on your browser. Replace `` with your own port number. +The startup template is configured to run the [Swagger UI](https://swagger.io/tools/swagger-ui/) using the [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) library. Run the application ({{if UI=="MVC"}}`Acme.BookStore.Web`{{else if UI=="BlazorServer" || UI=="BlazorWebApp"}}`Acme.BookStore.Blazor`{{else}}`Acme.BookStore.HttpApi.Host`{{end}}) by pressing `CTRL+F5` and navigate to `https://localhost:/swagger/` on your browser. Replace `` with your own port number. You will see some built-in service endpoints as well as the `Book` service and its REST-style endpoints: @@ -480,4 +480,4 @@ If you try to execute the `[GET] /api/app/book` API to get a list of books, the } ```` -That's pretty cool since we haven't written a single line of code to create the API controller, but now we have a fully working REST API! \ No newline at end of file +That's pretty cool since we haven't written a single line of code to create the API controller, but now we have a fully working REST API!