diff --git a/js/actions/piece_list_actions.js b/js/actions/piece_list_actions.js
index 2d5f6447..eb9a5403 100644
--- a/js/actions/piece_list_actions.js
+++ b/js/actions/piece_list_actions.js
@@ -28,7 +28,8 @@ class PieceListActions {
'pieceListCount': res.count
});
resolve();
- });
+ })
+ .catch((err) => reject(err));
});
}
fetchPieceRequestActions() {
diff --git a/js/components/ascribe_accordion_list/accordion_list.js b/js/components/ascribe_accordion_list/accordion_list.js
index 454e6dbc..597581db 100644
--- a/js/components/ascribe_accordion_list/accordion_list.js
+++ b/js/components/ascribe_accordion_list/accordion_list.js
@@ -6,7 +6,8 @@ let AccordionList = React.createClass({
propTypes: {
className: React.PropTypes.string,
children: React.PropTypes.arrayOf(React.PropTypes.element).isRequired,
- loadingElement: React.PropTypes.element
+ loadingElement: React.PropTypes.element,
+ count: React.PropTypes.number
},
render() {
@@ -16,10 +17,10 @@ let AccordionList = React.createClass({
{this.props.children}
);
- } else if(this.props.itemList.length === 0) {
+ } else if(this.props.count === 0) {
return (
-
You don't have any works yet...
+
We could not find any works related to you...
To register one, click here!
);
diff --git a/js/components/piece_list.js b/js/components/piece_list.js
index 08ac9bab..1cf1f649 100644
--- a/js/components/piece_list.js
+++ b/js/components/piece_list.js
@@ -76,21 +76,29 @@ let PieceList = React.createClass({
className="ascribe-accordion-list"
changeOrder={this.accordionChangeOrder}
itemList={this.state.pieceList}
+ count={this.state.pieceListCount}
orderBy={this.state.orderBy}
orderAsc={this.state.orderAsc}
search={this.state.search}
page={this.state.page}
pageSize={this.state.pageSize}
loadingElement={loadingElement}>
- {this.state.pieceList.map((item, i) => {
+ {this.state.pieceList.map((piece, i) => {
+
+ let editionsTableForPiece;
+
+ if(piece.num_editions !== 1) {
+ editionsTableForPiece = ;
+ }
+
return (
-
+ {editionsTableForPiece}
);
})}
diff --git a/js/stores/piece_list_store.js b/js/stores/piece_list_store.js
index 4e536c26..e18dbc31 100644
--- a/js/stores/piece_list_store.js
+++ b/js/stores/piece_list_store.js
@@ -19,7 +19,7 @@ class PieceListStore {
* the number of items the resource actually - without pagination - provides.
*/
this.pieceList = [];
- this.pieceListCount = 0;
+ this.pieceListCount = -1;
this.page = 1;
this.pageSize = 10;
this.search = '';
diff --git a/sass/ascribe_accordion_list.scss b/sass/ascribe_accordion_list.scss
index ffeaf3e3..8b4d0ac9 100644
--- a/sass/ascribe_accordion_list.scss
+++ b/sass/ascribe_accordion_list.scss
@@ -8,6 +8,10 @@ $ascribe-accordion-list-font: 'Source Sans Pro';
padding-left:0;
padding-right:0;
+ margin-top: 3em;
+ &::first-child {
+ margin-top:0;
+ }
overflow:hidden;
@@ -67,7 +71,6 @@ $ascribe-accordion-list-font: 'Source Sans Pro';
.ascribe-accordion-list-item-table {
font-size: .9em;
text-align: center;
- margin-bottom: 3em;
background-color: white;
//border-bottom-left-radius: 1px;
diff --git a/sass/ascribe_piece_list_toolbar.scss b/sass/ascribe_piece_list_toolbar.scss
index 915d8a02..c36d6629 100644
--- a/sass/ascribe_piece_list_toolbar.scss
+++ b/sass/ascribe_piece_list_toolbar.scss
@@ -1,6 +1,3 @@
-.ascribe-piece-list-toolbar {
- margin-bottom: 1.5em;
-}
.search-bar {
max-width: 200px;