mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-05 21:17:05 +02:00
closes #4204
This commit is contained in:
@@ -182,6 +182,7 @@ define('forum/topic/events', [
|
||||
postTools.toggle(data.pid, isDeleted);
|
||||
|
||||
if (!app.user.isAdmin && parseInt(data.uid, 10) !== parseInt(app.user.uid, 10)) {
|
||||
postEl.find('[component="post/tools"]').toggleClass('hidden', isDeleted);
|
||||
if (isDeleted) {
|
||||
postEl.find('[component="post/content"]').translateHtml('[[topic:post_is_deleted]]');
|
||||
} else {
|
||||
|
||||
@@ -143,6 +143,7 @@ module.exports = function(Topics) {
|
||||
if (post) {
|
||||
post.display_moderator_tools = topicPrivileges.isAdminOrMod || post.selfPost;
|
||||
post.display_move_tools = topicPrivileges.isAdminOrMod && post.index !== 0;
|
||||
post.display_post_menu = topicPrivileges.isAdminOrMod || post.selfPost || !post.deleted;
|
||||
if (post.deleted && !(topicPrivileges.isAdminOrMod || post.selfPost)) {
|
||||
post.content = '[[topic:post_is_deleted]]';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user