From 574a1c6e57c71c250e366cdd9d88c9466c9b3fdf Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 8 Oct 2015 17:45:44 +1030 Subject: [PATCH] Only show restore button for comment posts --- framework/core/js/forum/src/utils/PostControls.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/core/js/forum/src/utils/PostControls.js b/framework/core/js/forum/src/utils/PostControls.js index 6a6dbfcf0..5ba6a7634 100644 --- a/framework/core/js/forum/src/utils/PostControls.js +++ b/framework/core/js/forum/src/utils/PostControls.js @@ -40,7 +40,7 @@ export default { * @return {ItemList} * @protected */ - userControls() { + userControls(post, context) { return new ItemList(); }, @@ -53,7 +53,7 @@ export default { * @return {ItemList} * @protected */ - moderationControls(post) { + moderationControls(post, context) { const items = new ItemList(); if (post.contentType() === 'comment' && post.canEdit()) { @@ -90,7 +90,7 @@ export default { })); } } else { - if (post.canEdit()) { + if (post.contentType() === 'comment' && post.canEdit()) { items.add('restore', Button.component({ icon: 'reply', children: app.trans('core.forum.post_controls_restore_button'),