1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-03 10:25:08 +01:00

Increase robustness by excluding meta data for pieces that have been loaned before actual launch

This commit is contained in:
Tim Daubenschütz 2015-09-22 13:37:31 +02:00
parent 878a716262
commit 4bbc4afd61

View File

@ -65,13 +65,17 @@ let IkonotvPieceContainer = React.createClass({
},
render() {
if(this.state.piece && this.state.piece.title) {
return (
<WalletPieceContainer
piece={this.state.piece}
currentUser={this.state.currentUser}
loadPiece={this.loadPiece}
submitButtonType={IkonotvSubmitButton}>
let furtherDetails = (
<CollapsibleParagraph
title={getLangText('Further Details')}
show={true}
defaultExpanded={true}>
<span>{getLangText('This piece has been loaned before we started to collect further details.')}</span>
</CollapsibleParagraph>
);
if(this.state.piece.extra_data && Object.keys(this.state.piece.extra_data).length > 0 && this.state.piece.acl) {
furtherDetails = (
<CollapsibleParagraph
title={getLangText('Further Details')}
show={true}
@ -85,6 +89,17 @@ let IkonotvPieceContainer = React.createClass({
isInline={true}
disabled={!this.state.piece.acl.acl_edit} />
</CollapsibleParagraph>
);
}
if(this.state.piece && this.state.piece.title) {
return (
<WalletPieceContainer
piece={this.state.piece}
currentUser={this.state.currentUser}
loadPiece={this.loadPiece}
submitButtonType={IkonotvSubmitButton}>
{furtherDetails}
</WalletPieceContainer>
);
}