diff --git a/client/coral-admin/src/components/Comment.js b/client/coral-admin/src/components/Comment.js index e9e637ecb..7cba85788 100644 --- a/client/coral-admin/src/components/Comment.js +++ b/client/coral-admin/src/components/Comment.js @@ -1,3 +1,4 @@ + import React from 'react'; import timeago from 'timeago.js'; import styles from './CommentList.css'; @@ -20,7 +21,6 @@ export default props => { person {props.comment.get('name') || lang.t('comment.anon')} {timeago().format(props.comment.get('createdAt') || (Date.now() - props.index * 60 * 1000), lang.getLocale().replace('-', '_'))} - {props.comment.get('banned') ?

{lang.t('comment.banned-user')}

: null} {props.comment.get('flagged') ?

{lang.t('comment.flagged')}

: null}
@@ -32,9 +32,7 @@ export default props => { cStyle={action} key={i} onClick={() => props.onClickAction(props.actionsMap[action].status, props.comment.get('id'))} - fab colored> - - + /> ) : null)}
@@ -54,14 +52,7 @@ export default props => { const canShowAction = (action, comment) => { const status = comment.get('status'); const flagged = comment.get('flagged'); - //const banned = comment.get('banned'); - // // If the user that authored the comment is banned then do not ban it again. - // if (action === 'ban' && !banned) { - // return false; - // } - - // If it is flagged do not flag it . if (action === 'flag' && (status || flagged === true)) { return false; } diff --git a/client/coral-admin/src/components/CommentList.css b/client/coral-admin/src/components/CommentList.css index 613238e27..2c58c81cf 100644 --- a/client/coral-admin/src/components/CommentList.css +++ b/client/coral-admin/src/components/CommentList.css @@ -97,12 +97,6 @@ padding-top: 15px; padding-left: 10px; } - - .banned { - color: rgba(255, 0, 0, .5); - padding-top: 15px; - padding-left: 10px; - } } .empty { diff --git a/client/coral-admin/src/components/CommentList.js b/client/coral-admin/src/components/CommentList.js index a48a9c1f2..e4682252d 100644 --- a/client/coral-admin/src/components/CommentList.js +++ b/client/coral-admin/src/components/CommentList.js @@ -9,8 +9,7 @@ import Comment from 'components/Comment'; const actions = { 'reject': {status: 'rejected', icon: 'close', key: 'r'}, 'approve': {status: 'accepted', icon: 'done', key: 't'}, - 'flag': {status: 'flagged', icon: 'flag', filter: 'Untouched'}, - 'ban': {status: 'banned', icon: 'not interested', text: 'Ban User'} + 'flag': {status: 'flagged', icon: 'flag', filter: 'Untouched'} }; // Renders a comment list and allow performing actions @@ -40,7 +39,7 @@ export default class CommentList extends React.Component { } } - // Add swipe to approve or reject or ban + // Add swipe to approve or reject bindGestures () { const {actions} = this.props; this._hammer = new Hammer(this.base); @@ -52,9 +51,6 @@ export default class CommentList extends React.Component { if (actions.indexOf('approve') !== -1) { this._hammer.on('swiperight', () => this.props.singleView && this.actionKeyHandler('Approved')); } - if (actions.indexOf('ban') !== -1) { - this._hammer.on('swipeup', () => this.props.singleView && this.actionKeyHandler('Banned')); - } } // Add key handlers. Each action has one and added j/k for moving around diff --git a/client/coral-admin/src/constants/community.js b/client/coral-admin/src/constants/community.js index f1a547fc5..2ea77ea77 100644 --- a/client/coral-admin/src/constants/community.js +++ b/client/coral-admin/src/constants/community.js @@ -4,4 +4,3 @@ export const FETCH_COMMENTERS_FAILURE = 'FETCH_COMMENTERS_FAILURE'; export const SORT_UPDATE = 'SORT_UPDATE'; export const COMMENTERS_NEW_PAGE = 'COMMENTERS_NEW_PAGE'; export const SET_ROLE = 'SET_ROLE'; -export const SET_STATUS = 'SET_STATUS'; diff --git a/client/coral-admin/src/containers/Community/Community.css b/client/coral-admin/src/containers/Community/Community.css index 6543cbf51..63148da7e 100644 --- a/client/coral-admin/src/containers/Community/Community.css +++ b/client/coral-admin/src/containers/Community/Community.css @@ -15,13 +15,8 @@ .searchBox { /*border: 1px solid rgba(0,0,0,.12);*/ background: white; - width: 100px; -} - -.statusBox { - width: 100px; } .email { display: block; -} +} \ No newline at end of file diff --git a/client/coral-admin/src/containers/Community/Community.js b/client/coral-admin/src/containers/Community/Community.js index 0578cc589..f8c24fd3a 100644 --- a/client/coral-admin/src/containers/Community/Community.js +++ b/client/coral-admin/src/containers/Community/Community.js @@ -20,10 +20,6 @@ const tableHeaders = [ title: lang.t('community.account_creation_date'), field: 'created_at' }, - { - title: lang.t('community.status'), - field: 'status' - }, { title: lang.t('community.newsroom_role'), field: 'role' @@ -34,7 +30,7 @@ const Community = ({isFetching, commenters, ...props}) => { const hasResults = !isFetching && !!commenters.length; return ( - +
diff --git a/client/coral-admin/src/reducers/community.js b/client/coral-admin/src/reducers/community.js index eb563cf9f..81a09a1cc 100644 --- a/client/coral-admin/src/reducers/community.js +++ b/client/coral-admin/src/reducers/community.js @@ -5,8 +5,7 @@ import { FETCH_COMMENTERS_FAILURE, FETCH_COMMENTERS_SUCCESS, SORT_UPDATE, - SET_ROLE, - SET_STATUS + SET_ROLE } from '../constants/community'; const initialState = Map({ @@ -46,13 +45,6 @@ export default function community (state = initialState, action) { commenters[idx].roles[0] = action.role; return state.set('commenters', commenters.map(id => id)); } - case SET_STATUS : { - const commenters = state.get('commenters'); - const idx = commenters.findIndex(el => el.id === action.id); - - commenters[idx].status = action.status; - return state.set('commenters', commenters.map(id => id)); - } case SORT_UPDATE : return state .set('field', action.sort.field) diff --git a/client/coral-admin/src/translations.json b/client/coral-admin/src/translations.json index ff500f0e8..dd959172b 100644 --- a/client/coral-admin/src/translations.json +++ b/client/coral-admin/src/translations.json @@ -6,14 +6,7 @@ "newsroom_role": "Newsroom Role", "admin": "Administrator", "moderator": "Moderator", - "role": "Select role...", - "no-results": "No users found with that user name or email address.", - "status": "Status", - "select-status": "Select status...", - "active": "Active", - "banned": "Banned", - "banned-user": "Banned User", - "loading": "Loading results" + "role": "Select role..." }, "modqueue": { "pending": "pending", @@ -58,14 +51,7 @@ "newsroom_role": "Rol en la redacción", "admin": "Administrador", "moderator": "Moderador", - "role": "Seleccionar rol...", - "no-results": "No se encontraron usuarios con ese nombre de usuario o correo electronico.", - "status": "Estado", - "select-status": "Seleccionar estado...", - "active": "Activa", - "banned": "Suspendido", - "banned-user": "Usuario Suspendido", - "loading": "Cargando resultados" + "role": "Select role..." }, "modqueue": { "pending": "pendiente",