diff --git a/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js b/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js index be3bda77..7f1723cd 100644 --- a/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js +++ b/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js @@ -13,6 +13,12 @@ let IkonotvSubmitButton = React.createClass({ piece: React.PropTypes.object.isRequired }, + getDefaultProps() { + return { + className: 'btn-xs' + }; + }, + render() { let piece = this.props.piece; let startFrom = 1; @@ -34,7 +40,7 @@ let IkonotvSubmitButton = React.createClass({ 'start_from': startFrom, 'piece_id': piece.id }} - className={classNames('btn', 'btn-default', 'btn-xs', this.props.className)}> + className={classNames('btn', 'btn-default', this.props.className)}> {getLangText('Loan to IkonoTV')} ); diff --git a/js/components/whitelabel/wallet/components/ikonotv/ascribe_detail/ikonotv_piece_container.js b/js/components/whitelabel/wallet/components/ikonotv/ascribe_detail/ikonotv_piece_container.js index 3efa2185..ac7d16da 100644 --- a/js/components/whitelabel/wallet/components/ikonotv/ascribe_detail/ikonotv_piece_container.js +++ b/js/components/whitelabel/wallet/components/ikonotv/ascribe_detail/ikonotv_piece_container.js @@ -11,6 +11,11 @@ import Piece from '../../../../../../components/ascribe_detail/piece'; import AppConstants from '../../../../../../constants/application_constants'; +import ListRequestActions from '../../../../../ascribe_forms/list_form_request_actions'; +import AclButtonList from '../../../../../ascribe_buttons/acl_button_list'; +import DeleteButton from '../../../../../ascribe_buttons/delete_button'; +import IkonotvSubmitButton from '../ascribe_buttons/ikonotv_submit_button'; + import Form from '../../../../../../components/ascribe_forms/form'; import Property from '../../../../../../components/ascribe_forms/property'; import InputTextAreaToggable from '../../../../../../components/ascribe_forms/input_textarea_toggable'; @@ -21,6 +26,8 @@ import Note from '../../../../../ascribe_detail/note'; import DetailProperty from '../../../../../ascribe_detail/detail_property'; +import AclProxy from '../../../../../acl_proxy'; + import ApiUrls from '../../../../../../constants/api_urls'; import { getLangText } from '../../../../../../utils/lang_utils'; @@ -66,6 +73,50 @@ let IkonotvPieceContainer = React.createClass({ PieceActions.fetchOne(this.props.params.pieceId); }, + getActions(){ + if (this.state.piece && + this.state.piece.notifications && + this.state.piece.notifications.length > 0) { + return ( + ); + } + else { + + //We need to disable the normal acl_loan because we're inserting a custom acl_loan button + let availableAcls; + + if(this.state.piece && this.state.piece.acl && typeof this.state.piece.acl.acl_loan !== 'undefined') { + // make a copy to not have side effects + availableAcls = mergeOptions({}, this.state.piece.acl); + availableAcls.acl_loan = false; + } + + return ( + + + + + + + ); + } + }, + render() { if(this.state.piece && this.state.piece.title) { return ( @@ -88,7 +139,7 @@ let IkonotvPieceContainer = React.createClass({
}> - + {this.getActions()} 0}>