mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
Merge pull request #25 from ascribe/AD-1309-change-share-to-email
Change Share button to Email
This commit is contained in:
commit
5316c818b4
@ -6,9 +6,9 @@ import UserActions from '../../actions/user_actions';
|
||||
import UserStore from '../../stores/user_store';
|
||||
|
||||
import ConsignButton from './acls/consign_button';
|
||||
import EmailButton from './acls/email_button';
|
||||
import LoanButton from './acls/loan_button';
|
||||
import LoanRequestButton from './acls/loan_request_button';
|
||||
import ShareButton from './acls/share_button';
|
||||
import TransferButton from './acls/transfer_button';
|
||||
import UnconsignButton from './acls/unconsign_button';
|
||||
|
||||
@ -90,7 +90,7 @@ let AclButtonList = React.createClass({
|
||||
return (
|
||||
<div className={className}>
|
||||
<span ref="buttonList" style={buttonsStyle}>
|
||||
<ShareButton
|
||||
<EmailButton
|
||||
availableAcls={availableAcls}
|
||||
pieceOrEditions={pieceOrEditions}
|
||||
currentUser={currentUser}
|
||||
|
@ -3,7 +3,7 @@
|
||||
import React from 'react';
|
||||
import classnames from 'classnames';
|
||||
|
||||
import { InformationTexts } from '../../constants/information_text';
|
||||
import { AclInformationText } from '../../constants/acl_information_text';
|
||||
import { replaceSubstringAtIndex, sanitize, intersectLists } from '../../utils/general_utils';
|
||||
import { getLangText } from '../../utils/lang_utils';
|
||||
|
||||
@ -38,7 +38,7 @@ let AclInformation = React.createClass({
|
||||
},
|
||||
|
||||
getInfoText(title, info, example){
|
||||
let aim = this.props.aim;
|
||||
const aim = this.props.aim;
|
||||
|
||||
if(aim) {
|
||||
if(aim === 'form') {
|
||||
@ -75,7 +75,7 @@ let AclInformation = React.createClass({
|
||||
},
|
||||
|
||||
produceInformationBlock() {
|
||||
const { titles, informationSentences, exampleSentences } = InformationTexts;
|
||||
const { titles, informationSentences, exampleSentences } = AclInformationText;
|
||||
const { verbs, aim } = this.props;
|
||||
|
||||
const availableInformations = intersectLists(verbs, Object.keys(titles));
|
||||
@ -95,7 +95,13 @@ let AclInformation = React.createClass({
|
||||
}
|
||||
|
||||
return verbsToDisplay.map((verb) => {
|
||||
return this.getInfoText(getLangText(titles[verb]), getLangText(informationSentences[verb]), getLangText(exampleSentences[verb]));
|
||||
const title = titles[verb];
|
||||
const informationSentence = informationSentences[verb];
|
||||
const exampleSentence = exampleSentences[verb];
|
||||
|
||||
if (title && informationSentence && exampleSentence) {
|
||||
return this.getInfoText(getLangText(title), getLangText(informationSentence), getLangText(exampleSentence));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -11,6 +11,8 @@ import ModalWrapper from '../../ascribe_modal/modal_wrapper';
|
||||
|
||||
import AppConstants from '../../../constants/application_constants';
|
||||
|
||||
import { AclInformationText } from '../../../constants/acl_information_text';
|
||||
|
||||
|
||||
export default function ({ action, displayName, title, tooltip }) {
|
||||
if (AppConstants.aclList.indexOf(action) < 0) {
|
||||
@ -34,12 +36,11 @@ export default function ({ action, displayName, title, tooltip }) {
|
||||
className: React.PropTypes.string
|
||||
},
|
||||
|
||||
// Removes the acl_ prefix and converts to upper case
|
||||
sanitizeAction() {
|
||||
if (this.props.buttonAcceptName) {
|
||||
return this.props.buttonAcceptName;
|
||||
}
|
||||
return action.split('acl_')[1].toUpperCase();
|
||||
return AclInformationText.titles[action];
|
||||
},
|
||||
|
||||
render() {
|
||||
|
@ -8,7 +8,7 @@ import { getLangText } from '../../../utils/lang_utils';
|
||||
|
||||
export default AclButton({
|
||||
action: 'acl_share',
|
||||
displayName: 'ShareButton',
|
||||
title: getLangText('Share artwork'),
|
||||
tooltip: getLangText('Share the artwork')
|
||||
displayName: 'EmailButton',
|
||||
title: getLangText('Share artwork via email'),
|
||||
tooltip: getLangText("Share the artwork to another user's collection through email")
|
||||
});
|
@ -1,10 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
export const InformationTexts = {
|
||||
export const AclInformationText = {
|
||||
'titles': {
|
||||
'acl_consign': 'CONSIGN',
|
||||
'acl_loan': 'LOAN',
|
||||
'acl_share': 'SHARE',
|
||||
'acl_loan_request': 'LOAN',
|
||||
'acl_share': 'EMAIL',
|
||||
'acl_transfer': 'TRANSFER',
|
||||
'acl_delete': 'DELETE',
|
||||
'acl_create_editions': 'CREATE EDITIONS',
|
||||
'acl_unconsign': 'UNCONSIGN',
|
||||
@ -13,7 +15,7 @@ export const InformationTexts = {
|
||||
'informationSentences': {
|
||||
'acl_consign': ' - Lets someone represent you in dealing with the work, under the terms you agree to.',
|
||||
'acl_loan': ' - Lets someone use or put the Work on display for a limited amount of time.',
|
||||
'acl_share': ' - Lets someone view the Work or Edition, but does not give rights to publish or display it.',
|
||||
'acl_share': ' - Lets someone view the Work or Edition via email, but does not give rights to publish or display it.',
|
||||
'acl_delete': ' - Removes the Work from your Wallet. Note that the previous registration and transfer ' +
|
||||
'history will still exist on the blockchain and cannot be deleted.',
|
||||
'acl_create_editions': ' Lets the artist set a fixed number of editions of a work which can then be transferred, guaranteeing each edition is authentic and from the artist.',
|
||||
@ -24,10 +26,10 @@ export const InformationTexts = {
|
||||
'acl_consign': '(e.g. an artist Consigns 10 Editions of her new Work to a gallery ' +
|
||||
'so the gallery can sell them on her behalf, under the terms the artist and the gallery have agreed to)',
|
||||
'acl_loan': '(e.g. a collector Loans a Work to a gallery for one month for display in the gallery\'s show)',
|
||||
'acl_share': '(e.g. a photographer Shares proofs of a graduation photo with the graduate\'s grandparents)',
|
||||
'acl_share': '(e.g. a photographer Shares proofs of a graduation photo with the graduate\'s grandparents by email)',
|
||||
'acl_delete': '(e.g. an artist uploaded the wrong file and doesn\'t want it cluttering his Wallet, so he Deletes it)',
|
||||
'acl_create_editions': '(e.g. A company commissions a visual artists to create three limited edition prints for a giveaway)',
|
||||
'acl_unconsign': '(e.g. An artist regains full control over their work and releases the consignee of any rights or responsibilities)',
|
||||
'acl_request_unconsign': '(e.g. An artist submits an unconsign request to a gallery after his exhibition ends, as per their agreement)'
|
||||
}
|
||||
};
|
||||
};
|
@ -17,6 +17,7 @@ const languages = {
|
||||
'%s license': '%s license',
|
||||
'Log into': 'Log into',
|
||||
'Email': 'Email',
|
||||
'EMAIL': 'EMAIL',
|
||||
'Enter your email': 'Enter your email',
|
||||
'Password': 'Password',
|
||||
'Enter your password': 'Enter your password',
|
||||
@ -245,6 +246,7 @@ const languages = {
|
||||
'%s license': '%s license',
|
||||
'Log into': 'Log into',
|
||||
'Email': 'Email',
|
||||
'EMAIL': 'EMAIL',
|
||||
'Enter your email': 'Enter your email',
|
||||
'Password': 'Password',
|
||||
'Enter your password': 'Enter your password',
|
||||
@ -473,6 +475,7 @@ const languages = {
|
||||
'%s license': '%s license',
|
||||
'Log into': 'Se connecter à',
|
||||
'Email': 'E-mail',
|
||||
'EMAIL': 'E-MAIL',
|
||||
'Enter your email': 'Entrez votre courriel',
|
||||
'Password': 'Mot de passe',
|
||||
'Enter your password': 'Entrez votre mot de passe',
|
||||
|
Loading…
Reference in New Issue
Block a user