- { isSelected && collections.length ?
+ { isSelected && collections.length ?
{__('Warning: this is just a demonstration. To see the carousel in action, either preview or publish your post.', 'tainacan')}
: null
}
- { collections.length ? (
+ { collections.length ? (
-
{ collections }
-
);
-};
\ No newline at end of file
+};
diff --git a/src/views/gutenberg-blocks/blocks/carousel-terms-list/edit.js b/src/views/gutenberg-blocks/blocks/carousel-terms-list/edit.js
index 35eaf8894..1b5be2392 100644
--- a/src/views/gutenberg-blocks/blocks/carousel-terms-list/edit.js
+++ b/src/views/gutenberg-blocks/blocks/carousel-terms-list/edit.js
@@ -14,8 +14,8 @@ import 'swiper/css/swiper.min.css';
export default function({ attributes, setAttributes, className, isSelected, clientId }){
let {
- terms,
- content,
+ terms,
+ content,
isModalOpen,
itemsRequestSource,
selectedTerms,
@@ -39,7 +39,7 @@ export default function({ attributes, setAttributes, className, isSelected, clie
// Obtains block's client id to render it on save function
setAttributes({ blockId: clientId });
-
+
// Sets some defaults that were not working
if (maxTermsPerScreen === undefined) {
maxTermsPerScreen = 6;
@@ -50,9 +50,9 @@ export default function({ attributes, setAttributes, className, isSelected, clie
function prepareItem(term, termItems) {
return (
-
+ className={ 'term-list-item ' + (!showTermThumbnail ? 'term-list-item-grid ' : '') + (maxTermsPerScreen ? ' max-terms-per-screen-' + maxTermsPerScreen : '') }>
{ tainacan_blocks.wp_version < '5.4' ?
removeItemOfId(term.id) }
@@ -64,20 +64,20 @@ export default function({ attributes, setAttributes, className, isSelected, clie
icon="no-alt"
label={__('Remove', 'tainacan')}/>
}
-
- { !showTermThumbnail ?
+ { !showTermThumbnail ?
-
-
-
@@ -112,7 +112,7 @@ export default function({ attributes, setAttributes, className, isSelected, clie
.then(response => {
if (showTermThumbnail) {
- for (let term of response.data) {
+ for (let term of response.data) {
terms.push(prepareItem(term));
}
setAttributes({
@@ -123,12 +123,12 @@ export default function({ attributes, setAttributes, className, isSelected, clie
});
} else {
let promises = [];
- for (let term of response.data) {
+ for (let term of response.data) {
promises.push(
tainacan.get('/items/?perpage=3&fetch_only=name,url,thumbnail&taxquery[0][taxonomy]=tnc_tax_' + taxonomyId + '&taxquery[0][terms][0]=' + term.id + '&taxquery[0][compare]=IN')
.then(response => { return({ term: term, termItems: response.data.items }) })
.catch((error) => console.log(error))
- );
+ );
}
axios.all(promises).then((results) => {
for (let result of results) {
@@ -140,14 +140,14 @@ export default function({ attributes, setAttributes, className, isSelected, clie
isLoading: false,
itemsRequestSource: itemsRequestSource
});
- })
+ })
}
});
}
function openCarouselModal() {
isModalOpen = true;
- setAttributes( {
+ setAttributes( {
isModalOpen: isModalOpen
} );
}
@@ -161,11 +161,11 @@ export default function({ attributes, setAttributes, className, isSelected, clie
let existingSelectedItemIndex = selectedTerms.findIndex((existingSelectedItem) => existingSelectedItem.id == itemId);
if (existingSelectedItemIndex >= 0)
selectedTerms.splice(existingSelectedItemIndex, 1);
-
- setAttributes({
+
+ setAttributes({
selectedTerms: selectedTerms,
terms: terms,
- content:
+ content:
});
}
@@ -173,7 +173,7 @@ export default function({ attributes, setAttributes, className, isSelected, clie
if(content && content.length && content[0].type)
setContent();
- return content == 'preview' ?
+ return content == 'preview' ?
{
showTermThumbnail = false;
setAttributes({ showTermThumbnail: showTermThumbnail });
- setContent();
+ setContent();
}
}
className={'term-carousel-view-mode-grid' + (showTermThumbnail ? '' : ' is-active')}>
@@ -230,13 +230,13 @@ export default function({ attributes, setAttributes, className, isSelected, clie
onClick={ () => {
showTermThumbnail = true;
setAttributes({ showTermThumbnail: showTermThumbnail });
- setContent();
+ setContent();
}
}
className={'term-carousel-view-mode-thumbnail' + (showTermThumbnail ? ' is-active' : '')}>
{ __('Thumbnail', 'tainacan') }
-
+
{
maxTermsPerScreen = aMaxTermsPerScreen;
setAttributes( { maxTermsPerScreen: aMaxTermsPerScreen } );
- setContent();
+ setContent();
}}
min={ 1 }
max={ 9 }
@@ -269,7 +269,7 @@ export default function({ attributes, setAttributes, className, isSelected, clie
hideName = isChecked;
setAttributes({ hideName: hideName });
setContent();
- }
+ }
}
/>
{
loopSlides = isChecked;
setAttributes({ loopSlides: loopSlides });
- }
+ }
}
/>
{
autoPlay = isChecked;
setAttributes({ autoPlay: autoPlay });
- }
+ }
}
/>
- {
- autoPlay ?
+ {
+ autoPlay ?
{
autoPlaySpeed = aAutoPlaySpeed;
- setAttributes( { autoPlaySpeed: aAutoPlaySpeed } )
+ setAttributes( { autoPlaySpeed: aAutoPlaySpeed } )
}}
min={ 1 }
max={ 5 }
@@ -314,10 +314,10 @@ export default function({ attributes, setAttributes, className, isSelected, clie
{ label: __('Left', 'tainacan'), value: 'left' },
{ label: __('Right', 'tainacan'), value: 'right' }
] }
- onChange={ ( aPosition ) => {
+ onChange={ ( aPosition ) => {
arrowsPosition = aPosition;
- setAttributes({ arrowsPosition: arrowsPosition });
+ setAttributes({ arrowsPosition: arrowsPosition });
}}/>
{
+ onChange={ ( aStyle ) => {
arrowsStyle = aStyle;
- setAttributes({ arrowsStyle: arrowsStyle });
+ setAttributes({ arrowsStyle: arrowsStyle });
}}/>
{
largeArrows = isChecked;
setAttributes({ largeArrows: largeArrows });
- }
+ }
}
/>
- { isSelected ?
+ { isSelected ?
(
- { isModalOpen ?
+ { isModalOpen ?
{
taxonomyId = selectedTaxonomyId;
setAttributes({ taxonomyId: taxonomyId });
}}
onApplySelection={ (aSelectionOfTerms) =>{
selectedTerms = aSelectionOfTerms;
-
+
setAttributes({
selectedTerms: selectedTerms,
isModalOpen: false
});
setContent();
}}
- onCancelSelection={ () => setAttributes({ isModalOpen: false }) }/>
+ onCancelSelection={ () => setAttributes({ isModalOpen: false }) }/>
: null
}
-
+
) : null
}
@@ -407,29 +407,29 @@ export default function({ attributes, setAttributes, className, isSelected, clie
type="button"
onClick={ () => openCarouselModal() }>
{__('Select Terms', 'tainacan')}
-
+
) : null
}
-
- { isLoading ?
+
+ { isLoading ?
:
- { isSelected && terms.length ?
+ { isSelected && terms.length ?
{__('Warning: this is just a demonstration. To see the carousel in action, either preview or publish your post.', 'tainacan')}
: null
}
- { terms.length ? (
+ { terms.length ? (
-
+ fill="none"/>
-
+ fill="none"/>
@@ -476,4 +476,4 @@ export default function({ attributes, setAttributes, className, isSelected, clie
}
);
-};
\ No newline at end of file
+};
diff --git a/src/views/gutenberg-blocks/blocks/item-submission-form/block.json b/src/views/gutenberg-blocks/blocks/item-submission-form/block.json
index f511f2d73..e19244993 100644
--- a/src/views/gutenberg-blocks/blocks/item-submission-form/block.json
+++ b/src/views/gutenberg-blocks/blocks/item-submission-form/block.json
@@ -135,7 +135,7 @@
"type": "String",
"default": "Go to the item page"
},
- "helpInfoBellowLabel": {
+ "helpInfoBelowLabel": {
"type": "Boolean",
"default": false
},
diff --git a/src/views/gutenberg-blocks/blocks/item-submission-form/deprecated.js b/src/views/gutenberg-blocks/blocks/item-submission-form/deprecated.js
index 052f1ec12..337832b35 100644
--- a/src/views/gutenberg-blocks/blocks/item-submission-form/deprecated.js
+++ b/src/views/gutenberg-blocks/blocks/item-submission-form/deprecated.js
@@ -128,7 +128,7 @@ export default [
"type": "String",
"default": "Go to the item page"
},
- "helpInfoBellowLabel": {
+ "helpInfoBelowLabel": {
"type": "Boolean",
"default": false
}
@@ -168,10 +168,10 @@ export default [
sentFormMessage,
showItemLinkButton,
itemLinkButtonLabel,
- helpInfoBellowLabel
+ helpInfoBelowLabel
} = attributes;
-
- return
-
+ help-info-bellow-label={ helpInfoBelowLabel ? helpInfoBelowLabel.toString() : 'false' } >
}
@@ -339,7 +339,7 @@ export default [
type: String,
default: __( 'Go to the item page', 'tainacan' )
},
- helpInfoBellowLabel: {
+ helpInfoBelowLabel: {
type: Boolean,
default: false
},
@@ -379,10 +379,10 @@ export default [
sentFormMessage,
showItemLinkButton,
itemLinkButtonLabel,
- helpInfoBellowLabel
+ helpInfoBelowLabel
} = attributes;
-
- return
-
+ help-info-bellow-label={ helpInfoBelowLabel ? helpInfoBelowLabel.toString() : 'false' } >
}
},
- /* Depecrated on Tainacan 0.18.3, due to the introduction of helpInfoBellowLabel */
+ /* Depecrated on Tainacan 0.18.3, due to the introduction of helpInfoBelowLabel */
{
attributes: {
collectionId: {
@@ -586,8 +586,8 @@ export default [
showItemLinkButton,
itemLinkButtonLabel
} = attributes;
-
- return
-
};
\ No newline at end of file
diff --git a/src/views/gutenberg-blocks/blocks/item-submission-form/theme.js b/src/views/gutenberg-blocks/blocks/item-submission-form/theme.js
index bc7856c7e..cf71aef17 100644
--- a/src/views/gutenberg-blocks/blocks/item-submission-form/theme.js
+++ b/src/views/gutenberg-blocks/blocks/item-submission-form/theme.js
@@ -111,7 +111,7 @@ export default (element) => {
metadataSectionLabel: '',
showItemLinkButton: false,
itemLinkButtonLabel: '',
- helpInfoBellowLabel: false,
+ helpInfoBelowLabel: false,
showItemLinkButton: false,
termsAgreementMessage: ''
},
@@ -140,7 +140,7 @@ export default (element) => {
if (this.$el.attributes['hide-metadata-types'] != undefined)
this.hideMetadataTypes = this.isParameterTrue('hide-metadata-types');
if (this.$el.attributes['help-info-bellow-label'] != undefined)
- this.helpInfoBellowLabel = this.isParameterTrue('help-info-bellow-label');
+ this.helpInfoBelowLabel = this.isParameterTrue('help-info-bellow-label');
// Form sections labels
if (this.$el.attributes['document-section-label'] != undefined)
diff --git a/src/views/gutenberg-blocks/blocks/item-submission-form/theme.vue b/src/views/gutenberg-blocks/blocks/item-submission-form/theme.vue
index 6f88e7337..dc9b99e15 100644
--- a/src/views/gutenberg-blocks/blocks/item-submission-form/theme.vue
+++ b/src/views/gutenberg-blocks/blocks/item-submission-form/theme.vue
@@ -20,7 +20,7 @@
:metadata-section-label="$root.metadataSectionLabel"
:show-item-link-button="$root.showItemLinkButton"
:item-link-button-label="$root.itemLinkButtonLabel"
- :help-info-bellow-label="$root.helpInfoBellowLabel ? $root.helpInfoBellowLabel : false"
+ :help-info-bellow-label="$root.helpInfoBelowLabel ? $root.helpInfoBelowLabel : false"
:show-terms-agreement-checkbox="$root.showTermsAgreementCheckbox ? $root.showTermsAgreementCheckbox : false"
:terms-agreement-message="$root.termsAgreementMessage"
/>
diff --git a/src/views/tainacan-i18n.php b/src/views/tainacan-i18n.php
index 484417d37..6ea946046 100644
--- a/src/views/tainacan-i18n.php
+++ b/src/views/tainacan-i18n.php
@@ -831,7 +831,7 @@ return apply_filters( 'tainacan-i18n', [
'info_no_options_available_filtering' => __( 'No options for this filtering.', 'tainacan' ),
'info_no_options_found' => __( 'No options found.', 'tainacan' ),
'info_all_files_uploaded' => __( 'All files uploaded.', 'tainacan' ),
- 'info_there_are_%s_items_being_edited' => __( 'There are %s items being edited;', 'tainacan' ),
+ 'info_there_are_%s_items_being_edited' => __( 'There are %s items being edited.', 'tainacan' ),
'info_there_is_one_item_being_edited' => __( 'There is one item being edited.', 'tainacan' ),
'info_no_preview_found' => __( 'No preview was found.', 'tainacan' ),
'info_leaving_bulk_edit' => __( 'You are leaving the bulk edit now.', 'tainacan' ),
@@ -880,7 +880,7 @@ return apply_filters( 'tainacan-i18n', [
'info_slides_hide_controls' => __( 'to hide the controls and focus on the document', 'tainacan' ),
'info_slides_start_transition' => __( 'to start or pause automatic transition every 3s', 'tainacan' ),
'info_slides_exit' => __( 'to leave the fullscreen slides view mode', 'tainacan' ),
- 'info_slides_help_end' => __( 'At any moment, you can also check the item metadata list by clicking on the metadata icon (%1$s) or go directly to the item page, where you will have all its details, by clicking on the eye icon (%2$s).', 'tainacan' ),
+ 'info_slides_help_end' => __( 'At any moment, you can also check the item metadata list by clicking on the metadata icon (%1$s) or go directly to the item page, where you will have all its details, by clicking on the eye icon (%2$s).', 'tainacan' ),
'info_thumbnail_custom' => __( 'Upload the desired image for the thumbnail', 'tainacan'),
'info_thumbnail_default_from_document' => __( 'A thumbnail will be automatically generated from the submitted document file', 'tainacan'),
'info_submission_processing' => __( 'Please wait while the submission is being processed', 'tainacan'),