mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 09:35:10 +01:00
add licences for cc
This commit is contained in:
parent
ea871f3d1d
commit
e3e8f088c7
@ -13,6 +13,9 @@ import CreateEditionsForm from '../ascribe_forms/create_editions_form';
|
||||
import PieceListActions from '../../actions/piece_list_actions';
|
||||
import PieceListStore from '../../stores/piece_list_store';
|
||||
|
||||
import WhitelabelStore from '../../stores/whitelabel_store';
|
||||
import WhitelabelActions from '../../actions/whitelabel_actions';
|
||||
|
||||
import EditionListActions from '../../actions/edition_list_actions';
|
||||
|
||||
import GlobalNotificationModel from '../../models/global_notification_model';
|
||||
@ -40,16 +43,19 @@ let AccordionListItem = React.createClass({
|
||||
{
|
||||
showCreateEditionsDialog: false
|
||||
},
|
||||
PieceListStore.getState()
|
||||
PieceListStore.getState(),
|
||||
WhitelabelStore.getState()
|
||||
);
|
||||
},
|
||||
|
||||
componentDidMount() {
|
||||
PieceListStore.listen(this.onChange);
|
||||
WhitelabelStore.listen(this.onChange);
|
||||
},
|
||||
|
||||
componentWillUnmount() {
|
||||
PieceListStore.unlisten(this.onChange);
|
||||
WhitelabelStore.unlisten(this.onChange);
|
||||
},
|
||||
|
||||
onChange(state) {
|
||||
@ -111,6 +117,17 @@ let AccordionListItem = React.createClass({
|
||||
}
|
||||
},
|
||||
|
||||
getLicences() {
|
||||
// convert this to acl_view_licences later
|
||||
if(this.state.whitelabel.name === 'Creative Commons France') {
|
||||
return (
|
||||
<a href={this.props.content.license_type.url} target="_blank" className="pull-right">
|
||||
{getLangText('%s license', this.props.content.license_type.code)}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
render() {
|
||||
let linkData;
|
||||
|
||||
@ -173,6 +190,7 @@ let AccordionListItem = React.createClass({
|
||||
{getLangText('Submitted to prize')} <span className="glyphicon glyphicon-ok" aria-hidden="true"></span>
|
||||
</button>
|
||||
</AclProxy>
|
||||
{this.getLicences()}
|
||||
</div>
|
||||
</div>
|
||||
<span style={{'clear': 'both'}}></span>
|
||||
|
@ -58,12 +58,9 @@ let SignupForm = React.createClass({
|
||||
},
|
||||
|
||||
handleSuccess(response){
|
||||
|
||||
let notificationText = getLangText('Sign up successful');
|
||||
let notification = new GlobalNotificationModel(notificationText, 'success', 50000);
|
||||
let notification = new GlobalNotificationModel(getLangText('Sign up successful'), 'success', 50000);
|
||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||
this.props.handleSuccess(getLangText('We sent an email to your address') + ' ' + response.user.email +
|
||||
', ' + getLangText('please confirm') + '.');
|
||||
this.props.handleSuccess(getLangText('We sent an email to your address') + ' ' + response.user.email + ', ' + getLangText('please confirm') + '.');
|
||||
|
||||
},
|
||||
getFormData(){
|
||||
|
@ -2,9 +2,6 @@
|
||||
|
||||
import React from 'react';
|
||||
import SignupForm from './ascribe_forms/form_signup';
|
||||
import Property from './ascribe_forms/property';
|
||||
|
||||
import { getLangText } from '../utils/lang_utils';
|
||||
|
||||
|
||||
let SignupContainer = React.createClass({
|
||||
|
@ -28,7 +28,7 @@ let SignupContainer = React.createClass({
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
} else {
|
||||
return (
|
||||
<div className="ascribe-login-wrapper">
|
||||
<SignupForm
|
||||
@ -38,6 +38,7 @@ let SignupContainer = React.createClass({
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user