diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Index.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Index.cshtml index 2b35080328..fadaaab269 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Index.cshtml +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Index.cshtml @@ -15,9 +15,3 @@
  • @blog.Name
  • } - -
    -
    -
    - - diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Index.cshtml.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Index.cshtml.cs index 672b1434ad..cf16556c66 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Index.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Index.cshtml.cs @@ -14,9 +14,6 @@ namespace Volo.Blogging.Pages.Blog public IReadOnlyList Blogs { get; private set; } - [BindProperty] - public BlogIndexViewModel Blog { get; set; } - public IndexModel(IBlogAppService blogAppService) { _blogAppService = blogAppService; @@ -36,33 +33,5 @@ namespace Volo.Blogging.Pages.Blog return Page(); } - - public async Task OnPostAsync() - { - await _blogAppService.Create(ObjectMapper.Map(Blog)); - - var result = await _blogAppService.GetListAsync(); - - if (result.Items.Count == 1) - { - var blog = result.Items[0]; - return RedirectToPage("./Posts/Index", new { blogShortName = blog.ShortName}); - } - - Blogs = result.Items; - - return Page(); - } - - public class BlogIndexViewModel - { - [Required] - public string Name { get; set; } - - [Required] - public string ShortName { get; set; } - - public string Description { get; set; } - } } } \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml index 7f1fca68fd..e7aa591fbc 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml @@ -27,7 +27,7 @@

    @L["Volosoft"] - BLOG + @L["Blog"]

    @@ -62,8 +62,8 @@

    - - Blog + + @L["Blog"] | @@ -251,14 +251,14 @@ @reply.Text

    - + @L["Reply"] @if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) { | - + @L["Delete"] } @@ -266,7 +266,7 @@ @if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) { | - + @L["Edit"] } diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/detail.js b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/detail.js index c6f7e0004f..d70da6d6c8 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/detail.js +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/detail.js @@ -25,6 +25,7 @@ $('.replyLink').click(function (event) { event.preventDefault(); + $('div .editForm').hide(); var linkElement = $(this); var replyCommentId = linkElement.attr('data-relpyid'); @@ -68,6 +69,8 @@ $('.updateLink').click(function (event) { event.preventDefault(); + $('div .replyForm').hide(); + var linkElement = $(this); var updateCommentId = $(this).attr('data-updateid');