diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml index dc3df1d270..e24e99fbaa 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml @@ -16,18 +16,18 @@ ; } @{ - Func GetCommentArea(string repliedCommentIdAsString, bool cancelButton = false) => - @
+ Func GetCommentArea(Guid? repliedCommentId, bool cancelButton = false) => + @
- +
- +
@if (cancelButton) { - @L["Cancel"] + @L["Cancel"] } @L["Send"]
@@ -90,29 +90,35 @@ @GetCommentContentArea(comment.Id, comment.Author.Id, false, comment.Text).Invoke(null) - @GetCommentArea(comment.Id.ToString(), true).Invoke(null) + @if (CurrentUser.IsAuthenticated) + { + @GetCommentArea(comment.Id, true).Invoke(null) + } @if (comment.Replies.Any()) {
- @foreach (var reply in comment.Replies) - { -
-
- - @GetCommentAuthorName(reply.Author).Invoke(null) -
+ @foreach (var reply in comment.Replies) + { +
+
+ + @GetCommentAuthorName(reply.Author).Invoke(null) +
- @GetCommentContentArea(reply.Id, reply.Author.Id, true, reply.Text).Invoke(null) + @GetCommentContentArea(reply.Id, reply.Author.Id, true, reply.Text).Invoke(null) -
- } +
+ }
}
}
- @GetCommentArea("").Invoke(null) + @if (CurrentUser.IsAuthenticated) + { + @GetCommentArea(null).Invoke(null) + }