1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-05 19:25:42 +01:00

Change lumens buttons for AD-1264 changes

This commit is contained in:
Brett Sun 2015-11-03 12:10:21 +01:00
parent cd6673f255
commit 54212627bb
3 changed files with 12 additions and 14 deletions

View File

@ -224,7 +224,7 @@ let PieceList = React.createClass({
className="ascribe-piece-list-bulk-modal"> className="ascribe-piece-list-bulk-modal">
<BulkModalButtonListType <BulkModalButtonListType
availableAcls={availableAcls} availableAcls={availableAcls}
editions={selectedEditions} pieceOrEditions={selectedEditions}
handleSuccess={this.handleAclSuccess} handleSuccess={this.handleAclSuccess}
className="text-center ascribe-button-list collapse-group"> className="text-center ascribe-button-list collapse-group">
<DeleteButton <DeleteButton

View File

@ -4,8 +4,8 @@ import React from 'react';
import LumenusSubmitButton from './lumenus_submit_button'; import LumenusSubmitButton from './lumenus_submit_button';
import AclButton from '../../../../../ascribe_buttons/acl_button';
import DeleteButton from '../../../../../ascribe_buttons/delete_button'; import DeleteButton from '../../../../../ascribe_buttons/delete_button';
import ShareButton from '../../../../../ascribe_buttons/acls/share_button';
import UserActions from '../../../../../../actions/user_actions'; import UserActions from '../../../../../../actions/user_actions';
import UserStore from '../../../../../../stores/user_store'; import UserStore from '../../../../../../stores/user_store';
@ -14,7 +14,7 @@ let LumenusAclButtonList = React.createClass({
propTypes: { propTypes: {
availableAcls: React.PropTypes.object.isRequired, availableAcls: React.PropTypes.object.isRequired,
className: React.PropTypes.string, className: React.PropTypes.string,
editions: React.PropTypes.array, pieceOrEditions: React.PropTypes.array,
handleSuccess: React.PropTypes.func, handleSuccess: React.PropTypes.func,
children: React.PropTypes.oneOfType([ children: React.PropTypes.oneOfType([
React.PropTypes.arrayOf(React.PropTypes.element), React.PropTypes.arrayOf(React.PropTypes.element),
@ -40,19 +40,18 @@ let LumenusAclButtonList = React.createClass({
}, },
render() { render() {
let { availableAcls, className, editions, handleSuccess } = this.props; let { availableAcls, className, pieceOrEditions, handleSuccess } = this.props;
return ( return (
<div className={className}> <div className={className}>
<LumenusSubmitButton <LumenusSubmitButton
availableAcls={availableAcls} availableAcls={availableAcls}
currentUser={this.state.currentUser} currentUser={this.state.currentUser}
editions={editions} pieceOrEditions={pieceOrEditions}
handleSuccess={handleSuccess} /> handleSuccess={handleSuccess} />
<AclButton <ShareButton
action="acl_share"
availableAcls={availableAcls} availableAcls={availableAcls}
currentUser={this.state.currentUser} currentUser={this.state.currentUser}
pieceOrEditions={editions} pieceOrEditions={pieceOrEditions}
handleSuccess={handleSuccess} /> handleSuccess={handleSuccess} />
{this.props.children} {this.props.children}
</div> </div>

View File

@ -3,7 +3,7 @@
import React from 'react'; import React from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import AclButton from '../../../../../ascribe_buttons/acl_button'; import ConsignButton from '../../../../../ascribe_buttons/acls/consign_button';
import WhitelabelActions from '../../../../../../actions/whitelabel_actions'; import WhitelabelActions from '../../../../../../actions/whitelabel_actions';
import WhitelabelStore from '../../../../../../stores/whitelabel_store'; import WhitelabelStore from '../../../../../../stores/whitelabel_store';
@ -14,7 +14,7 @@ let LumenusSubmitButton = React.createClass({
propTypes: { propTypes: {
availableAcls: React.PropTypes.object.isRequired, availableAcls: React.PropTypes.object.isRequired,
currentUser: React.PropTypes.object, currentUser: React.PropTypes.object,
editions: React.PropTypes.array, pieceOrEditions: React.PropTypes.array,
handleSuccess: React.PropTypes.func, handleSuccess: React.PropTypes.func,
className: React.PropTypes.string, className: React.PropTypes.string,
}, },
@ -37,17 +37,16 @@ let LumenusSubmitButton = React.createClass({
}, },
render() { render() {
const { availableAcls, currentUser, className, editions, handleSuccess } = this.props; const { availableAcls, currentUser, className, pieceOrEditions, handleSuccess } = this.props;
return ( return (
<AclButton <ConsignButton
action='acl_consign'
availableAcls={availableAcls} availableAcls={availableAcls}
buttonAcceptName={getLangText('CONSIGN TO LUMENUS')} buttonAcceptName={getLangText('CONSIGN TO LUMENUS')}
email={this.state.whitelabel.user} email={this.state.whitelabel.user}
currentUser={currentUser} currentUser={currentUser}
handleSuccess={handleSuccess} handleSuccess={handleSuccess}
pieceOrEditions={editions} pieceOrEditions={pieceOrEditions}
className={className} /> className={className} />
); );
} }