From f64fb73aa6fd1487cce35e52743e93c5d7c428e5 Mon Sep 17 00:00:00 2001 From: diminator Date: Tue, 29 Sep 2015 15:58:24 +0200 Subject: [PATCH] cc fixes in licenses, collection and details --- js/components/ascribe_detail/edition.js | 3 +- .../ascribe_detail/license_detail.js | 31 +++++++++++++++++++ .../ascribe_detail/piece_container.js | 2 ++ .../wallet/components/cc/cc_register_piece.js | 21 ++++++++----- 4 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 js/components/ascribe_detail/license_detail.js diff --git a/js/components/ascribe_detail/edition.js b/js/components/ascribe_detail/edition.js index 115805ec..51884751 100644 --- a/js/components/ascribe_detail/edition.js +++ b/js/components/ascribe_detail/edition.js @@ -25,7 +25,7 @@ import CollapsibleParagraph from './../ascribe_collapsible/collapsible_paragraph import Form from './../ascribe_forms/form'; import Property from './../ascribe_forms/property'; import EditionDetailProperty from './detail_property'; - +import LicenseDetail from './license_detail'; import EditionFurtherDetails from './further_details'; import ListRequestActions from './../ascribe_forms/list_form_request_actions'; @@ -317,6 +317,7 @@ let EditionSummary = React.createClass({ + {this.getStatus()} {this.getActions()}
diff --git a/js/components/ascribe_detail/license_detail.js b/js/components/ascribe_detail/license_detail.js new file mode 100644 index 00000000..c3cc9f62 --- /dev/null +++ b/js/components/ascribe_detail/license_detail.js @@ -0,0 +1,31 @@ +'use strict'; + +import React from 'react'; + +import DetailProperty from './detail_property'; + +/** + * This is the component that implements display-specific functionality + */ +let LicenseDetail = React.createClass({ + propTypes: { + license: React.PropTypes.object + }, + render () { + if (this.props.license.code === 'default') { + return null; + } + return ( + + { this.props.license.code.toUpperCase() + ': ' + this.props.license.name} + + } + /> + ); + } +}); + +export default LicenseDetail; diff --git a/js/components/ascribe_detail/piece_container.js b/js/components/ascribe_detail/piece_container.js index f14cf743..c2eb1759 100644 --- a/js/components/ascribe_detail/piece_container.js +++ b/js/components/ascribe_detail/piece_container.js @@ -19,6 +19,7 @@ import CollapsibleParagraph from './../ascribe_collapsible/collapsible_paragraph import FurtherDetails from './further_details'; import DetailProperty from './detail_property'; +import LicenseDetail from './license_detail'; import HistoryIterator from './history_iterator'; import AclButtonList from './../ascribe_buttons/acl_button_list'; @@ -224,6 +225,7 @@ let PieceContainer = React.createClass({
+
} buttons={this.getActions()}> diff --git a/js/components/whitelabel/wallet/components/cc/cc_register_piece.js b/js/components/whitelabel/wallet/components/cc/cc_register_piece.js index 129c1b0a..c9690477 100644 --- a/js/components/whitelabel/wallet/components/cc/cc_register_piece.js +++ b/js/components/whitelabel/wallet/components/cc/cc_register_piece.js @@ -46,12 +46,19 @@ let CCRegisterPiece = React.createClass({ label={getLangText('Copyright license%s', '...')} onChange={this.onLicenseChange} footer={ - - {getLangText('Learn more')} - + + + {getLangText('Learn more about ') + this.state.licenses[this.state.selectedLicense].code} + +  ( + + {getLangText('ascribe faq')} + ) + }>