mirror of https://github.com/bvn13/VoidForum.git
37 lines
878 B
Plaintext
37 lines
878 B
Plaintext
|
|
include fragments/pagination
|
|
|
|
for comment in comments
|
|
if comment.getDeletedMark()
|
|
include deleted
|
|
else
|
|
include one
|
|
|
|
include fragments/pagination
|
|
|
|
|
|
if userService.currentUserCanWrite() && !disableCommenting
|
|
include fragments/commentCreationForm
|
|
|
|
script
|
|
:javascript
|
|
function deleteComment(postId, commentId) {
|
|
if (confirm("Are you sure to delete comment #" + commentId)) {
|
|
$('#form-' + postId + '-comment-' + commentId + '-delete').submit();
|
|
}
|
|
}
|
|
|
|
if userService.isCurrentUserAdmin()
|
|
script
|
|
:javascript
|
|
function showComment(commentId) {
|
|
|
|
$.ajax({
|
|
url: "/admin/comments/" + commentId,
|
|
type: "GET",
|
|
contentType: "application/json"
|
|
}).done(function (data) {
|
|
$("#comment-"+commentId).html(data.renderedContent);
|
|
});
|
|
|
|
} |