1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 01:25:17 +01:00

aclbuttonlist willmount

This commit is contained in:
ddejongh 2015-06-03 10:43:59 +02:00
parent 6078410240
commit 265a7573ce
2 changed files with 5 additions and 15 deletions

View File

@ -14,7 +14,7 @@ let AclButtonList = React.createClass({
this.setState(state);
},
componentDidMount() {
componentWillMount() {
UserActions.fetchCurrentUser();
UserStore.listen(this.onChange);
},

View File

@ -3,7 +3,7 @@ import React from 'react';
import ResourceViewer from './ascribe_media/resource_viewer';
import EditionActions from '../actions/edition_actions'
import AclButton from './ascribe_buttons/acl_button'
import AclButtonList from './ascribe_buttons/acl_button_list'
/**
* This is the component that implements display-specific functionality
@ -56,20 +56,10 @@ let EditionDetails = React.createClass({
<EditionDetailProperty label="id" value={ this.props.edition.bitcoin_id } />
<EditionDetailProperty label="owner" value={ this.props.edition.owner } />
<br/>
<AclButton
availableAcls={["transfer"]}
action="transfer"
<AclButtonList
availableAcls={["transfer", "consign", "loan", "share"]}
editions={[this.props.edition]}
currentUser={this.props.currentUser}
handleSuccess={this.handleSuccess}
/>
<AclButton
availableAcls={["consign"]}
action="consign"
editions={[this.props.edition]}
currentUser={this.props.currentUser}
handleSuccess={this.handleSuccess}
/>
handleSuccess={this.handleSuccess} />
<hr/>
</div>
);