mirror of
https://github.com/ascribe/onion.git
synced 2025-02-01 20:39:57 +01:00
if user has piece with one edition, do not display show editions
This commit is contained in:
parent
ad833a53dc
commit
ae9e2e6a28
@ -83,15 +83,22 @@ let PieceList = React.createClass({
|
||||
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>
|
||||
);
|
||||
})}
|
||||
|
@ -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,3 +0,0 @@
|
||||
.ascribe-piece-list-toolbar {
|
||||
margin-bottom: 1.5em;
|
||||
}
|
Loading…
Reference in New Issue
Block a user