From e9c18faf32bd9641f30bc42d3801d272455bf2de Mon Sep 17 00:00:00 2001 From: okbel Date: Tue, 8 May 2018 11:30:33 -0300 Subject: [PATCH] Deleted Comment display in Queues --- .../src/components/CommentDeletedTombstone.js | 3 +- .../src/components/UserDetailComment.js | 97 ++++++++-------- .../routes/Moderation/components/Comment.css | 4 + .../routes/Moderation/components/Comment.js | 105 ++++++++++-------- 4 files changed, 120 insertions(+), 89 deletions(-) diff --git a/client/coral-admin/src/components/CommentDeletedTombstone.js b/client/coral-admin/src/components/CommentDeletedTombstone.js index db9a609b1..c04e97b88 100644 --- a/client/coral-admin/src/components/CommentDeletedTombstone.js +++ b/client/coral-admin/src/components/CommentDeletedTombstone.js @@ -1,8 +1,9 @@ import React from 'react'; import styles from './CommentDeletedTombstone.css'; +import t from 'coral-framework/services/i18n'; const CommentDeletedTombstone = () => ( -
The comment was deleted.
+
{t('framework.comment_is_deleted')}
); export default CommentDeletedTombstone; diff --git a/client/coral-admin/src/components/UserDetailComment.js b/client/coral-admin/src/components/UserDetailComment.js index f7a500203..41fb87b28 100644 --- a/client/coral-admin/src/components/UserDetailComment.js +++ b/client/coral-admin/src/components/UserDetailComment.js @@ -44,6 +44,19 @@ class UserDetailComment extends React.Component { body: comment.body, }; + if (!comment.body) { + return ( +
  • + +
  • + ); + } + return (
  • } - {comment.body ? ( - -
    -
    - +
    + +
    + + + {/* TODO: translate string */} + Contains Link + + + -
    - - - {/* TODO: translate string */} - Contains Link - - -
    - - -
    - - ) : ( - - )} +
    +
  • diff --git a/client/coral-admin/src/routes/Moderation/components/Comment.css b/client/coral-admin/src/routes/Moderation/components/Comment.css index 2dc03a503..0f8f91a97 100644 --- a/client/coral-admin/src/routes/Moderation/components/Comment.css +++ b/client/coral-admin/src/routes/Moderation/components/Comment.css @@ -85,6 +85,10 @@ font-weight: 300; } +.deleted { + background-color: #f0f0f0; +} + .moderateArticle { font-size: 14px; margin: 10px 0; diff --git a/client/coral-admin/src/routes/Moderation/components/Comment.js b/client/coral-admin/src/routes/Moderation/components/Comment.js index 137bd9381..97cdf9443 100644 --- a/client/coral-admin/src/routes/Moderation/components/Comment.js +++ b/client/coral-admin/src/routes/Moderation/components/Comment.js @@ -76,6 +76,27 @@ class Comment extends React.Component { asset: comment.asset, }; + if (!comment.body) { + return ( +
  • + +
  • + ); + } + return (
  • )} - {comment.body ? ( - -
    -
    - - -
    - -
    - - - {/* TODO: translate string */} - Contains Link - - -
    - - -
    - + +
    + - - ) : ( - - )} + +
    + + + {/* TODO: translate string */} + Contains Link + + +
    + + +
    + +
    +
    +