1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00

embed in edition

This commit is contained in:
diminator 2015-12-09 11:41:46 +01:00
parent 4e3cf47d3f
commit 7318d4e5df
2 changed files with 18 additions and 9 deletions

View File

@ -244,7 +244,16 @@ let CoaDetails = React.createClass({
if(this.props.coa && this.props.coa.url_safe) { if(this.props.coa && this.props.coa.url_safe) {
return ( return (
<div> <div>
<p className="text-center ascribe-button-list"> <div
className="notification-contract-pdf"
style={{paddingBottom: '1em'}}>
<embed
className="embed-form"
src={this.props.coa.url_safe}
alt="pdf"
pluginspage="http://www.adobe.com/products/acrobat/readstep2.html"/>
</div>
<div className="text-center ascribe-button-list">
<a href={this.props.coa.url_safe} target="_blank"> <a href={this.props.coa.url_safe} target="_blank">
<button className="btn btn-default btn-xs"> <button className="btn btn-default btn-xs">
{getLangText('Download')} <Glyphicon glyph="cloud-download"/> {getLangText('Download')} <Glyphicon glyph="cloud-download"/>
@ -256,7 +265,7 @@ let CoaDetails = React.createClass({
</button> </button>
</Link> </Link>
</p> </div>
</div> </div>
); );
} else if(typeof this.props.coa === 'string'){ } else if(typeof this.props.coa === 'string'){
@ -268,7 +277,7 @@ let CoaDetails = React.createClass({
} }
return ( return (
<div className="text-center"> <div className="text-center">
<AscribeSpinner color='dark-blue' size='lg'/> <AscribeSpinner color='dark-blue' size='md'/>
<p>{getLangText("Just a sec, we\'re generating your COA")}</p> <p>{getLangText("Just a sec, we\'re generating your COA")}</p>
<p>{getLangText('(you may leave the page)')}</p> <p>{getLangText('(you may leave the page)')}</p>
</div> </div>

View File

@ -87,16 +87,16 @@ let EditionContainer = React.createClass({
}, },
render() { render() {
if (this.state.edition && this.state.edition.id && const {edition, currentUser, coaMeta} = this.state;
this.state.currentUser && this.state.currentUser.email) { if (edition && edition.id && currentUser && currentUser.email) {
setDocumentTitle([this.state.edition.artist_name, this.state.edition.title].join(', ')); setDocumentTitle([edition.artist_name, edition.title].join(', '));
return ( return (
<Edition <Edition
actionPanelButtonListType={this.props.actionPanelButtonListType} actionPanelButtonListType={this.props.actionPanelButtonListType}
furtherDetailsType={this.props.furtherDetailsType} furtherDetailsType={this.props.furtherDetailsType}
edition={this.state.edition} edition={edition}
coaError={this.state.coaMeta.err} coaError={coaMeta.err}
currentUser={this.state.currentUser} currentUser={currentUser}
loadEdition={() => EditionActions.fetchEdition(this.props.params.editionId)} /> loadEdition={() => EditionActions.fetchEdition(this.props.params.editionId)} />
); );
} else { } else {