mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 10:25:08 +01:00
Merge remote-tracking branch 'remotes/origin/AD-475-loading-feedback-for-all-views'
Conflicts: sass/ascribe_piece_list_toolbar.scss
This commit is contained in:
commit
b9e8aae298
@ -28,7 +28,8 @@ class PieceListActions {
|
||||
'pieceListCount': res.count
|
||||
});
|
||||
resolve();
|
||||
});
|
||||
})
|
||||
.catch((err) => reject(err));
|
||||
});
|
||||
}
|
||||
fetchPieceRequestActions() {
|
||||
|
@ -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}
|
||||
</div>
|
||||
);
|
||||
} else if(this.props.itemList.length === 0) {
|
||||
} else if(this.props.count === 0) {
|
||||
return (
|
||||
<div>
|
||||
<p className="text-center">You don't have any works yet...</p>
|
||||
<p className="text-center">We could not find any works related to you...</p>
|
||||
<p className="text-center">To register one, click <a href="register_piece">here</a>!</p>
|
||||
</div>
|
||||
);
|
||||
|
@ -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 = <AccordionListItemTableEditions
|
||||
className="ascribe-accordion-list-item-table col-xs-12 col-sm-8 col-md-6 col-lg-6 col-sm-offset-2 col-md-offset-3 col-lg-offset-3"
|
||||
parentId={piece.id} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<AccordionListItem
|
||||
className="col-xs-12 col-sm-10 col-md-8 col-lg-8 col-sm-offset-1 col-md-offset-2 col-lg-offset-2 ascribe-accordion-list-item"
|
||||
content={item}
|
||||
content={piece}
|
||||
key={i}>
|
||||
<AccordionListItemTableEditions
|
||||
className="ascribe-accordion-list-item-table col-xs-12 col-sm-8 col-md-6 col-lg-6 col-sm-offset-2 col-md-offset-3 col-lg-offset-3"
|
||||
parentId={item.id} />
|
||||
{editionsTableForPiece}
|
||||
</AccordionListItem>
|
||||
);
|
||||
})}
|
||||
|
@ -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 = '';
|
||||
|
@ -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;
|
||||
|
@ -1,6 +1,3 @@
|
||||
.ascribe-piece-list-toolbar {
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
.search-bar {
|
||||
max-width: 200px;
|
||||
|
Loading…
Reference in New Issue
Block a user