-
-
-
-
-
-
+ if(availableAcls.length > 0) {
+ return (
+
-
- );
+ );
+ } else {
+ return null;
+ }
+
}
});
diff --git a/js/components/ascribe_table/table.js b/js/components/ascribe_table/table.js
index 06af7b89..74f19058 100644
--- a/js/components/ascribe_table/table.js
+++ b/js/components/ascribe_table/table.js
@@ -9,7 +9,7 @@ let Table = React.createClass({
propTypes: {
columnList: React.PropTypes.arrayOf(React.PropTypes.instanceOf(TableColumnContentModel)),
- changeOrder: React.PropTypes.func // turn isRequired on again after editions order implemented
+ changeOrder: React.PropTypes.func
},
renderChildren() {
@@ -24,24 +24,20 @@ let Table = React.createClass({
},
render() {
- if(this.props.itemList && this.props.itemList.length > 0) {
- return (
-
-
+ return (
+
+
+
{this.renderChildren()}
- );
- } else {
- return (
-
Loading
- );
- }
+
+ );
}
});
diff --git a/js/components/ascribe_table/table_item.js b/js/components/ascribe_table/table_item.js
index 1827253f..dffb7fa9 100644
--- a/js/components/ascribe_table/table_item.js
+++ b/js/components/ascribe_table/table_item.js
@@ -11,13 +11,12 @@ let TableItem = React.createClass({
columnList: React.PropTypes.arrayOf(React.PropTypes.instanceOf(TableColumnContentModel)),
columnContent: React.PropTypes.object,
onClick: React.PropTypes.func, // See: https://facebook.github.io/react/tips/expose-component-functions.html
- classNames: React.PropTypes.string
+ className: React.PropTypes.string
},
render() {
return (
-
{
+ return v === 'consign' || v === 'loan' || v === 'transfer' || v === 'view';
+ });
+
+ return (
+
+ {filteredAcls.join('/')}
+
+ );
+ }
+});
+
+export default TableItemAclFiltered;
diff --git a/js/components/ascribe_table/table_item_checkbox.js b/js/components/ascribe_table/table_item_checkbox.js
new file mode 100644
index 00000000..02357fa3
--- /dev/null
+++ b/js/components/ascribe_table/table_item_checkbox.js
@@ -0,0 +1,23 @@
+import React from 'react';
+
+
+let TableItemCheckbox = React.createClass({
+ propTypes: {
+ editionId: React.PropTypes.number,
+ pieceId: React.PropTypes.number,
+ selectItem: React.PropTypes.func,
+ selected: React.PropTypes.bool
+ },
+
+ selectItem() {
+ this.props.selectItem(this.props.pieceId, this.props.editionId);
+ },
+
+ render() {
+ return (
+
+ );
+ }
+});
+
+export default TableItemCheckbox;
diff --git a/js/components/ascribe_table/table_item_selectable.js b/js/components/ascribe_table/table_item_selectable.js
index d62f8d04..711e42b6 100644
--- a/js/components/ascribe_table/table_item_selectable.js
+++ b/js/components/ascribe_table/table_item_selectable.js
@@ -26,12 +26,13 @@ let TableItemSelectable = React.createClass({
return (
);
+
}
});
diff --git a/js/components/ascribe_table/table_item_wrapper.js b/js/components/ascribe_table/table_item_wrapper.js
index 2f9f4c7e..c6251c4b 100644
--- a/js/components/ascribe_table/table_item_wrapper.js
+++ b/js/components/ascribe_table/table_item_wrapper.js
@@ -17,11 +17,13 @@ let TableItemWrapper = React.createClass({
{this.props.columnList.map((column, i) => {
let TypeElement = column.displayType;
+ let typeElementProps = column.transformFn(this.props.columnContent);
+
let columnClass = this.calcColumnClasses(this.props.columnList, i, this.props.columnWidth);
return (
-
+
);
diff --git a/js/components/header.js b/js/components/header.js
index f191c04c..20855b1b 100644
--- a/js/components/header.js
+++ b/js/components/header.js
@@ -24,7 +24,7 @@ let Header = React.createClass({
render() {
return (
-