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
|
'pieceListCount': res.count
|
||||||
});
|
});
|
||||||
resolve();
|
resolve();
|
||||||
});
|
})
|
||||||
|
.catch((err) => reject(err));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
fetchPieceRequestActions() {
|
fetchPieceRequestActions() {
|
||||||
|
@ -6,7 +6,8 @@ let AccordionList = React.createClass({
|
|||||||
propTypes: {
|
propTypes: {
|
||||||
className: React.PropTypes.string,
|
className: React.PropTypes.string,
|
||||||
children: React.PropTypes.arrayOf(React.PropTypes.element).isRequired,
|
children: React.PropTypes.arrayOf(React.PropTypes.element).isRequired,
|
||||||
loadingElement: React.PropTypes.element
|
loadingElement: React.PropTypes.element,
|
||||||
|
count: React.PropTypes.number
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@ -16,10 +17,10 @@ let AccordionList = React.createClass({
|
|||||||
{this.props.children}
|
{this.props.children}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else if(this.props.itemList.length === 0) {
|
} else if(this.props.count === 0) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<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>
|
<p className="text-center">To register one, click <a href="register_piece">here</a>!</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -76,21 +76,29 @@ let PieceList = React.createClass({
|
|||||||
className="ascribe-accordion-list"
|
className="ascribe-accordion-list"
|
||||||
changeOrder={this.accordionChangeOrder}
|
changeOrder={this.accordionChangeOrder}
|
||||||
itemList={this.state.pieceList}
|
itemList={this.state.pieceList}
|
||||||
|
count={this.state.pieceListCount}
|
||||||
orderBy={this.state.orderBy}
|
orderBy={this.state.orderBy}
|
||||||
orderAsc={this.state.orderAsc}
|
orderAsc={this.state.orderAsc}
|
||||||
search={this.state.search}
|
search={this.state.search}
|
||||||
page={this.state.page}
|
page={this.state.page}
|
||||||
pageSize={this.state.pageSize}
|
pageSize={this.state.pageSize}
|
||||||
loadingElement={loadingElement}>
|
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 (
|
return (
|
||||||
<AccordionListItem
|
<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"
|
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}>
|
key={i}>
|
||||||
<AccordionListItemTableEditions
|
{editionsTableForPiece}
|
||||||
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} />
|
|
||||||
</AccordionListItem>
|
</AccordionListItem>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
@ -19,7 +19,7 @@ class PieceListStore {
|
|||||||
* the number of items the resource actually - without pagination - provides.
|
* the number of items the resource actually - without pagination - provides.
|
||||||
*/
|
*/
|
||||||
this.pieceList = [];
|
this.pieceList = [];
|
||||||
this.pieceListCount = 0;
|
this.pieceListCount = -1;
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
this.pageSize = 10;
|
this.pageSize = 10;
|
||||||
this.search = '';
|
this.search = '';
|
||||||
|
@ -8,6 +8,10 @@ $ascribe-accordion-list-font: 'Source Sans Pro';
|
|||||||
|
|
||||||
padding-left:0;
|
padding-left:0;
|
||||||
padding-right:0;
|
padding-right:0;
|
||||||
|
margin-top: 3em;
|
||||||
|
&::first-child {
|
||||||
|
margin-top:0;
|
||||||
|
}
|
||||||
|
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
|
|
||||||
@ -67,7 +71,6 @@ $ascribe-accordion-list-font: 'Source Sans Pro';
|
|||||||
.ascribe-accordion-list-item-table {
|
.ascribe-accordion-list-item-table {
|
||||||
font-size: .9em;
|
font-size: .9em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 3em;
|
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
|
||||||
//border-bottom-left-radius: 1px;
|
//border-bottom-left-radius: 1px;
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
.ascribe-piece-list-toolbar {
|
|
||||||
margin-bottom: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar {
|
.search-bar {
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
|
Loading…
Reference in New Issue
Block a user