diff --git a/index.html b/index.html index 0893168d..e845e759 100644 --- a/index.html +++ b/index.html @@ -40,6 +40,15 @@
+ + + + + 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 diff --git a/js/components/header.js b/js/components/header.js index 3b9dc7a3..bcf71ff5 100644 --- a/js/components/header.js +++ b/js/components/header.js @@ -58,6 +58,8 @@ let Header = React.createClass({ handleLogout(){ UserActions.logoutCurrentUser(); Alt.flush(); + // kill intercom (with fire) + window.Intercom('shutdown'); this.transitionTo('login'); }, @@ -89,6 +91,17 @@ let Header = React.createClass({ }, onChange(state) { this.setState(state); + + if(this.state.currentUser && this.state.currentUser.email) { + // bootup intercom if the user is logged in + window.Intercom('boot', { + app_id: 'oboxh5w1', + email: this.state.currentUser.email, + widget: { + activator: '#IntercomDefaultWidget' + } + }); + } }, render() { diff --git a/js/constants/languages.js b/js/constants/languages.js index d718fa69..f05065dd 100644 --- a/js/constants/languages.js +++ b/js/constants/languages.js @@ -211,6 +211,19 @@ const languages = { 'read': 'read', 'If your email address exists in our database, you will receive a password recovery link in a few minutes.': 'If your email address exists in our database, you will receive a password recovery link in a few minutes.', 'REGISTREE': 'REGISTREE', + 'Submit to the prize': 'Submit to the prize', + 'Submit': 'Submit', + 'Artist statement': 'Artist statement', + 'Enter your statement': 'Enter your statement', + 'Work description': 'Work description', + 'Enter the description for your work': 'Enter the description for your work', + 'I agree to the Terms of Service the art price': 'I agree to the Terms of Service the art price', + 'Log in': 'Log in', + 'Enter ascribe': 'Enter ascribe', + 'Sign up to the prize': 'Sign up to the prize', + '(e.g. andy@warhol.co.uk)': '(e.g. andy@warhol.co.uk)', + 'Use a combination of minimum 10 chars and numbers': 'Use a combination of minimum 10 chars and numbers', + 'Log in with ascribe': 'Log in with ascribe' }, 'de': { 'ID': 'ID', @@ -422,6 +435,19 @@ const languages = { 'read': 'read', 'If your email address exists in our database, you will receive a password recovery link in a few minutes.': 'If your email address exists in our database, you will receive a password recovery link in a few minutes.', 'REGISTREE': 'REGISTREE', + 'Submit to the prize': 'Submit to the prize', + 'Submit': 'Submit', + 'Artist statement': 'Artist statement', + 'Enter your statement': 'Enter your statement', + 'Work description': 'Work description', + 'Enter the description for your work': 'Enter the description for your work', + 'I agree to the Terms of Service the art price': 'I agree to the Terms of Service the art price', + 'Log in': 'Log in', + 'Enter ascribe': 'Enter ascribe', + 'Sign up to the prize': 'Sign up to the prize', + '(e.g. andy@warhol.co.uk)': '(e.g. andy@warhol.co.uk)', + 'Use a combination of minimum 10 chars and numbers': 'Use a combination of minimum 10 chars and numbers', + 'Log in with ascribe': 'Log in with ascribe' }, 'fr': { 'ID': 'ID', @@ -633,6 +659,19 @@ const languages = { 'read': 'read', 'If your email address exists in our database, you will receive a password recovery link in a few minutes.': 'Si votre adresse électronique existe dans notre base de données, vous recevrez un lien de récupération de mot de passe dans quelques minutes.', 'REGISTREE': 'REGISTREE', + 'Submit to the prize': 'Submit to the prize', + 'Submit': 'Submit', + 'Artist statement': 'Artist statement', + 'Enter your statement': 'Enter your statement', + 'Work description': 'Work description', + 'Enter the description for your work': 'Enter the description for your work', + 'I agree to the Terms of Service the art price': 'I agree to the Terms of Service the art price', + 'Log in': 'Log in', + 'Enter ascribe': 'Enter ascribe', + 'Sign up to the prize': 'Sign up to the prize', + '(e.g. andy@warhol.co.uk)': '(e.g. andy@warhol.co.uk)', + 'Use a combination of minimum 10 chars and numbers': 'Use a combination of minimum 10 chars and numbers', + 'Log in with ascribe': 'Log in with ascribe' } };