From 5f7b7db00fc7768fce1642e6761b5dca95f4b4d7 Mon Sep 17 00:00:00 2001 From: diminator Date: Wed, 15 Jul 2015 15:54:37 +0200 Subject: [PATCH] Merge remote-tracking branch 'remotes/origin/master' into AD-419-decouple-piece-registration-from- Conflicts: bitcoin/models.py web/settings_env/live.py --- .../accordion_list_item.js | 43 +++++++++++-------- js/utils/lang_utils.js | 13 +++--- 2 files changed, 32 insertions(+), 24 deletions(-) diff --git a/js/components/ascribe_accordion_list/accordion_list_item.js b/js/components/ascribe_accordion_list/accordion_list_item.js index f2b006a9..8a77c7bd 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item.js +++ b/js/components/ascribe_accordion_list/accordion_list_item.js @@ -63,11 +63,11 @@ let AccordionListItem = React.createClass({ }, getGlyphicon(){ - if (this.props.content.requestAction){ + if (this.props.content.requestAction) { return ( {getLangText('You have actions pending in one of your editions')}}> - + overlay={{getLangText('You have actions pending in one of your editions')}}> + ); } return null; @@ -87,7 +87,7 @@ let AccordionListItem = React.createClass({ handleSubmitPrizeSuccess(response) { PieceListActions.fetchPieceList(this.state.page, this.state.pageSize, this.state.search, this.state.orderBy, this.state.orderAsc); - + let notification = new GlobalNotificationModel(response.notification, 'success', 10000); GlobalNotificationActions.appendGlobalNotification(notification); }, @@ -106,12 +106,13 @@ let AccordionListItem = React.createClass({ }, getCreateEditionsDialog() { - if(this.props.content.num_editions < 1 && this.state.showCreateEditionsDialog) { + if (this.props.content.num_editions < 1 && this.state.showCreateEditionsDialog) { return ( -
+
+ handleSuccess={this.handleEditionCreationSuccess}/>
); } @@ -119,11 +120,14 @@ let AccordionListItem = React.createClass({ getLicences() { // convert this to acl_view_licences later - if(this.state.whitelabel.name === 'Creative Commons France') { + if (this.state.whitelabel.name === 'Creative Commons France') { return ( - - {getLangText('%s license', this.props.content.license_type.code)} - + + , + + {getLangText('%s license', this.props.content.license_type.code)} + + ); } }, @@ -131,7 +135,7 @@ let AccordionListItem = React.createClass({ render() { let linkData; - if(this.props.content.num_editions < 1 || !this.props.content.first_edition) { + if (this.props.content.num_editions < 1 || !this.props.content.first_edition) { linkData = { to: 'piece', params: { @@ -154,18 +158,21 @@ let AccordionListItem = React.createClass({
- +
-
+

{this.props.content.title}

+

{getLangText('by %s', this.props.content.artist_name)}

+
{this.props.content.date_created.split('-')[0]} - + @@ -187,19 +194,21 @@ let AccordionListItem = React.createClass({ {this.getLicences()}
+
{this.getGlyphicon()}
- + {this.getCreateEditionsDialog()} {/* this.props.children is AccordionListItemTableEditions */} diff --git a/js/utils/lang_utils.js b/js/utils/lang_utils.js index bec4c66d..39454806 100644 --- a/js/utils/lang_utils.js +++ b/js/utils/lang_utils.js @@ -28,12 +28,11 @@ export function getLangText(s, ...args) { return formatText(languages['en-US'][s], args); } } catch(err) { - if(!(s in languages[lang])) { - console.warn('Language-string is not in constants file. Add: "' + s + '" to the "' + lang + '" language file. Defaulting to keyname'); - return s; - } else { - console.error(err); - } - + //if(!(s in languages[lang])) { + console.warn('Language-string is not in constants file. Add: "' + s + '" to the "' + lang + '" language file. Defaulting to keyname'); + return s; + //} else { + // console.error(err); + //} } }