mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 01:25:17 +01:00
Add ACL display for table
This commit is contained in:
parent
9c017ac993
commit
abac948dd1
18
js/components/ascribe_table/table_item_acl.js
Normal file
18
js/components/ascribe_table/table_item_acl.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
|
||||||
|
let TableItemAcl = React.createClass({
|
||||||
|
propTypes: {
|
||||||
|
content: React.PropTypes.array.isRequired
|
||||||
|
},
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<span>
|
||||||
|
{this.props.content.join('/')}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
export default TableItemAcl;
|
@ -10,8 +10,9 @@ import EditionListActions from '../../actions/edition_list_actions';
|
|||||||
import GeneralUtils from '../../utils/general_utils';
|
import GeneralUtils from '../../utils/general_utils';
|
||||||
|
|
||||||
import Table from './table';
|
import Table from './table';
|
||||||
import TableItemSelectable from './table_item_selectable';
|
|
||||||
import TableItemText from './table_item_text';
|
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';
|
import TableItemSubtableButton from './table_item_subtable_button';
|
||||||
|
|
||||||
|
|
||||||
@ -81,7 +82,7 @@ let TableItemSubtable = React.createClass({
|
|||||||
let columnList = [
|
let columnList = [
|
||||||
new TableColumnContentModel('edition_number', 'Edition Number', TableItemText, 2, false),
|
new TableColumnContentModel('edition_number', 'Edition Number', TableItemText, 2, false),
|
||||||
new TableColumnContentModel('user_registered', 'User', TableItemText, 4, true),
|
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) {
|
if(this.state.open && this.state.editionList[this.props.columnContent.id] && this.state.editionList[this.props.columnContent.id].length) {
|
||||||
|
Loading…
Reference in New Issue
Block a user