From d8684224e74924bd5361970889014c9ee20ab79a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 7 Mar 2017 17:56:38 +0100 Subject: [PATCH] Added basic approval process for comments See #2219 --- com.woltlab.wcf/templates/commentList.tpl | 16 ++- com.woltlab.wcf/userGroupOption.xml | 4 +- .../lib/data/comment/CommentAction.class.php | 114 ++++++++++-------- .../manager/AbstractCommentManager.class.php | 17 +++ .../manager/ArticleCommentManager.class.php | 5 + .../comment/manager/ICommentManager.class.php | 8 ++ .../manager/PageCommentManager.class.php | 5 + .../UserProfileCommentManager.class.php | 5 + .../files/style/layout/containerList.scss | 6 +- wcfsetup/install/files/style/ui/comment.scss | 8 ++ wcfsetup/install/lang/de.xml | 1 + wcfsetup/install/lang/en.xml | 1 + 12 files changed, 137 insertions(+), 53 deletions(-) diff --git a/com.woltlab.wcf/templates/commentList.tpl b/com.woltlab.wcf/templates/commentList.tpl index 33d18cf9c0..dce45958f2 100644 --- a/com.woltlab.wcf/templates/commentList.tpl +++ b/com.woltlab.wcf/templates/commentList.tpl @@ -1,6 +1,11 @@ {if !$commentManager|isset}{assign var='commentManager' value=$commentList->getCommentManager()}{/if} +{assign var=__comentCanModerate value=$commentManager->canModerate($commentList->objectTypeID, $commentList->objectID)} {foreach from=$commentList item=comment} -
  • +
  • {if $comment->userID} @@ -21,10 +26,14 @@ {$comment->username} {else} - {$comment->username} + {$comment->username} {/if} {@$comment->time|time} + + {if $comment->isDisabled} + {lang}wcf.message.status.disabled{/lang} + {/if}
    @@ -32,6 +41,9 @@