mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
cc fixes in licenses, collection and details
This commit is contained in:
parent
8e62206a21
commit
f64fb73aa6
@ -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({
|
||||
<EditionDetailProperty
|
||||
label={getLangText('OWNER')}
|
||||
value={ this.props.edition.owner } />
|
||||
<LicenseDetail license={this.props.edition.license_type}/>
|
||||
{this.getStatus()}
|
||||
{this.getActions()}
|
||||
<hr/>
|
||||
|
31
js/components/ascribe_detail/license_detail.js
Normal file
31
js/components/ascribe_detail/license_detail.js
Normal file
@ -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 (
|
||||
<DetailProperty
|
||||
label="LICENSE"
|
||||
value={
|
||||
<a href={this.props.license.url} target="_blank">
|
||||
{ this.props.license.code.toUpperCase() + ': ' + this.props.license.name}
|
||||
</a>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
export default LicenseDetail;
|
@ -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({
|
||||
<div className="ascribe-detail-header">
|
||||
<DetailProperty label={getLangText('REGISTREE')} value={ this.state.piece.user_registered } />
|
||||
<DetailProperty label={getLangText('ID')} value={ this.state.piece.bitcoin_id } ellipsis={true} />
|
||||
<LicenseDetail license={this.state.piece.license_type} />
|
||||
</div>
|
||||
}
|
||||
buttons={this.getActions()}>
|
||||
|
@ -46,12 +46,19 @@ let CCRegisterPiece = React.createClass({
|
||||
label={getLangText('Copyright license%s', '...')}
|
||||
onChange={this.onLicenseChange}
|
||||
footer={
|
||||
<a
|
||||
className="pull-right"
|
||||
href={this.state.licenses[this.state.selectedLicense].url}
|
||||
target="_blank">
|
||||
{getLangText('Learn more')}
|
||||
</a>
|
||||
<span className="pull-right">
|
||||
<a
|
||||
href={this.state.licenses[this.state.selectedLicense].url}
|
||||
target="_blank">
|
||||
{getLangText('Learn more about ') + this.state.licenses[this.state.selectedLicense].code}
|
||||
</a>
|
||||
(
|
||||
<a
|
||||
href='https://www.ascribe.io/faq/#legals'
|
||||
target="_blank">
|
||||
{getLangText('ascribe faq')}
|
||||
</a>)
|
||||
</span>
|
||||
}>
|
||||
<select name="license">
|
||||
{this.state.licenses.map((license, i) => {
|
||||
@ -74,7 +81,7 @@ let CCRegisterPiece = React.createClass({
|
||||
return (
|
||||
<RegisterPiece
|
||||
enableLocalHashing={false}
|
||||
headerMessage={getLangText('Submit to Creative Commons')}
|
||||
headerMessage={getLangText('Register under a Creative Commons license')}
|
||||
submitMessage={getLangText('Submit')}>
|
||||
{this.getLicenses()}
|
||||
</RegisterPiece>
|
||||
|
Loading…
Reference in New Issue
Block a user