|
|
|
@ -96,217 +96,223 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="row"> |
|
|
|
<div class="col-md-8 mx-auto"> |
|
|
|
<div class="tags"> |
|
|
|
<h5>@L["TagsInThisArticle"]</h5> |
|
|
|
@foreach (var tag in Model.Post.Tags) |
|
|
|
{ |
|
|
|
<a asp-page="/Blog/Posts/Index" asp-route-blogShortName="@Model.BlogShortName" asp-route-tagName="@tag.Name" class="tag">@tag.Name</a> |
|
|
|
} |
|
|
|
</div> |
|
|
|
|
|
|
|
<abp-row v-align="Start"> |
|
|
|
<abp-column size-sm="_12"> |
|
|
|
<p class="float-left"><i class="fa fa-comment"></i> @L["CommentWithCount", @Model.CommentCount]</p> |
|
|
|
<div class="col-md-8 mx-auto"> |
|
|
|
@if (Model.Post.Tags.Count > 0) |
|
|
|
{ |
|
|
|
<div class="tags"> |
|
|
|
<h5>@L["TagsInThisArticle"]</h5> |
|
|
|
@foreach (var tag in Model.Post.Tags) |
|
|
|
{ |
|
|
|
<a asp-page="/Blog/Posts/Index" asp-route-blogShortName="@Model.BlogShortName" asp-route-tagName="@tag.Name" class="tag">@tag.Name</a> |
|
|
|
} |
|
|
|
</div> |
|
|
|
} |
|
|
|
|
|
|
|
@if (hasCommentingPermission) |
|
|
|
{ |
|
|
|
<a abp-button="Primary" class="btn-rounded float-right active" href="#LeaveComment">@L["LeaveComment"]</a> |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
<a abp-button="Primary" class="btn-rounded float-right active" asp-page="/Account/Login" target="_blank">@L["LeaveComment"]</a> |
|
|
|
} |
|
|
|
</abp-column> |
|
|
|
</abp-row> |
|
|
|
|
|
|
|
<div class="comment-area"> |
|
|
|
@foreach (var commentWithRepliesDto in Model.CommentsWithReplies) |
|
|
|
@if (Model.CommentsWithReplies.Count > 0) |
|
|
|
{ |
|
|
|
<abp-row v-align="Start"> |
|
|
|
<abp-column size-sm="_12"> |
|
|
|
<p class="float-left"><i class="fa fa-comment"></i> @L["CommentWithCount", @Model.CommentCount]</p> |
|
|
|
@if (hasCommentingPermission) |
|
|
|
{ |
|
|
|
<a abp-button="Primary" class="btn-rounded float-right active" href="#LeaveComment">@L["LeaveComment"]</a> |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
<div class="media"> |
|
|
|
<img gravatar-email="@commentWithRepliesDto.Comment.Writer.Email" default-image="Identicon" class="d-flex mr-3 rounded-circle comment-avatar" /> |
|
|
|
<div class="media-body"> |
|
|
|
<h5 class="comment-owner"> |
|
|
|
@(commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName) |
|
|
|
<span class="float-right">@ConvertDatetimeToTimeAgo(commentWithRepliesDto.Comment.CreationTime)</span> |
|
|
|
</h5> |
|
|
|
<p id="@commentWithRepliesDto.Comment.Id"> |
|
|
|
@commentWithRepliesDto.Comment.Text |
|
|
|
</p> |
|
|
|
<div class="comment-buttons font-75 bg-light"> |
|
|
|
<a abp-button="Primary" class="btn-rounded float-right active" asp-page="/Account/Login" target="_blank">@L["LeaveComment"]</a> |
|
|
|
} |
|
|
|
</abp-column> |
|
|
|
</abp-row> |
|
|
|
} |
|
|
|
|
|
|
|
@if (hasCommentingPermission) |
|
|
|
{ |
|
|
|
<a href="#" class="tag replyLink" data-relpyid="@commentWithRepliesDto.Comment.Id"> |
|
|
|
<i class="fa fa-reply" aria-hidden="true"></i> @L["Reply"] |
|
|
|
</a> |
|
|
|
} |
|
|
|
<div class="comment-area"> |
|
|
|
@foreach (var commentWithRepliesDto in Model.CommentsWithReplies) |
|
|
|
{ |
|
|
|
<div class="media"> |
|
|
|
<img gravatar-email="@commentWithRepliesDto.Comment.Writer.Email" default-image="Identicon" class="d-flex mr-3 rounded-circle comment-avatar"/> |
|
|
|
<div class="media-body"> |
|
|
|
<h5 class="comment-owner"> |
|
|
|
@(commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName) |
|
|
|
<span class="float-right">@ConvertDatetimeToTimeAgo(commentWithRepliesDto.Comment.CreationTime)</span> |
|
|
|
</h5> |
|
|
|
<p id="@commentWithRepliesDto.Comment.Id"> |
|
|
|
@commentWithRepliesDto.Comment.Text |
|
|
|
</p> |
|
|
|
<div class="comment-buttons font-75 bg-light"> |
|
|
|
|
|
|
|
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete)) |
|
|
|
{ |
|
|
|
<span class="seperator">|</span> |
|
|
|
<a href="#" class="tag deleteLink" data-deleteid="@commentWithRepliesDto.Comment.Id"> |
|
|
|
<i class="fa fa-trash" aria-hidden="true"></i> @L["Delete"] |
|
|
|
</a> |
|
|
|
} |
|
|
|
@if (hasCommentingPermission) |
|
|
|
{ |
|
|
|
<a href="#" class="tag replyLink" data-relpyid="@commentWithRepliesDto.Comment.Id"> |
|
|
|
<i class="fa fa-reply" aria-hidden="true"></i> @L["Reply"] |
|
|
|
</a> |
|
|
|
} |
|
|
|
|
|
|
|
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|
|
|
{ |
|
|
|
<span class="seperator">|</span> |
|
|
|
<a href="#" class="tag updateLink" data-updateid="@commentWithRepliesDto.Comment.Id"> |
|
|
|
<i class="fa fa-pencil" aria-hidden="true"></i> @L["Edit"] |
|
|
|
</a> |
|
|
|
} |
|
|
|
</div> |
|
|
|
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete)) |
|
|
|
{ |
|
|
|
<span class="seperator">|</span> |
|
|
|
<a href="#" class="tag deleteLink" data-deleteid="@commentWithRepliesDto.Comment.Id"> |
|
|
|
<i class="fa fa-trash" aria-hidden="true"></i> @L["Delete"] |
|
|
|
</a> |
|
|
|
} |
|
|
|
|
|
|
|
@if (hasCommentingPermission) |
|
|
|
{ |
|
|
|
<div class="comment-form mt-4 replyForm"> |
|
|
|
<div class="clearfix bg-light p-4"> |
|
|
|
<h3 class="mt-0"> |
|
|
|
@L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName] |
|
|
|
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|
|
|
{ |
|
|
|
<span class="seperator">|</span> |
|
|
|
<a href="#" class="tag updateLink" data-updateid="@commentWithRepliesDto.Comment.Id"> |
|
|
|
<i class="fa fa-pencil" aria-hidden="true"></i> @L["Edit"] |
|
|
|
</a> |
|
|
|
} |
|
|
|
</div> |
|
|
|
|
|
|
|
@if (hasCommentingPermission) |
|
|
|
{ |
|
|
|
<div class="comment-form mt-4 replyForm"> |
|
|
|
<div class="clearfix bg-light p-4"> |
|
|
|
<h3 class="mt-0"> |
|
|
|
@L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName] |
|
|
|
|
|
|
|
</h3> |
|
|
|
<div> |
|
|
|
<form method="post"> |
|
|
|
<input name="postId" value="@Model.Post.Id" hidden /> |
|
|
|
<input name="repliedCommentId" value="@commentWithRepliesDto.Comment.Id" hidden /> |
|
|
|
</h3> |
|
|
|
<div> |
|
|
|
<form method="post"> |
|
|
|
<input name="postId" value="@Model.Post.Id" hidden/> |
|
|
|
<input name="repliedCommentId" value="@commentWithRepliesDto.Comment.Id" hidden/> |
|
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea> |
|
|
|
</div> |
|
|
|
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Comment"].Value" /> |
|
|
|
<abp-button button-type="Danger" class="btn-rounded float-right replyCancelButton" text="@L["Cancel"].Value" /> |
|
|
|
</form> |
|
|
|
<div class="form-group"> |
|
|
|
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Comment"].Value"/> |
|
|
|
<abp-button button-type="Danger" class="btn-rounded float-right replyCancelButton" text="@L["Cancel"].Value"/> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
} |
|
|
|
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|
|
|
{ |
|
|
|
<div class="comment-form mt-4 editForm"> |
|
|
|
<div class="clearfix bg-light p-4"> |
|
|
|
<div> |
|
|
|
<form class="editFormClass"> |
|
|
|
<input name="commentId" value="@commentWithRepliesDto.Comment.Id" hidden /> |
|
|
|
<div class="form-group"> |
|
|
|
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4">@commentWithRepliesDto.Comment.Text</textarea> |
|
|
|
</div> |
|
|
|
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" /> |
|
|
|
<abp-button button-type="Danger" class="btn-rounded float-right editCancelButton" text="@L["Cancel"].Value" /> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|
|
|
{ |
|
|
|
<div class="comment-form mt-4 editForm"> |
|
|
|
<div class="clearfix bg-light p-4"> |
|
|
|
<div> |
|
|
|
<form class="editFormClass"> |
|
|
|
<input name="commentId" value="@commentWithRepliesDto.Comment.Id" hidden/> |
|
|
|
<div class="form-group"> |
|
|
|
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4">@commentWithRepliesDto.Comment.Text</textarea> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value"/> |
|
|
|
<abp-button button-type="Danger" class="btn-rounded float-right editCancelButton" text="@L["Cancel"].Value"/> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
|
|
|
|
@foreach (var reply in commentWithRepliesDto.Replies) |
|
|
|
{ |
|
|
|
<div class="media"> |
|
|
|
<img gravatar-email="@reply.Writer.Email" default-image="Identicon" class="d-flex mr-3 rounded-circle comment-avatar" /> |
|
|
|
<div class="media-body"> |
|
|
|
<h5 class="comment-owner"> |
|
|
|
@(reply.Writer == null ? "" : reply.Writer.UserName) |
|
|
|
<span class="float-right">@ConvertDatetimeToTimeAgo(reply.CreationTime)</span> |
|
|
|
</h5> |
|
|
|
<p id="@reply.Id"> |
|
|
|
@reply.Text |
|
|
|
</p> |
|
|
|
<div class="comment-buttons font-75 bg-light"> |
|
|
|
@foreach (var reply in commentWithRepliesDto.Replies) |
|
|
|
{ |
|
|
|
<div class="media"> |
|
|
|
<img gravatar-email="@reply.Writer.Email" default-image="Identicon" class="d-flex mr-3 rounded-circle comment-avatar"/> |
|
|
|
<div class="media-body"> |
|
|
|
<h5 class="comment-owner"> |
|
|
|
@(reply.Writer == null ? "" : reply.Writer.UserName) |
|
|
|
<span class="float-right">@ConvertDatetimeToTimeAgo(reply.CreationTime)</span> |
|
|
|
</h5> |
|
|
|
<p id="@reply.Id"> |
|
|
|
@reply.Text |
|
|
|
</p> |
|
|
|
<div class="comment-buttons font-75 bg-light"> |
|
|
|
|
|
|
|
@if (hasCommentingPermission) |
|
|
|
{ |
|
|
|
<a href="#" class="tag replyLink" data-relpyid="@commentWithRepliesDto.Comment.Id"> |
|
|
|
<i class="fa fa-reply" aria-hidden="true"></i> @L["Reply"] |
|
|
|
</a> |
|
|
|
} |
|
|
|
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|
|
|
{ |
|
|
|
<span class="seperator">|</span> |
|
|
|
<a href="#" class="tag deleteLink" data-deleteid="@reply.Id"> |
|
|
|
<i class="fa fa-trash" aria-hidden="true"></i> @L["Delete"] |
|
|
|
</a> |
|
|
|
} |
|
|
|
@if (hasCommentingPermission) |
|
|
|
{ |
|
|
|
<a href="#" class="tag replyLink" data-relpyid="@commentWithRepliesDto.Comment.Id"> |
|
|
|
<i class="fa fa-reply" aria-hidden="true"></i> @L["Reply"] |
|
|
|
</a> |
|
|
|
} |
|
|
|
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|
|
|
{ |
|
|
|
<span class="seperator">|</span> |
|
|
|
<a href="#" class="tag deleteLink" data-deleteid="@reply.Id"> |
|
|
|
<i class="fa fa-trash" aria-hidden="true"></i> @L["Delete"] |
|
|
|
</a> |
|
|
|
} |
|
|
|
|
|
|
|
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|
|
|
{ |
|
|
|
<span class="seperator">|</span> |
|
|
|
<a href="#" class="tag updateLink" data-updateid="@reply.Id"> |
|
|
|
<i class="fa fa-pencil" aria-hidden="true"></i> @L["Edit"] |
|
|
|
</a> |
|
|
|
} |
|
|
|
</div> |
|
|
|
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|
|
|
{ |
|
|
|
<span class="seperator">|</span> |
|
|
|
<a href="#" class="tag updateLink" data-updateid="@reply.Id"> |
|
|
|
<i class="fa fa-pencil" aria-hidden="true"></i> @L["Edit"] |
|
|
|
</a> |
|
|
|
} |
|
|
|
</div> |
|
|
|
|
|
|
|
@if (hasCommentingPermission) |
|
|
|
{ |
|
|
|
<div class="comment-form mt-4 replyForm"> |
|
|
|
<div class="clearfix bg-light p-4"> |
|
|
|
<h3 class="mt-0"> |
|
|
|
@L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName] |
|
|
|
</h3> |
|
|
|
<div> |
|
|
|
<form method="post"> |
|
|
|
<input name="postId" value="@Model.Post.Id" hidden /> |
|
|
|
<input name="repliedCommentId" value="@commentWithRepliesDto.Comment.Id" hidden /> |
|
|
|
<div class="form-group"> |
|
|
|
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea> |
|
|
|
</div> |
|
|
|
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" /> |
|
|
|
<abp-button button-type="Danger" class="btn-rounded float-right replyCancelButton" text="@L["Cancel"].Value" /> |
|
|
|
</form> |
|
|
|
@if (hasCommentingPermission) |
|
|
|
{ |
|
|
|
<div class="comment-form mt-4 replyForm"> |
|
|
|
<div class="clearfix bg-light p-4"> |
|
|
|
<h3 class="mt-0"> |
|
|
|
@L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName] |
|
|
|
</h3> |
|
|
|
<div> |
|
|
|
<form method="post"> |
|
|
|
<input name="postId" value="@Model.Post.Id" hidden/> |
|
|
|
<input name="repliedCommentId" value="@commentWithRepliesDto.Comment.Id" hidden/> |
|
|
|
<div class="form-group"> |
|
|
|
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value"/> |
|
|
|
<abp-button button-type="Danger" class="btn-rounded float-right replyCancelButton" text="@L["Cancel"].Value"/> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
} |
|
|
|
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|
|
|
{ |
|
|
|
<div class="comment-form mt-4 editForm"> |
|
|
|
<div class="clearfix bg-light p-4"> |
|
|
|
<div> |
|
|
|
<form class="editFormClass"> |
|
|
|
<input name="commentId" value="@reply.Id" hidden /> |
|
|
|
<div class="form-group"> |
|
|
|
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4">@reply.Text</textarea> |
|
|
|
</div> |
|
|
|
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" /> |
|
|
|
<abp-button button-type="Danger" class="btn-rounded float-right editCancelButton" text="@L["Cancel"].Value" /> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|
|
|
{ |
|
|
|
<div class="comment-form mt-4 editForm"> |
|
|
|
<div class="clearfix bg-light p-4"> |
|
|
|
<div> |
|
|
|
<form class="editFormClass"> |
|
|
|
<input name="commentId" value="@reply.Id" hidden/> |
|
|
|
<div class="form-group"> |
|
|
|
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4">@reply.Text</textarea> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value"/> |
|
|
|
<abp-button button-type="Danger" class="btn-rounded float-right editCancelButton" text="@L["Cancel"].Value"/> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
</div> |
|
|
|
|
|
|
|
@if (hasCommentingPermission) |
|
|
|
{ |
|
|
|
<div class="comment-form mt-4" id="LeaveComment"> |
|
|
|
<div class="vs-blog-title mb-0"> |
|
|
|
<h3>@L["LeaveComment"]</h3> |
|
|
|
</div> |
|
|
|
<div class="clearfix bg-light p-4"> |
|
|
|
<div> |
|
|
|
<form method="post"> |
|
|
|
<input name="postId" value="@Model.Post.Id" hidden /> |
|
|
|
<input name="repliedCommentId" id="repliedCommentId" hidden /> |
|
|
|
<div class="form-group"> |
|
|
|
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea> |
|
|
|
</div> |
|
|
|
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" /> |
|
|
|
</form> |
|
|
|
@if (hasCommentingPermission) |
|
|
|
{ |
|
|
|
<div class="comment-form mt-4" id="LeaveComment"> |
|
|
|
<div class="vs-blog-title mb-0"> |
|
|
|
<h3>@L["LeaveComment"]</h3> |
|
|
|
</div> |
|
|
|
<div class="clearfix bg-light p-4"> |
|
|
|
<div> |
|
|
|
<form method="post"> |
|
|
|
<input name="postId" value="@Model.Post.Id" hidden/> |
|
|
|
<input name="repliedCommentId" id="repliedCommentId" hidden/> |
|
|
|
<div class="form-group"> |
|
|
|
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value"/> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
<a abp-button="Primary" class="btn-rounded float-right active mt-3" asp-page="/Account/Login" target="_blank">@L["LeaveComment"]</a> |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
<a abp-button="Primary" class="btn-rounded float-right active mt-3" asp-page="/Account/Login" target="_blank">@L["LeaveComment"]</a> |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|