v1.18.x
barisusakli 9 years ago
parent 1349c4907d
commit 34f68a029a

@ -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]]';
}

Loading…
Cancel
Save