Story: {comment.asset.title}
diff --git a/client/coral-admin/src/containers/UserDetailComment.js b/client/coral-admin/src/containers/UserDetailComment.js
index a70a9394d..9f0e3a793 100644
--- a/client/coral-admin/src/containers/UserDetailComment.js
+++ b/client/coral-admin/src/containers/UserDetailComment.js
@@ -9,6 +9,7 @@ export default withFragments({
body
created_at
status
+ hasParent
asset {
id
title
diff --git a/client/coral-admin/src/routes/Moderation/components/Comment.js b/client/coral-admin/src/routes/Moderation/components/Comment.js
index 1335a8c52..c73d15eaa 100644
--- a/client/coral-admin/src/routes/Moderation/components/Comment.js
+++ b/client/coral-admin/src/routes/Moderation/components/Comment.js
@@ -2,6 +2,7 @@ import React, {PropTypes} from 'react';
import {Link} from 'react-router';
import {Icon} from 'coral-ui';
+import ReplyBadge from 'coral-admin/src/components/ReplyBadge';
import FlagBox from 'coral-admin/src/components/FlagBox';
import styles from './styles.css';
import CommentType from 'coral-admin/src/components/CommentType';
@@ -107,6 +108,7 @@ class Comment extends React.Component {
}
+ {comment.hasParent && }
(
+
+ {icon && }
+ {children}
+
+);
+
+export default Badge;
diff --git a/client/coral-ui/index.js b/client/coral-ui/index.js
index 8a538d120..8f261bcca 100644
--- a/client/coral-ui/index.js
+++ b/client/coral-ui/index.js
@@ -26,3 +26,4 @@ export {default as Option} from './components/Option';
export {default as SnackBar} from './components/SnackBar';
export {default as TextArea} from './components/TextArea';
export {default as Drawer} from './components/Drawer';
+export {default as Badge} from './components/Badge';
diff --git a/graph/resolvers/comment.js b/graph/resolvers/comment.js
index 0fd3a730c..57ebc4d56 100644
--- a/graph/resolvers/comment.js
+++ b/graph/resolvers/comment.js
@@ -1,6 +1,9 @@
const {decorateWithTags} = require('./util');
const Comment = {
+ hasParent({parent_id}) {
+ return !!parent_id;
+ },
parent({parent_id}, _, {loaders: {Comments}}) {
if (parent_id == null) {
return null;
diff --git a/graph/typeDefs.graphql b/graph/typeDefs.graphql
index d2c1ffe1f..d83d9f75f 100644
--- a/graph/typeDefs.graphql
+++ b/graph/typeDefs.graphql
@@ -339,6 +339,9 @@ type Comment {
# describes how the comment can be edited
editing: EditInfo
+
+ # Indicates if it has a parent
+ hasParent: Boolean
}
# CommentConnection represents a paginable subset of a comment list.
diff --git a/locales/en.yml b/locales/en.yml
index 54d5315d5..2ec0c816c 100644
--- a/locales/en.yml
+++ b/locales/en.yml
@@ -281,6 +281,7 @@ en:
prev_comment: "Go to the previous comment"
reject: "Reject"
rejected: "Rejected"
+ reply: "Reply"
select_stream: "Select Stream"
shift_key: "⇧"
shortcuts: "Shortcuts"
diff --git a/locales/es.yml b/locales/es.yml
index 8c3e7927b..877a42841 100644
--- a/locales/es.yml
+++ b/locales/es.yml
@@ -272,6 +272,7 @@ es:
prev_comment: "Ir al comentario anterior"
reject: "Rechazar"
rejected: "rechazado"
+ reply: "Respuesta"
select_stream: "Seleccionar hilo de comentarios"
shift_key: ⇧
shortcuts: Atajos