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 5c3a601f3f..d7adf3c196 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 @@ -96,217 +96,223 @@
@L["CommentWithCount", @Model.CommentCount]
+
@L["CommentWithCount", @Model.CommentCount]
+ @if (hasCommentingPermission) + { + @L["LeaveComment"] + } + else { -- @(commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName) - @ConvertDatetimeToTimeAgo(commentWithRepliesDto.Comment.CreationTime) -
-- @commentWithRepliesDto.Comment.Text -
-+ @(commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName) + @ConvertDatetimeToTimeAgo(commentWithRepliesDto.Comment.CreationTime) +
++ @commentWithRepliesDto.Comment.Text +
+- @L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName] + @if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) + { + | + + @L["Edit"] + + } +
+ @L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName] -
-- @(reply.Writer == null ? "" : reply.Writer.UserName) - @ConvertDatetimeToTimeAgo(reply.CreationTime) -
-- @reply.Text -
-+ @(reply.Writer == null ? "" : reply.Writer.UserName) + @ConvertDatetimeToTimeAgo(reply.CreationTime) +
++ @reply.Text +
+- @L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName] -
-+ @L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName] +
+@L["LeaveComment"]
-@L["LeaveComment"]
+