Show edit and delete buttons for comments that can be edited by the user
This commit is contained in:
@@ -193,8 +193,14 @@ also, all settings from the rails model needed for the editor configuration in t
|
||||
'<%= t('request_for_comments.comment_edited') %>' +
|
||||
'</div>'
|
||||
}
|
||||
htmlContent += '</div>';
|
||||
htmlContent += '<div class="popover-comment">' + preprocess(comment.text) + '</div>';
|
||||
htmlContent += '</div>' +
|
||||
'<div class="popover-comment">' + preprocess(comment.text) + '</div>';
|
||||
if (comment.editable) {
|
||||
htmlContent += '<div class="popover-actions">' +
|
||||
'<button class="popover-action-button btn btn-xs btn-warning" id="edit-' + comment.id + '"><%= t('shared.edit') %></button>' +
|
||||
'<button class="popover-action-button btn btn-xs btn-danger" id="delete-' + comment.id + '"><%= t('shared.destroy') %></button>' +
|
||||
'</div>';
|
||||
}
|
||||
htmlContent += '</p>';
|
||||
});
|
||||
return htmlContent;
|
||||
|
Reference in New Issue
Block a user