From cc2b69dd029e828b8c03581aff7435fbb75c7559 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 9 Mar 2017 12:00:26 +0100 Subject: [PATCH] Improved handling of disabled comments/responses See #2219 --- com.woltlab.wcf/templates/commentList.tpl | 112 +++++++++--------- .../templates/commentListAddComment.tpl | 2 +- .../templates/commentResponseList.tpl | 86 +++++++------- .../lib/data/comment/CommentAction.class.php | 2 +- .../comment/StructuredCommentList.class.php | 14 +-- wcfsetup/install/files/style/ui/comment.scss | 4 + wcfsetup/install/lang/de.xml | 3 +- wcfsetup/install/lang/en.xml | 3 +- 8 files changed, 122 insertions(+), 104 deletions(-) diff --git a/com.woltlab.wcf/templates/commentList.tpl b/com.woltlab.wcf/templates/commentList.tpl index 9b4e6d19b5..ad9b52c005 100644 --- a/com.woltlab.wcf/templates/commentList.tpl +++ b/com.woltlab.wcf/templates/commentList.tpl @@ -1,64 +1,70 @@ {if !$commentManager|isset}{assign var='commentManager' value=$commentList->getCommentManager()}{/if} {if !$commentCanModerate|isset}{assign var=commentCanModerate value=$commentManager->canModerate($commentList->objectTypeID, $commentList->objectID)}{/if} {foreach from=$commentList item=comment} -
  • -
  • +

    {lang}wcf.comment.moderation.disabledComment{/lang}

    +
  • + {else} +
  • +
    + {if $comment->userID} + + {@$comment->getUserProfile()->getAvatar()->getImageTag(48)} + + {else} {@$comment->getUserProfile()->getAvatar()->getImageTag(48)} - - {else} - {@$comment->getUserProfile()->getAvatar()->getImageTag(48)} - {/if} - -
    -
    - - -
    - +
    + +
    {@$comment->getFormattedMessage()}
    + +
    -
    {@$comment->getFormattedMessage()}
    - - + {/if}
    - - {if $comment|count} -
      - {include file='commentResponseList' responseList=$comment} -
    - {/if}
    - -
  • + + {/if} {/foreach} diff --git a/com.woltlab.wcf/templates/commentListAddComment.tpl b/com.woltlab.wcf/templates/commentListAddComment.tpl index 7f120261cf..79674c28ea 100644 --- a/com.woltlab.wcf/templates/commentListAddComment.tpl +++ b/com.woltlab.wcf/templates/commentListAddComment.tpl @@ -3,7 +3,7 @@