diff --git a/js/components/acl_proxy.js b/js/components/acl_proxy.js index c6e7b0a9..5b328b3e 100644 --- a/js/components/acl_proxy.js +++ b/js/components/acl_proxy.js @@ -15,22 +15,31 @@ let AclProxy = React.createClass({ React.PropTypes.arrayOf(React.PropTypes.element), React.PropTypes.element ]).isRequired, - aclObject: React.PropTypes.object.isRequired, - aclName: React.PropTypes.string.isRequired + aclObject: React.PropTypes.object, + aclName: React.PropTypes.string, + show: React.PropTypes.bool }, render() { - if(this.props.aclObject[this.props.aclName]) { + if(this.props.show) { return ( {this.props.children} ); } else { - if(typeof this.props.aclObject[this.props.aclName] === 'undefined') { - console.warn('The aclName you\'re filtering for was not present (undefined) in the aclObject.'); + if(this.props.aclObject[this.props.aclName]) { + return ( + + {this.props.children} + + ); + } else { + if(typeof this.props.aclObject[this.props.aclName] === 'undefined') { + console.warn('The aclName you\'re filtering for was not present (undefined) in the aclObject.'); + } + return null; } - return null; } } }); diff --git a/js/components/ascribe_accordion_list/accordion_list_item.js b/js/components/ascribe_accordion_list/accordion_list_item.js index a5537b51..1f5d9ff8 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item.js +++ b/js/components/ascribe_accordion_list/accordion_list_item.js @@ -16,6 +16,9 @@ import EditionListActions from '../../actions/edition_list_actions'; import GlobalNotificationModel from '../../models/global_notification_model'; import GlobalNotificationActions from '../../actions/global_notification_actions'; +import AclProxy from '../acl_proxy'; +import SubmitToPrizeButton from '../ascribe_buttons/submit_to_prize_button'; + import { getLangText } from '../../utils/lang_utils'; let Link = Router.Link; @@ -125,6 +128,20 @@ let AccordionListItem = React.createClass({ piece={this.props.content} toggleCreateEditionsDialog={this.toggleCreateEditionsDialog} onPollingSuccess={this.onPollingSuccess}/> + + + + + + diff --git a/js/components/ascribe_buttons/submit_to_prize_button.js b/js/components/ascribe_buttons/submit_to_prize_button.js new file mode 100644 index 00000000..62b9995f --- /dev/null +++ b/js/components/ascribe_buttons/submit_to_prize_button.js @@ -0,0 +1,23 @@ +'use strict'; + +import React from 'react'; +import classNames from 'classnames'; + +import { getLangText } from '../../utils/lang_utils'; + +let SubmitToPrizeButton = React.createClass({ + propTypes: { + className: React.PropTypes.string + }, + + render() { + return ( + + ); + } +}); + +export default SubmitToPrizeButton; \ No newline at end of file