);
- }
- }
- else {
- console.log('Aim is required when you want to place information text');
- }
- },
- produceInformationBlock() {
- let enabledIndices = this.props.verbs;
- let titleList = informationTexts.title;
- let infoSentenceList = informationTexts.informationSentence;
- let exampleSentenceList = informationTexts.exampleSentence;
- let sortedIndices = ['share', 'transfer', 'consign', 'loan', 'delete'];
- let tempIndices = [];
- for (let i = 0; i < sortedIndices.length; i++){
- if (enabledIndices.indexOf(sortedIndices[i]) === -1){
- continue;
- }
- else{
- tempIndices.push(sortedIndices[i]);
- }
- }
- enabledIndices = tempIndices;
- if(Array.isArray(enabledIndices)) {
- return enabledIndices.map((i)=> {
- return (this.getInfoText(getLangText(titleList[i]), getLangText(infoSentenceList[i]),
- getLangText(exampleSentenceList[i])));
- });
- }
- else if (typeof enabledIndices === 'string'){
- return (this.getInfoText(getLangText(titleList[enabledIndices]), getLangText(infoSentenceList[enabledIndices])));
- }
- else if (typeof enabledIndices === 'undefined'){
- console.log('Verbs come undefined maybe you wrote verb instead of verbs?');
- }
- else {
- console.log('You need to supply an array of strings or string as verbs to AclInformation');
- }
- },
- render() {
- console.log('Creation of information block');
- return ({this.produceInformationBlock()});
- }
-});
-
-export default AclInformation;
diff --git a/js/constants/information_text.js b/js/constants/information_text.js
index 91c61183..ec87ef73 100644
--- a/js/constants/information_text.js
+++ b/js/constants/information_text.js
@@ -1,42 +1,37 @@
'use strict';
-const informationTexts = {
-
- 'title': {
- 'transfer': 'TRANSFER',
- 'consign': 'CONSIGN',
- 'loan': 'LOAN',
- 'share': 'SHARE',
- 'delete': 'DELETE'},
-
- 'informationSentence': {
-
- 'transfer': ' - Changes ownership of an Edition. As with a physical piece of work, ' +
- 'transferring ownership of an Edition does not transfer copyright in the Work.',
-
- 'consign': ' - Lets someone represent you in dealing with the work, under the terms you agree to.',
-
- 'loan': ' - Lets someone use or put the Work on display for a limited amount of time.',
-
- 'share': ' - Lets someone view the Work or Edition, but does not give rights to publish or display it.',
-
- '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.'
- }
-
- ,
- 'exampleSentence': {
- 'transfer': '(e.g. a musician Transfers limited edition 1 of 10 of her new album to a very happy fan)',
-
- 'consign': '(e.g. an artist Consigns 10 Editions of her new Work to a gallery ' +
+export const InformationTexts = {
+ 'titles': {
+ 'acl_transfer': 'TRANSFER',
+ 'acl_consign': 'CONSIGN',
+ 'acl_loan': 'LOAN',
+ 'acl_share': 'SHARE',
+ 'acl_delete': 'DELETE',
+ 'acl_create_editions': 'CREATE EDITIONS',
+ 'acl_unconsign': 'UNCONSIGN',
+ 'acl_request_unconsign': 'REQUEST UNCONSIGN'
+ },
+ 'informationSentences': {
+ 'acl_transfer': ' - Changes ownership of an Edition. As with a physical piece of work, ' +
+ 'transferring ownership of an Edition does not transfer copyright in the Work.',
+ '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_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': '',
+ 'acl_unconsign': '',
+ 'acl_request_unconsign': ''
+ },
+ 'exampleSentences': {
+ 'acl_transfer': '(e.g. a musician Transfers limited edition 1 of 10 of her new album to a very happy fan)',
+ '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)',
-
- 'loan': '(e.g. a collector Loans a Work to a gallery for one month for display in the gallery\'s show)',
-
- 'share': '(e.g. a photographer Shares proofs of a graduation photo with the graduate\'s grandparents)',
-
- 'delete': '(e.g. an artist uploaded the wrong file and doesn\'t want it cluttering his Wallet, so he Deletes it)'
+ '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_delete': '(e.g. an artist uploaded the wrong file and doesn\'t want it cluttering his Wallet, so he Deletes it)',
+ 'acl_create_editions': '',
+ 'acl_unconsign': '',
+ 'acl_request_unconsign': ''
}
- };
-
-export default informationTexts;
\ No newline at end of file
+};
\ No newline at end of file
diff --git a/js/utils/acl_utils.js b/js/utils/acl_utils.js
index f0075f55..a3998576 100644
--- a/js/utils/acl_utils.js
+++ b/js/utils/acl_utils.js
@@ -2,7 +2,7 @@
import { sanitize } from './general_utils';
-function intersectAcls(a, b) {
+export function intersectAcls(a, b) {
return a.filter((val) => b.indexOf(val) > -1);
}
diff --git a/package.json b/package.json
index 0e41d714..99b7eef1 100644
--- a/package.json
+++ b/package.json
@@ -73,7 +73,7 @@
"q": "^1.4.1",
"raven-js": "^1.1.19",
"react": "^0.13.2",
- "react-bootstrap": "^0.25.1",
+ "react-bootstrap": "0.25.1",
"react-datepicker": "^0.12.0",
"react-router": "^0.13.3",
"react-router-bootstrap": "~0.16.0",