From abac948dd1a285eb98c71a1a23d522820924d894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Tue, 26 May 2015 19:59:37 +0200 Subject: [PATCH] Add ACL display for table --- js/components/ascribe_table/table_item_acl.js | 18 ++++++++++++++++++ .../ascribe_table/table_item_subtable.js | 5 +++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 js/components/ascribe_table/table_item_acl.js diff --git a/js/components/ascribe_table/table_item_acl.js b/js/components/ascribe_table/table_item_acl.js new file mode 100644 index 00000000..87e14761 --- /dev/null +++ b/js/components/ascribe_table/table_item_acl.js @@ -0,0 +1,18 @@ +import React from 'react'; + + +let TableItemAcl = React.createClass({ + propTypes: { + content: React.PropTypes.array.isRequired + }, + + render() { + return ( + + {this.props.content.join('/')} + + ); + } +}); + +export default TableItemAcl; diff --git a/js/components/ascribe_table/table_item_subtable.js b/js/components/ascribe_table/table_item_subtable.js index f3d65407..85e361fe 100644 --- a/js/components/ascribe_table/table_item_subtable.js +++ b/js/components/ascribe_table/table_item_subtable.js @@ -10,8 +10,9 @@ import EditionListActions from '../../actions/edition_list_actions'; import GeneralUtils from '../../utils/general_utils'; import Table from './table'; -import TableItemSelectable from './table_item_selectable'; import TableItemText from './table_item_text'; +import TableItemAcl from './table_item_acl'; +import TableItemSelectable from './table_item_selectable'; import TableItemSubtableButton from './table_item_subtable_button'; @@ -81,7 +82,7 @@ let TableItemSubtable = React.createClass({ let columnList = [ new TableColumnContentModel('edition_number', 'Edition Number', TableItemText, 2, false), new TableColumnContentModel('user_registered', 'User', TableItemText, 4, true), - new TableColumnContentModel('bitcoin_id', 'Bitcoin Address', TableItemText, 4, true) + new TableColumnContentModel('acl', 'Actions', TableItemAcl, 4, true) ]; if(this.state.open && this.state.editionList[this.props.columnContent.id] && this.state.editionList[this.props.columnContent.id].length) {