Merge branch 'develop' into feature/783
This commit is contained in:
commit
6edd8df2e1
|
@ -1294,6 +1294,22 @@
|
||||||
"regenerator-runtime": "^0.13.11"
|
"regenerator-runtime": "^0.13.11"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@babel/runtime-corejs3": {
|
||||||
|
"version": "7.23.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.23.2.tgz",
|
||||||
|
"integrity": "sha512-54cIh74Z1rp4oIjsHjqN+WM4fMyCBYe+LpZ9jWm51CZ1fbH3SkAzQD/3XLoNkjbJ7YEmjobLXyvQrFypRHOrXw==",
|
||||||
|
"requires": {
|
||||||
|
"core-js-pure": "^3.30.2",
|
||||||
|
"regenerator-runtime": "^0.14.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"regenerator-runtime": {
|
||||||
|
"version": "0.14.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",
|
||||||
|
"integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@babel/template": {
|
"@babel/template": {
|
||||||
"version": "7.21.9",
|
"version": "7.21.9",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.21.9.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.21.9.tgz",
|
||||||
|
@ -3001,6 +3017,11 @@
|
||||||
"browserslist": "^4.21.5"
|
"browserslist": "^4.21.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"core-js-pure": {
|
||||||
|
"version": "3.33.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.33.1.tgz",
|
||||||
|
"integrity": "sha512-wCXGbLjnsP10PlK/thHSQlOLlLKNEkaWbTzVvHHZ79fZNeN1gUmw2gBlpItxPv/pvqldevEXFh/d5stdNvl6EQ=="
|
||||||
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||||
|
@ -4406,6 +4427,14 @@
|
||||||
"integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
|
"integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"imask": {
|
||||||
|
"version": "7.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/imask/-/imask-7.1.3.tgz",
|
||||||
|
"integrity": "sha512-jZCqTI5Jgukhl2ff+znBQd8BiHOTlnFYCIgggzHYDdoJsHmSSWr1BaejcYBxsjy4ZIs8Rm0HhbOxQcobcdESRQ==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime-corejs3": "^7.22.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"import-fresh": {
|
"import-fresh": {
|
||||||
"version": "3.3.0",
|
"version": "3.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
|
||||||
|
@ -6982,6 +7011,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/vue-countup-v2/-/vue-countup-v2-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/vue-countup-v2/-/vue-countup-v2-4.0.0.tgz",
|
||||||
"integrity": "sha512-XjKeHo1ndRlJtXvHd6B1eWOpbrJDdNU3rdYZwVPv2YlUXbvthsBT4kms5Fc/mn9RdXPrMX2H/ktAAQtKjWFisw=="
|
"integrity": "sha512-XjKeHo1ndRlJtXvHd6B1eWOpbrJDdNU3rdYZwVPv2YlUXbvthsBT4kms5Fc/mn9RdXPrMX2H/ktAAQtKjWFisw=="
|
||||||
},
|
},
|
||||||
|
"vue-demi": {
|
||||||
|
"version": "0.14.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz",
|
||||||
|
"integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w=="
|
||||||
|
},
|
||||||
"vue-eslint-parser": {
|
"vue-eslint-parser": {
|
||||||
"version": "9.3.0",
|
"version": "9.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.3.0.tgz",
|
||||||
|
@ -7003,6 +7037,15 @@
|
||||||
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
|
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"vue-imask": {
|
||||||
|
"version": "7.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue-imask/-/vue-imask-7.1.3.tgz",
|
||||||
|
"integrity": "sha512-WkkEwx34UjNJhN5vwgfLNgydLoqyFxBGJibT2322Extl68kW6YHQrFIusLeEZ4EVGzmv2zWhuxXxke55I2x4Dw==",
|
||||||
|
"requires": {
|
||||||
|
"imask": "^7.1.3",
|
||||||
|
"vue-demi": "^0.14.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
"vue-loader": {
|
"vue-loader": {
|
||||||
"version": "15.10.1",
|
"version": "15.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.10.1.tgz",
|
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.10.1.tgz",
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
"vue-apexcharts": "^1.6.2",
|
"vue-apexcharts": "^1.6.2",
|
||||||
"vue-blurhash": "^0.1.4",
|
"vue-blurhash": "^0.1.4",
|
||||||
"vue-countup-v2": "^4.0.0",
|
"vue-countup-v2": "^4.0.0",
|
||||||
|
"vue-imask": "^7.1.3",
|
||||||
"vue-router": "^3.6.5",
|
"vue-router": "^3.6.5",
|
||||||
"vue-the-mask": "^0.11.1",
|
"vue-the-mask": "^0.11.1",
|
||||||
"vue2-leaflet": "^2.7.1",
|
"vue2-leaflet": "^2.7.1",
|
||||||
|
|
|
@ -798,6 +798,10 @@
|
||||||
max-width: calc((90vh * 9) / 16); }
|
max-width: calc((90vh * 9) / 16); }
|
||||||
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-1-2 {
|
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-1-2 {
|
||||||
max-width: calc((90vh * 1) / 2); }
|
max-width: calc((90vh * 1) / 2); }
|
||||||
|
.tainacan-photoswipe-layer .pswp__container .pswp__content {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-content: center; }
|
||||||
.tainacan-photoswipe-layer .pswp__container .pswp__content > .tainacan-content-embed:not(.attachment-without-image) {
|
.tainacan-photoswipe-layer .pswp__container .pswp__content > .tainacan-content-embed:not(.attachment-without-image) {
|
||||||
margin-top: 60px; }
|
margin-top: 60px; }
|
||||||
.tainacan-photoswipe-layer .pswp__container a:first-of-type,
|
.tainacan-photoswipe-layer .pswp__container a:first-of-type,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -56,7 +56,7 @@ class REST_Sequence_Edit_Controller extends REST_Controller {
|
||||||
'methods' => \WP_REST_Server::READABLE,
|
'methods' => \WP_REST_Server::READABLE,
|
||||||
'callback' => array($this, 'get_item_in_sequence'),
|
'callback' => array($this, 'get_item_in_sequence'),
|
||||||
'permission_callback' => array($this, 'sequence_edit_permissions_check'),
|
'permission_callback' => array($this, 'sequence_edit_permissions_check'),
|
||||||
'args' => $this->get_sequence_params()
|
'args' => $this->get_sequence_index_params()
|
||||||
),
|
),
|
||||||
'schema' => [$this, 'get_sequence_index_schema']
|
'schema' => [$this, 'get_sequence_index_schema']
|
||||||
)
|
)
|
||||||
|
@ -212,12 +212,36 @@ class REST_Sequence_Edit_Controller extends REST_Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $method
|
* @param string $method
|
||||||
*
|
*
|
||||||
* @return array|mixed
|
* @return array|mixed
|
||||||
*/
|
*/
|
||||||
public function get_sequence_params() {
|
public function get_sequence_params() {
|
||||||
|
$endpoint_args = [
|
||||||
|
'collection_id' => [
|
||||||
|
'type' => 'string',
|
||||||
|
'description' => __( 'Collection ID', 'tainacan' ),
|
||||||
|
'required' => true,
|
||||||
|
],
|
||||||
|
'group_id' => [
|
||||||
|
'type' => 'string',
|
||||||
|
'description' => __( 'Group ID', 'tainacan' ),
|
||||||
|
'required' => true,
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
return $endpoint_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $method
|
||||||
|
*
|
||||||
|
* @return array|mixed
|
||||||
|
*/
|
||||||
|
public function get_sequence_index_params() {
|
||||||
$endpoint_args = [
|
$endpoint_args = [
|
||||||
'collection_id' => [
|
'collection_id' => [
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
|
|
|
@ -285,13 +285,13 @@ class CSV extends Exporter {
|
||||||
$current_user = wp_get_current_user();
|
$current_user = wp_get_current_user();
|
||||||
$author_name = $current_user->user_login;
|
$author_name = $current_user->user_login;
|
||||||
|
|
||||||
$message = __('target collections:', 'tainacan');
|
$message = __('Target collections:', 'tainacan');
|
||||||
$message .= " <b>" . implode(", ", $this->get_collections_names() ) . "</b><br/>";
|
$message .= " <b>" . implode(", ", $this->get_collections_names() ) . "</b><br/>";
|
||||||
$message .= __('Exported by:', 'tainacan');
|
$message .= __('Exported by:', 'tainacan');
|
||||||
$message .= " <b> $author_name </b><br/>";
|
$message .= " <b> $author_name </b><br/>";
|
||||||
$message .= __('Your CSV file is ready! Access it in the link below:', 'tainacan');
|
$message .= __('Your CSV file is ready! Access it in the link below:', 'tainacan');
|
||||||
$message .= '<br/><br/>';
|
$message .= '<br/><br/>';
|
||||||
$message .= '<a href="' . $file['url'] . '">Download</a>';
|
$message .= '<a target="_blank" href="' . $file['url'] . '">Download</a>';
|
||||||
|
|
||||||
return $message;
|
return $message;
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,7 @@
|
||||||
--tainacan-sidebar-width: 3.0em;
|
--tainacan-sidebar-width: 3.0em;
|
||||||
}
|
}
|
||||||
#primary-menu:not(.is-compressed)~.is-main-content {
|
#primary-menu:not(.is-compressed)~.is-main-content {
|
||||||
--tainacan-sidebar-width: 10em;
|
--tainacan-sidebar-width: 11em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-secondary-content {
|
.is-secondary-content {
|
||||||
|
|
|
@ -362,7 +362,7 @@
|
||||||
<b-field
|
<b-field
|
||||||
:addons="false"
|
:addons="false"
|
||||||
:label="$i18n.get('label_metadata_related_features')">
|
:label="$i18n.get('label_metadata_related_features')">
|
||||||
<div class="status-radios">
|
<div class="options-checkboxes">
|
||||||
<b-checkbox
|
<b-checkbox
|
||||||
v-model="form.item_enable_metadata_collapses"
|
v-model="form.item_enable_metadata_collapses"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
|
@ -477,7 +477,7 @@
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('collections', 'submission_default_status')"
|
:title="$i18n.getHelperTitle('collections', 'submission_default_status')"
|
||||||
:message="$i18n.getHelperMessage('collections', 'submission_default_status')"/>
|
:message="$i18n.getHelperMessage('collections', 'submission_default_status')"/>
|
||||||
<div class="status-radios">
|
<div class="options-checkboxes">
|
||||||
<b-radio
|
<b-radio
|
||||||
v-model="form.submission_default_status"
|
v-model="form.submission_default_status"
|
||||||
v-for="(statusOption, index) of $statusHelper.getStatuses().filter((status) => status.slug != 'trash')"
|
v-for="(statusOption, index) of $statusHelper.getStatuses().filter((status) => status.slug != 'trash')"
|
||||||
|
@ -1771,7 +1771,20 @@ export default {
|
||||||
.status-radios {
|
.status-radios {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 5px 0;
|
margin: 5px 0;
|
||||||
.control-lable {
|
|
||||||
|
.control-label {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.options-checkboxes {
|
||||||
|
display: flex;
|
||||||
|
margin: 5px 0;
|
||||||
|
justify-content: space-between;
|
||||||
|
/deep/ .b-checkbox.checkbox {
|
||||||
|
width: auto
|
||||||
|
}
|
||||||
|
.control-label {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1344,7 +1344,7 @@ export default {
|
||||||
if (currentItemMetadatum) {
|
if (currentItemMetadatum) {
|
||||||
const itemMetadatumValues = Array.isArray(currentItemMetadatum.value) ? currentItemMetadatum.value : [ currentItemMetadatum.value ];
|
const itemMetadatumValues = Array.isArray(currentItemMetadatum.value) ? currentItemMetadatum.value : [ currentItemMetadatum.value ];
|
||||||
const conditionalValues = Array.isArray(eventBusItemMetadata.conditionalSections[conditionalSectionId].metadatumValues) ? eventBusItemMetadata.conditionalSections[conditionalSectionId].metadatumValues : [eventBusItemMetadata.conditionalSections[conditionalSectionId].metadatumValues];
|
const conditionalValues = Array.isArray(eventBusItemMetadata.conditionalSections[conditionalSectionId].metadatumValues) ? eventBusItemMetadata.conditionalSections[conditionalSectionId].metadatumValues : [eventBusItemMetadata.conditionalSections[conditionalSectionId].metadatumValues];
|
||||||
eventBusItemMetadata.conditionalSections[conditionalSectionId].hide = itemMetadatumValues.every(aValue => conditionalValues.indexOf(aValue) < 0);
|
eventBusItemMetadata.conditionalSections[conditionalSectionId].hide = Array.isArray(itemMetadatumValues) ? itemMetadatumValues.every(aValue => conditionalValues.indexOf(aValue) < 0) : conditionalValues.indexOf(itemMetadatumValues) < 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -179,8 +179,9 @@
|
||||||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
||||||
</label>
|
</label>
|
||||||
<b-select
|
<b-select
|
||||||
v-model="selectedConditionalMetadatum"
|
v-model="selectedConditionalMetadatumId"
|
||||||
:placeholder="$i18n.get('label_select_metadatum')">
|
:placeholder="$i18n.get('label_select_metadatum')"
|
||||||
|
@input="reloadConditionalValueComponent()">
|
||||||
<option
|
<option
|
||||||
v-for="conditionalMetadatum of availableConditionalMetadata"
|
v-for="conditionalMetadatum of availableConditionalMetadata"
|
||||||
:key="conditionalMetadatum.id"
|
:key="conditionalMetadatum.id"
|
||||||
|
@ -192,22 +193,23 @@
|
||||||
</transition>
|
</transition>
|
||||||
<transition name="filter-item">
|
<transition name="filter-item">
|
||||||
<b-field
|
<b-field
|
||||||
v-if="isConditionalSection && selectedConditionalMetadatum"
|
v-if="isConditionalSection && selectedConditionalMetadatumId && selectedConditionalMetadatum && selectedConditionalMetadatum.name"
|
||||||
:addons="false"
|
:addons="false"
|
||||||
:type="formErrors['conditional_section_rules'] != undefined ? 'is-danger' : ''"
|
:type="formErrors['conditional_section_rules'] != undefined ? 'is-danger' : ''"
|
||||||
:message="formErrors['conditional_section_rules'] != undefined ? formErrors['conditional_section_rules'] : ''">
|
:message="formErrors['conditional_section_rules'] != undefined ? formErrors['conditional_section_rules'] : ''">
|
||||||
<label class="label is-inline">
|
<label class="label is-inline">
|
||||||
{{ availableConditionalMetadata.find((availableMetadatum) => availableMetadatum.id == selectedConditionalMetadatum).name }}
|
{{ selectedConditionalMetadatum.name }}
|
||||||
</label>
|
</label>
|
||||||
<div style="overflow-y: auto; overflow-x: hidden; max-height: 100px;">
|
<component
|
||||||
<b-checkbox
|
v-if="shouldUpdateConditionalValue"
|
||||||
v-model="selectedConditionalValue"
|
:is="selectedConditionalMetadatum.metadata_type_object.component"
|
||||||
v-for="(conditionalValue, conditionalValueIndex) of availableConditionalMetadata.find((availableMetadatum) => availableMetadatum.id == selectedConditionalMetadatum).metadata_type_object.options.options.split('\n')"
|
:forced-component-type="selectedConditionalMetadatum.metadata_type_object.component.includes('taxonomy') ? 'tainacan-taxonomy-tag-input' : ''"
|
||||||
:key="conditionalValueIndex"
|
:item-metadatum="{ metadatum: selectedConditionalMetadatum }"
|
||||||
:native-value="conditionalValue">
|
:value="selectedConditionalValue"
|
||||||
{{ conditionalValue }}
|
:allow-new="false"
|
||||||
</b-checkbox>
|
:maxtags="1"
|
||||||
</div>
|
@input="selectConditionalValue"
|
||||||
|
/>
|
||||||
</b-field>
|
</b-field>
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
|
@ -266,9 +268,10 @@
|
||||||
closedByForm: false,
|
closedByForm: false,
|
||||||
entityName: 'metadataSection',
|
entityName: 'metadataSection',
|
||||||
isUpdating: false,
|
isUpdating: false,
|
||||||
selectedConditionalMetadatum: undefined,
|
selectedConditionalMetadatumId: undefined,
|
||||||
selectedConditionalValue: [],
|
selectedConditionalValue: [],
|
||||||
hideConditionalSectionSettings: false
|
hideConditionalSectionSettings: false,
|
||||||
|
shouldUpdateConditionalValue: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -276,18 +279,21 @@
|
||||||
'getMetadataSections'
|
'getMetadataSections'
|
||||||
]),
|
]),
|
||||||
availableConditionalMetadata() {
|
availableConditionalMetadata() {
|
||||||
if (this.getMetadataSections.length) {
|
if ( this.getMetadataSections.length ) {
|
||||||
const otherMetadataSections = this.getMetadataSections.filter(aMetadataSection => aMetadataSection.id != this.form.id);
|
const otherMetadataSections = this.getMetadataSections.filter(aMetadataSection => aMetadataSection.id != this.form.id);
|
||||||
const availableMetadata = [];
|
const availableMetadata = [];
|
||||||
for (let aMetadataSection of otherMetadataSections)
|
for (let aMetadataSection of otherMetadataSections)
|
||||||
availableMetadata.push.apply(availableMetadata, aMetadataSection.metadata_object_list);
|
availableMetadata.push.apply(availableMetadata, aMetadataSection.metadata_object_list);
|
||||||
return availableMetadata.filter(aMetadatum => aMetadatum.metadata_type === 'Tainacan\\Metadata_Types\\Selectbox');
|
return availableMetadata.filter(aMetadatum => aMetadatum.metadata_type === 'Tainacan\\Metadata_Types\\Selectbox' || aMetadatum.metadata_type === 'Tainacan\\Metadata_Types\\Taxonomy');
|
||||||
}
|
}
|
||||||
return {};
|
return [];
|
||||||
},
|
},
|
||||||
isConditionalSection() {
|
isConditionalSection() {
|
||||||
return this.form.is_conditional_section == 'yes';
|
return this.form.is_conditional_section == 'yes';
|
||||||
}
|
},
|
||||||
|
selectedConditionalMetadatum() {
|
||||||
|
return this.availableConditionalMetadata.find(aMetadatum => aMetadatum.id == this.selectedConditionalMetadatumId)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.form = JSON.parse(JSON.stringify(this.originalMetadataSection));
|
this.form = JSON.parse(JSON.stringify(this.originalMetadataSection));
|
||||||
|
@ -297,7 +303,7 @@
|
||||||
|
|
||||||
if ( this.form.is_conditional_section == 'yes' && Object.keys(this.form.conditional_section_rules).length ) {
|
if ( this.form.is_conditional_section == 'yes' && Object.keys(this.form.conditional_section_rules).length ) {
|
||||||
const conditionalMetadatum = Object.keys(this.form.conditional_section_rules)[0];
|
const conditionalMetadatum = Object.keys(this.form.conditional_section_rules)[0];
|
||||||
this.selectedConditionalMetadatum = conditionalMetadatum;
|
this.selectedConditionalMetadatumId = conditionalMetadatum;
|
||||||
this.selectedConditionalValue = this.form.conditional_section_rules[conditionalMetadatum];
|
this.selectedConditionalValue = this.form.conditional_section_rules[conditionalMetadatum];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,10 +322,9 @@
|
||||||
'updateMetadataSection'
|
'updateMetadataSection'
|
||||||
]),
|
]),
|
||||||
saveEdition(metadataSection) {
|
saveEdition(metadataSection) {
|
||||||
|
if ( this.form.is_conditional_section == 'yes' && this.selectedConditionalMetadatumId && this.selectedConditionalValue ) {
|
||||||
if ( this.form.is_conditional_section == 'yes' && this.selectedConditionalMetadatum && this.selectedConditionalValue ) {
|
|
||||||
this.form.conditional_section_rules = {}
|
this.form.conditional_section_rules = {}
|
||||||
this.form.conditional_section_rules[this.selectedConditionalMetadatum] = this.selectedConditionalValue;
|
this.form.conditional_section_rules[this.selectedConditionalMetadatumId] = this.selectedConditionalValue;
|
||||||
} else
|
} else
|
||||||
this.form.conditional_section_rules = null;
|
this.form.conditional_section_rules = null;
|
||||||
|
|
||||||
|
@ -359,6 +364,15 @@
|
||||||
this.closedByForm = true;
|
this.closedByForm = true;
|
||||||
this.$emit('onEditionCanceled');
|
this.$emit('onEditionCanceled');
|
||||||
},
|
},
|
||||||
|
selectConditionalValue(selected) {
|
||||||
|
const selectedValues = Array.isArray(selected) ? selected : [ selected ];
|
||||||
|
this.selectedConditionalValue = selectedValues.map( aSelected => aSelected.value ? aSelected.value : aSelected );
|
||||||
|
},
|
||||||
|
reloadConditionalValueComponent() {
|
||||||
|
this.shouldUpdateConditionalValue = false;
|
||||||
|
this.selectedConditionalValue = [];
|
||||||
|
this.$nextTick(() => this.shouldUpdateConditionalValue = true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -459,6 +473,23 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/deep/ .is-special-hidden-for-mobile,
|
||||||
|
/deep/ .is-special-hidden-for-mobile:focus,
|
||||||
|
/deep/ .is-special-hidden-for-mobile:focus-visible {
|
||||||
|
opacity: 0;
|
||||||
|
width: 0;
|
||||||
|
height: 0 !important;
|
||||||
|
min-height: 0;
|
||||||
|
min-width: 0;
|
||||||
|
padding: 0 !important;
|
||||||
|
line-height: 0px !important;
|
||||||
|
border: none !important;
|
||||||
|
border-color: transparent !important;
|
||||||
|
border-width: 0px !important;
|
||||||
|
font-size: 0px !important;
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
.form-submit {
|
.form-submit {
|
||||||
background-color: var(--tainacan-gray1);
|
background-color: var(--tainacan-gray1);
|
||||||
position: sticky;
|
position: sticky;
|
||||||
|
|
|
@ -555,7 +555,7 @@
|
||||||
.status-radios {
|
.status-radios {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
.status-radios .control-lable {
|
.status-radios .control-label {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,9 @@
|
||||||
<span>
|
<span>
|
||||||
<b-checkbox
|
<b-checkbox
|
||||||
@click.native="selectAllCollectionsOnPage()"
|
@click.native="selectAllCollectionsOnPage()"
|
||||||
:value="allCollectionsOnPageSelected">{{ $i18n.get('label_select_all_collections_page') }}</b-checkbox>
|
:native-value="allCollectionsOnPageSelected">
|
||||||
|
{{ $i18n.get('label_select_all_collections_page') }}
|
||||||
|
</b-checkbox>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="field is-pulled-right">
|
<div class="field is-pulled-right">
|
||||||
|
@ -575,7 +577,7 @@ export default {
|
||||||
.selection-control {
|
.selection-control {
|
||||||
|
|
||||||
padding: 6px 0px 0px 12px;
|
padding: 6px 0px 0px 12px;
|
||||||
background: var(--tainacan-white);
|
background: var(--tainacan-background-color);
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|
||||||
.select-all {
|
.select-all {
|
||||||
|
|
|
@ -2693,7 +2693,7 @@ export default {
|
||||||
.selection-control {
|
.selection-control {
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
padding: 6px 0px 0px 12px;
|
padding: 6px 0px 0px 12px;
|
||||||
background: var(--tainacan-white);
|
background: var(--tainacan-background-color);
|
||||||
height: 40px;
|
height: 40px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
@ -517,12 +517,16 @@
|
||||||
|
|
||||||
.sub-header {
|
.sub-header {
|
||||||
@include logs-container();
|
@include logs-container();
|
||||||
|
|
||||||
|
.header-item {
|
||||||
|
min-height: 1.875em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.selection-control {
|
.selection-control {
|
||||||
|
|
||||||
padding: 6px 0px 0px 12px;
|
padding: 6px 0px 0px 12px;
|
||||||
background: var(--tainacan-white);
|
background: var(--tainacan-background-color);
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|
||||||
.select-all {
|
.select-all {
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
<span>
|
<span>
|
||||||
<b-checkbox
|
<b-checkbox
|
||||||
@click.native="selectAllOnPage()"
|
@click.native="selectAllOnPage()"
|
||||||
:value="allOnPageSelected">{{ $i18n.get('label_select_all_taxonomies_page') }}</b-checkbox>
|
:native-value="allOnPageSelected">
|
||||||
|
{{ $i18n.get('label_select_all_taxonomies_page') }}
|
||||||
|
</b-checkbox>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="field is-pulled-right">
|
<div class="field is-pulled-right">
|
||||||
|
@ -438,7 +440,7 @@
|
||||||
.selection-control {
|
.selection-control {
|
||||||
|
|
||||||
padding: 6px 0px 0px 12px;
|
padding: 6px 0px 0px 12px;
|
||||||
background: var(--tainacan-white);
|
background: var(--tainacan-background-color);
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|
||||||
.select-all {
|
.select-all {
|
||||||
|
|
|
@ -19,11 +19,24 @@ class Core_Description extends Metadata_Type {
|
||||||
$this->set_core(true);
|
$this->set_core(true);
|
||||||
$this->set_related_mapped_prop('description');
|
$this->set_related_mapped_prop('description');
|
||||||
$this->set_component('tainacan-textarea');
|
$this->set_component('tainacan-textarea');
|
||||||
|
$this->set_form_component('tainacan-form-textarea');
|
||||||
$this->set_name( __('Core Description', 'tainacan') );
|
$this->set_name( __('Core Description', 'tainacan') );
|
||||||
$this->set_description( __('The "Core Description" is a compulsory metadata automatically created for all collections by default. This is the main description displayed in items lists and where the basic research tools will do their searches.', 'tainacan') );
|
$this->set_description( __('The "Core Description" is a compulsory metadata automatically created for all collections by default. This is the main description displayed in items lists and where the basic research tools will do their searches.', 'tainacan') );
|
||||||
$this->set_sortable( false );
|
$this->set_sortable( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
public function get_form_labels(){
|
||||||
|
return [
|
||||||
|
'maxlength' => [
|
||||||
|
'title' => __( 'Maximum of characters', 'tainacan' ),
|
||||||
|
'description' => __( 'Limits the character input to a maximum value an displays a counter.', 'tainacan' ),
|
||||||
|
]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* generate the metadata for this metadatum type
|
* generate the metadata for this metadatum type
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -69,6 +69,32 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</b-field>
|
</b-field>
|
||||||
|
<b-field :addons="false">
|
||||||
|
<label class="label is-inline">
|
||||||
|
{{ $i18n.getHelperTitle('tainacan-numeric', 'min') }}
|
||||||
|
<help-button
|
||||||
|
:title="$i18n.getHelperTitle('tainacan-numeric', 'min')"
|
||||||
|
:message="$i18n.getHelperMessage('tainacan-numeric', 'min')" />
|
||||||
|
</label>
|
||||||
|
<b-numberinput
|
||||||
|
v-model="min"
|
||||||
|
name="min"
|
||||||
|
step="1"
|
||||||
|
@input="onUpdateMin"/>
|
||||||
|
</b-field>
|
||||||
|
<b-field :addons="false">
|
||||||
|
<label class="label is-inline">
|
||||||
|
{{ $i18n.getHelperTitle('tainacan-numeric', 'max') }}
|
||||||
|
<help-button
|
||||||
|
:title="$i18n.getHelperTitle('tainacan-numeric', 'max')"
|
||||||
|
:message="$i18n.getHelperMessage('tainacan-numeric', 'max')" />
|
||||||
|
</label>
|
||||||
|
<b-numberinput
|
||||||
|
v-model="max"
|
||||||
|
name="max"
|
||||||
|
step="1"
|
||||||
|
@input="onUpdateMax"/>
|
||||||
|
</b-field>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -80,15 +106,25 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
step: [Number, String],
|
step: [Number, String],
|
||||||
|
min: [Number, null],
|
||||||
|
max: [Number, null],
|
||||||
showEditStepOptions: false
|
showEditStepOptions: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.step = this.value && this.value.step ? this.value.step : 0.01;
|
this.step = this.value && this.value.step ? this.value.step : 0.01;
|
||||||
|
this.min = this.value && this.value.min ? Number(this.value.min) : null;
|
||||||
|
this.max = this.value && this.value.max ? Number(this.value.max) : null;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onUpdateStep(value) {
|
onUpdateStep(value) {
|
||||||
this.$emit('input', { step: value });
|
this.$emit('input', { step: value, min: this.min, max: this.max });
|
||||||
|
},
|
||||||
|
onUpdateMin(value) {
|
||||||
|
this.$emit('input', { step: this.step, min: value, max: this.max });
|
||||||
|
},
|
||||||
|
onUpdateMax(value) {
|
||||||
|
this.$emit('input', { step: this.step, min: this.min, max: value });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<b-input
|
<b-numberinput
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
:ref="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')"
|
||||||
:id="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')"
|
:id="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')"
|
||||||
:placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : ''"
|
:placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : ''"
|
||||||
:value="value"
|
:value="value"
|
||||||
@input="onInput($event);"
|
@input="onInput"
|
||||||
@blur="onBlur"
|
@blur="onBlur"
|
||||||
@focus="onMobileSpecialFocus"
|
@focus="onMobileSpecialFocus"
|
||||||
type="number"
|
|
||||||
lang="en"
|
lang="en"
|
||||||
:step="getStep"/>
|
:min="getMin"
|
||||||
|
:max="getMax"
|
||||||
|
:step="getStep" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -25,10 +27,26 @@
|
||||||
return this.itemMetadatum.metadatum.metadata_type_options.step;
|
return this.itemMetadatum.metadatum.metadata_type_options.step;
|
||||||
else
|
else
|
||||||
return 0.01;
|
return 0.01;
|
||||||
|
},
|
||||||
|
getMin() {
|
||||||
|
if (this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.min !== null && this.itemMetadatum.metadatum.metadata_type_options.min !== undefined && this.itemMetadatum.metadatum.metadata_type_options.min !== '')
|
||||||
|
return Number(this.itemMetadatum.metadatum.metadata_type_options.min);
|
||||||
|
else
|
||||||
|
return undefined;
|
||||||
|
},
|
||||||
|
getMax() {
|
||||||
|
if (this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.max !== null && this.itemMetadatum.metadatum.metadata_type_options.max !== undefined && this.itemMetadatum.metadatum.metadata_type_options.max !== '')
|
||||||
|
return Number(this.itemMetadatum.metadatum.metadata_type_options.max);
|
||||||
|
else
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onInput(value) {
|
onInput(value) {
|
||||||
|
const inputRef = this.$refs['tainacan-item-metadatum_id-' + this.itemMetadatum.metadatum.id + (this.itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + this.itemMetadatum.parent_meta_id) : '')];
|
||||||
|
if ( inputRef && !inputRef.checkHtml5Validity())
|
||||||
|
return;
|
||||||
|
|
||||||
this.$emit('input', value);
|
this.$emit('input', value);
|
||||||
},
|
},
|
||||||
onBlur() {
|
onBlur() {
|
||||||
|
@ -40,3 +58,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.b-numberinput {
|
||||||
|
border-bottom-width: 0px !important;
|
||||||
|
margin-left: 0 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -34,6 +34,14 @@ class Numeric extends Metadata_Type {
|
||||||
'step' => [
|
'step' => [
|
||||||
'title' => __( 'Step', 'tainacan' ),
|
'title' => __( 'Step', 'tainacan' ),
|
||||||
'description' => __( 'The amount to be increased or decreased when clicking on the metadatum control buttons. This also defines whether the input accepts decimal numbers.', 'tainacan' ),
|
'description' => __( 'The amount to be increased or decreased when clicking on the metadatum control buttons. This also defines whether the input accepts decimal numbers.', 'tainacan' ),
|
||||||
|
],
|
||||||
|
'min' => [
|
||||||
|
'title' => __( 'Minimum', 'tainacan' ),
|
||||||
|
'description' => __( 'The minimum value that the input will accept.', 'tainacan' ),
|
||||||
|
],
|
||||||
|
'max' => [
|
||||||
|
'title' => __( 'Maximum', 'tainacan' ),
|
||||||
|
'description' => __( 'The maximum value that the input will accept.', 'tainacan' ),
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
:placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : $i18n.get('instruction_type_existing_item')"
|
:placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : $i18n.get('instruction_type_existing_item')"
|
||||||
:loading="isLoading"
|
:loading="isLoading"
|
||||||
:aria-close-label="$i18n.get('remove_value')"
|
:aria-close-label="$i18n.get('remove_value')"
|
||||||
:class="{'has-selected': selected != undefined && selected != []}"
|
:class="{ 'has-selected': selected != undefined && selected != [] }"
|
||||||
field="label"
|
field="label"
|
||||||
@typing="search"
|
@typing="search"
|
||||||
check-infinite-scroll
|
check-infinite-scroll
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
disabled: false,
|
disabled: false,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
getOptions(){
|
getOptions() {
|
||||||
if (this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.options ) {
|
if (this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.options ) {
|
||||||
const metadata = this.itemMetadatum.metadatum.metadata_type_options.options;
|
const metadata = this.itemMetadatum.metadatum.metadata_type_options.options;
|
||||||
return ( metadata ) ? metadata.split("\n") : [];
|
return ( metadata ) ? metadata.split("\n") : [];
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<taxonomy-tag-input
|
<tainacan-taxonomy-tag-input
|
||||||
v-if="getComponent == 'tainacan-taxonomy-tag-input'"
|
v-if="getComponent == 'tainacan-taxonomy-tag-input'"
|
||||||
:disabled="disabled"
|
:disabled="disabled || isFetchingTerms"
|
||||||
:is="getComponent"
|
|
||||||
:maxtags="maxtags != undefined ? maxtags : (itemMetadatum.metadatum.multiple == 'yes' || allowNew === true ? (maxMultipleValues !== undefined ? maxMultipleValues : null) : '1')"
|
:maxtags="maxtags != undefined ? maxtags : (itemMetadatum.metadatum.multiple == 'yes' || allowNew === true ? (maxMultipleValues !== undefined ? maxMultipleValues : null) : '1')"
|
||||||
v-model="valueComponent"
|
v-model="valueComponent"
|
||||||
:allow-select-to-create="allowSelectToCreate"
|
|
||||||
:allow-new="allowNewFromOptions"
|
:allow-new="allowNewFromOptions"
|
||||||
:placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : $i18n.get('instruction_type_existing_term')"
|
:placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : $i18n.get('instruction_type_existing_term')"
|
||||||
:taxonomy-id="taxonomyId"
|
:taxonomy-id="taxonomyId"
|
||||||
|
@ -48,41 +46,43 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Term creation modal, used on admin for a complete term creation -->
|
<template v-if="allowNew && itemMetadatum.item">
|
||||||
<b-modal
|
<!-- Term creation modal, used on admin for a complete term creation -->
|
||||||
v-model="isTermCreationModalOpen"
|
<b-modal
|
||||||
:width="768"
|
v-model="isTermCreationModalOpen"
|
||||||
trap-focus
|
:width="768"
|
||||||
aria-role="dialog"
|
trap-focus
|
||||||
aria-modal
|
aria-role="dialog"
|
||||||
:can-cancel="['outside', 'escape']"
|
aria-modal
|
||||||
custom-class="tainacan-modal"
|
:can-cancel="['outside', 'escape']"
|
||||||
:close-button-aria-label="$i18n.get('close')">
|
custom-class="tainacan-modal"
|
||||||
<term-edition-form
|
:close-button-aria-label="$i18n.get('close')">
|
||||||
:metadatum-id="itemMetadatum.metadatum.id"
|
<term-edition-form
|
||||||
:item-id="itemMetadatum.item.id"
|
:metadatum-id="itemMetadatum.metadatum.id"
|
||||||
:is-hierarchical="isHierarchical"
|
:item-id="itemMetadatum.item.id"
|
||||||
:taxonomy-id="taxonomyId"
|
:is-hierarchical="isHierarchical"
|
||||||
:original-form="{ id: 'new', name: newTermName ? newTermName : '' }"
|
:taxonomy-id="taxonomyId"
|
||||||
:is-term-insertion-flow="true"
|
:original-form="{ id: 'new', name: newTermName ? newTermName : '' }"
|
||||||
@onEditionFinished="($event) => addRecentlyCreatedTerm($event.term)"
|
:is-term-insertion-flow="true"
|
||||||
@onEditionCanceled="() => $console.log('Editing canceled')"
|
@onEditionFinished="($event) => addRecentlyCreatedTerm($event.term)"
|
||||||
@onErrorFound="($event) => $console.log('Form with errors: ' + $event)" />
|
@onEditionCanceled="() => $console.log('Editing canceled')"
|
||||||
</b-modal>
|
@onErrorFound="($event) => $console.log('Form with errors: ' + $event)" />
|
||||||
|
</b-modal>
|
||||||
|
|
||||||
<!-- Term creation panel, used on item submission block for a simpler term creation -->
|
<!-- Term creation panel, used on item submission block for a simpler term creation -->
|
||||||
<transition name="filter-item">
|
<transition name="filter-item">
|
||||||
<term-creation-panel
|
<term-creation-panel
|
||||||
:metadatum-id="itemMetadatum.metadatum.id"
|
:metadatum-id="itemMetadatum.metadatum.id"
|
||||||
:item-id="itemMetadatum.item.id"
|
:item-id="itemMetadatum.item.id"
|
||||||
:is-hierarchical="isHierarchical"
|
:is-hierarchical="isHierarchical"
|
||||||
v-if="isTermCreationPanelOpen"
|
v-if="isTermCreationPanelOpen"
|
||||||
:taxonomy-id="taxonomyId"
|
:taxonomy-id="taxonomyId"
|
||||||
:original-form="{ id: 'new', name: newTermName ? newTermName : '' }"
|
:original-form="{ id: 'new', name: newTermName ? newTermName : '' }"
|
||||||
@onEditionFinished="($event) => addTermToBeCreated($event)"
|
@onEditionFinished="($event) => addTermToBeCreated($event)"
|
||||||
@onEditionCanceled="() => isTermCreationPanelOpen = false"
|
@onEditionCanceled="() => isTermCreationPanelOpen = false"
|
||||||
@onErrorFound="($event) => $console.log('Form with errors: ' + $event)" />
|
@onErrorFound="($event) => $console.log('Form with errors: ' + $event)" />
|
||||||
</transition>
|
</transition>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -90,6 +90,7 @@
|
||||||
import TainacanTaxonomyTagInput from './TaxonomyTaginput.vue';
|
import TainacanTaxonomyTagInput from './TaxonomyTaginput.vue';
|
||||||
import CheckboxRadioMetadataInput from '../../other/checkbox-radio-metadata-input.vue';
|
import CheckboxRadioMetadataInput from '../../other/checkbox-radio-metadata-input.vue';
|
||||||
import { tainacan as axios } from '../../../js/axios.js';
|
import { tainacan as axios } from '../../../js/axios.js';
|
||||||
|
import { mapActions } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -103,7 +104,6 @@
|
||||||
forcedComponentType: '',
|
forcedComponentType: '',
|
||||||
maxtags: '',
|
maxtags: '',
|
||||||
allowNew: false,
|
allowNew: false,
|
||||||
allowSelectToCreate: false,
|
|
||||||
isMobileScreen: false,
|
isMobileScreen: false,
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
|
@ -116,7 +116,8 @@
|
||||||
isTermCreationModalOpen: false,
|
isTermCreationModalOpen: false,
|
||||||
isTermCreationPanelOpen: false,
|
isTermCreationPanelOpen: false,
|
||||||
newTermName: '',
|
newTermName: '',
|
||||||
allowNewFromOptions: false
|
allowNewFromOptions: false,
|
||||||
|
isFetchingTerms: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -165,21 +166,54 @@
|
||||||
|
|
||||||
this.taxonomyId = metadata_type_options.taxonomy_id;
|
this.taxonomyId = metadata_type_options.taxonomy_id;
|
||||||
this.taxonomy = metadata_type_options.taxonomy;
|
this.taxonomy = metadata_type_options.taxonomy;
|
||||||
|
|
||||||
this.allowNewFromOptions = this.allowNew === false ? false : metadata_type_options.allow_new_terms == 'yes' && this.$userCaps.hasCapability('tnc_rep_edit_taxonomies');
|
this.allowNewFromOptions = this.allowNew === false ? false : metadata_type_options.allow_new_terms == 'yes' && this.$userCaps.hasCapability('tnc_rep_edit_taxonomies');
|
||||||
|
|
||||||
this.getTermsId();
|
this.getTermsId();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions('taxonomy', [
|
||||||
|
'fetchTerms'
|
||||||
|
]),
|
||||||
getTermsId() {
|
getTermsId() {
|
||||||
let values = [];
|
let values = [];
|
||||||
|
|
||||||
if (this.value && this.itemMetadatum.metadatum && this.getComponent != 'tainacan-taxonomy-tag-input') {
|
|
||||||
|
if ( this.value && this.itemMetadatum.metadatum && this.getComponent != 'tainacan-taxonomy-tag-input' ) {
|
||||||
values = this.value.map(term => term.id).filter(term => term !== undefined);
|
values = this.value.map(term => term.id).filter(term => term !== undefined);
|
||||||
this.valueComponent = (values.length > 0 && this.itemMetadatum.metadatum && this.itemMetadatum.metadatum.multiple === 'no') ? values[0] : values;
|
this.valueComponent = (values.length > 0 && this.itemMetadatum.metadatum && this.itemMetadatum.metadatum.multiple === 'no') ? values[0] : values;
|
||||||
|
|
||||||
} else if (this.value && this.itemMetadatum.metadatum && this.getComponent == 'tainacan-taxonomy-tag-input') {
|
} else if (this.value && this.itemMetadatum.metadatum && this.getComponent == 'tainacan-taxonomy-tag-input') {
|
||||||
values = this.value.map((term) => { return { label: term.name, value: term.id } });
|
|
||||||
this.valueComponent = values;
|
// This first scenario happens in the item edition form, as the item metadata returns the terms as objects
|
||||||
|
if ( this.value[0] && this.value[0] && this.value[0].id ) {
|
||||||
|
values = this.value.map((term) => { return { label: term.name, value: term.id } });
|
||||||
|
this.valueComponent = values;
|
||||||
|
|
||||||
|
// If the term is not returned as object, we're in bulk edition modal or in the metadata section condition metadata input, where value is a an array of IDs
|
||||||
|
} else if ( this.value.length ) {
|
||||||
|
this.isFetchingTerms = true;
|
||||||
|
this.fetchTerms({
|
||||||
|
taxonomyId: this.taxonomyId,
|
||||||
|
fetchOnly: {
|
||||||
|
fetch_only: {
|
||||||
|
0: 'name',
|
||||||
|
1: 'id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
all: true,
|
||||||
|
include: this.value
|
||||||
|
}).then((res) => {
|
||||||
|
values = res.terms.map((term) => { return { label: term.name, value: term.id } });
|
||||||
|
this.valueComponent = values;
|
||||||
|
this.isFetchingTerms = false;
|
||||||
|
}).catch((error) => {
|
||||||
|
this.isFetchingTerms = false;
|
||||||
|
throw error;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.valueComponent = [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addRecentlyCreatedTerm(term) {
|
addRecentlyCreatedTerm(term) {
|
||||||
|
|
|
@ -5,12 +5,11 @@
|
||||||
:id="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')"
|
:id="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
icon="magnify"
|
icon="magnify"
|
||||||
:allow-new="false"
|
|
||||||
@add="emitAdd"
|
@add="emitAdd"
|
||||||
@remove="emitRemove"
|
@remove="emitRemove"
|
||||||
v-model="selected"
|
v-model="selected"
|
||||||
:data="labels"
|
:data="options"
|
||||||
:maxtags="maxtags"
|
:maxtags="maxtags != undefined ? maxtags : (itemMetadatum.metadatum.multiple == 'yes' || allowNew === true ? (maxMultipleValues !== undefined ? maxMultipleValues : null) : '1')"
|
||||||
field="label"
|
field="label"
|
||||||
:remove-on-keys="[]"
|
:remove-on-keys="[]"
|
||||||
:dropdown-position="isLastMetadatum ? 'top' :'auto'"
|
:dropdown-position="isLastMetadatum ? 'top' :'auto'"
|
||||||
|
@ -21,10 +20,12 @@
|
||||||
:loading="isFetching"
|
:loading="isFetching"
|
||||||
:class="{ 'has-selected': selected != undefined && selected != [] }"
|
:class="{ 'has-selected': selected != undefined && selected != [] }"
|
||||||
autocomplete
|
autocomplete
|
||||||
@typing="loadTerms"
|
@typing="search"
|
||||||
check-infinite-scroll
|
check-infinite-scroll
|
||||||
@infinite-scroll="loadMoreTerms"
|
@infinite-scroll="searchMore"
|
||||||
:has-counter="false">
|
:has-counter="false"
|
||||||
|
:append-to-body="!itemMetadatum.item"
|
||||||
|
:open-on-focus="false">
|
||||||
<template slot-scope="props">
|
<template slot-scope="props">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<div class="media-content">
|
<div class="media-content">
|
||||||
|
@ -33,12 +34,12 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template
|
||||||
v-if="!isFetching"
|
v-if="!isFetching && options.length <= 0 && searchName.length > 0"
|
||||||
slot="empty">
|
slot="empty">
|
||||||
{{ $i18n.get('info_no_terms_found') }}
|
{{ $i18n.get('info_no_terms_found') }}
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template
|
||||||
v-if="allowNew"
|
v-if="allowNew && !isFetching && searchName.length > 0"
|
||||||
slot="footer">
|
slot="footer">
|
||||||
<a @click="$emit('showAddNewTerm', { name: searchName })">
|
<a @click="$emit('showAddNewTerm', { name: searchName })">
|
||||||
{{ $i18n.get('label_create_new_term') + ' "' + searchName + '"' }}
|
{{ $i18n.get('label_create_new_term') + ' "' + searchName + '"' }}
|
||||||
|
@ -57,55 +58,64 @@
|
||||||
allowNew: Boolean,
|
allowNew: Boolean,
|
||||||
taxonomyId: Number,
|
taxonomyId: Number,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
allowSelectToCreate: false,
|
|
||||||
maxtags: '',
|
maxtags: '',
|
||||||
isLastMetadatum: false
|
isLastMetadatum: false
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selected: [],
|
selected: [],
|
||||||
labels: [],
|
options: [],
|
||||||
isFetching: false,
|
isFetching: false,
|
||||||
offset: 0,
|
offset: 0,
|
||||||
searchName: '',
|
searchName: '',
|
||||||
totalTerms: 0
|
totalTerms: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
maxMultipleValues() {
|
||||||
|
return (
|
||||||
|
this.itemMetadatum &&
|
||||||
|
this.itemMetadatum.metadatum &&
|
||||||
|
this.itemMetadatum.metadatum.cardinality &&
|
||||||
|
!isNaN(this.itemMetadatum.metadatum.cardinality) &&
|
||||||
|
this.itemMetadatum.metadatum.cardinality > 1
|
||||||
|
) ? this.itemMetadatum.metadatum.cardinality : undefined;
|
||||||
|
},
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selected() {
|
value() {
|
||||||
if (this.allowSelectToCreate && this.selected[0]) {
|
if ( this.value && this.value.length > 0 && this.value[0].label )
|
||||||
this.selected[0].label.includes(`(${this.$i18n.get('select_to_create')})`);
|
this.selected = JSON.parse(JSON.stringify(this.value));
|
||||||
this.selected[0].label = this.selected[0].label.split('(')[0];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
mounted() {
|
||||||
if (this.value && this.value.length > 0)
|
if ( this.value && this.value.length > 0 && this.value[0].label )
|
||||||
this.selected = this.value;
|
this.selected = JSON.parse(JSON.stringify(this.value));
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions('taxonomy', [
|
...mapActions('taxonomy', [
|
||||||
'fetchTerms'
|
'fetchTerms'
|
||||||
]),
|
]),
|
||||||
loadTerms: _.debounce( function(value) {
|
search: _.debounce( function(value) {
|
||||||
|
|
||||||
// String update
|
// String update
|
||||||
if (value != this.searchName) {
|
if ( value != this.searchName ) {
|
||||||
this.searchName = value;
|
this.searchName = value;
|
||||||
this.labels = [];
|
this.options = [];
|
||||||
this.offset = 0;
|
this.offset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// String cleared
|
// String cleared
|
||||||
if (!value.length) {
|
if ( !value.length ) {
|
||||||
this.searchName = value;
|
this.searchName = value;
|
||||||
this.labels = [];
|
this.options = [];
|
||||||
this.offset = 0;
|
this.offset = 0;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// No need to load more
|
// No need to load more
|
||||||
if (this.offset > 0 && this.labels.length >= this.totalTerms)
|
if ( this.offset > 0 && this.options.length >= this.totalTerms )
|
||||||
return
|
return;
|
||||||
|
|
||||||
this.isFetching = true;
|
this.isFetching = true;
|
||||||
|
|
||||||
|
@ -128,10 +138,7 @@
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
|
|
||||||
for (let term of res.terms)
|
for (let term of res.terms)
|
||||||
this.labels.push({ label: term.name, value: term.id });
|
this.options.push({ label: term.name, value: term.id });
|
||||||
|
|
||||||
if (res.terms.length <= 0 && this.allowSelectToCreate)
|
|
||||||
this.labels.push({ label: `${value} (${this.$i18n.get('select_to_create')})`, value: value })
|
|
||||||
|
|
||||||
this.offset += 12;
|
this.offset += 12;
|
||||||
this.totalTerms = res.total;
|
this.totalTerms = res.total;
|
||||||
|
@ -142,8 +149,8 @@
|
||||||
throw error;
|
throw error;
|
||||||
});
|
});
|
||||||
}, 500),
|
}, 500),
|
||||||
loadMoreTerms: _.debounce(function () {
|
searchMore: _.debounce(function () {
|
||||||
this.loadTerms(this.searchName)
|
this.search(this.searchName)
|
||||||
}, 250),
|
}, 250),
|
||||||
updateSelectedValues(){
|
updateSelectedValues(){
|
||||||
let selected = [];
|
let selected = [];
|
||||||
|
@ -156,7 +163,7 @@
|
||||||
emitAdd(){
|
emitAdd(){
|
||||||
let val = this.selected;
|
let val = this.selected;
|
||||||
let results = [];
|
let results = [];
|
||||||
|
|
||||||
if (val.length > 0) {
|
if (val.length > 0) {
|
||||||
for (let term of val)
|
for (let term of val)
|
||||||
results.push( term.value );
|
results.push( term.value );
|
||||||
|
|
|
@ -14,6 +14,19 @@
|
||||||
:title="$i18n.getHelperTitle('tainacan-text', 'display_suggestions')"
|
:title="$i18n.getHelperTitle('tainacan-text', 'display_suggestions')"
|
||||||
:message="$i18n.getHelperMessage('tainacan-text', 'display_suggestions')"/>
|
:message="$i18n.getHelperMessage('tainacan-text', 'display_suggestions')"/>
|
||||||
</b-field>
|
</b-field>
|
||||||
|
<b-field :addons="false">
|
||||||
|
<label class="label is-inline">
|
||||||
|
{{ $i18n.getHelperTitle('tainacan-text', 'mask') }}
|
||||||
|
<help-button
|
||||||
|
:title="$i18n.getHelperTitle('tainacan-text', 'mask')"
|
||||||
|
:message="$i18n.getHelperMessage('tainacan-text', 'mask')" />
|
||||||
|
</label>
|
||||||
|
<b-input
|
||||||
|
:value="displaySuggestions === 'yes' ? '' : mask"
|
||||||
|
:disabled="displaySuggestions === 'yes'"
|
||||||
|
name="mask"
|
||||||
|
@input="onUpdateMask" />
|
||||||
|
</b-field>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -24,16 +37,22 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
displaySuggestions: String
|
displaySuggestions: String,
|
||||||
|
mask: String
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.displaySuggestions = this.value && this.value.display_suggestions ? this.value.display_suggestions : 'no';
|
this.displaySuggestions = this.value && this.value.display_suggestions ? this.value.display_suggestions : 'no';
|
||||||
|
this.mask = this.value && this.value.mask ? this.value.mask : '';
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onUpdateDisplaySuggestions(value) {
|
onUpdateDisplaySuggestions(value) {
|
||||||
this.displaySuggestions = value;
|
this.displaySuggestions = value;
|
||||||
this.$emit('input', { display_suggestions: value });
|
this.$emit('input', { display_suggestions: value, mask: value == 'yes' ? '' : this.mask });
|
||||||
|
},
|
||||||
|
onUpdateMask(value) {
|
||||||
|
this.mask = value;
|
||||||
|
this.$emit('input', { display_suggestions: this.displaySuggestions, mask: value });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<b-input
|
<div
|
||||||
v-if="!getDisplayAutocomplete"
|
v-if="!getDisplayAutocomplete"
|
||||||
:disabled="disabled"
|
class="control is-clearfix">
|
||||||
:id="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')"
|
<input
|
||||||
:value="value"
|
class="input"
|
||||||
:placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : ''"
|
:disabled="disabled"
|
||||||
@input="onInput($event)"
|
:id="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')"
|
||||||
@blur="onBlur"
|
:value="value"
|
||||||
@focus="onMobileSpecialFocus" />
|
:placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : ''"
|
||||||
|
@focus="onMobileSpecialFocus"
|
||||||
|
v-imask="getMask"
|
||||||
|
@complete="($event) => getMask ? onInput($event.detail.value) : null"
|
||||||
|
@input="($event) => getMask ? null : onInput($event.target.value)"
|
||||||
|
@blur="onBlur" >
|
||||||
|
</div>
|
||||||
<b-autocomplete
|
<b-autocomplete
|
||||||
v-else
|
v-else
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
@ -44,8 +50,12 @@
|
||||||
<script>
|
<script>
|
||||||
import { isCancel } from '../../../js/axios';
|
import { isCancel } from '../../../js/axios';
|
||||||
import { dynamicFilterTypeMixin } from '../../../js/filter-types-mixin';
|
import { dynamicFilterTypeMixin } from '../../../js/filter-types-mixin';
|
||||||
|
import { IMaskDirective } from 'vue-imask';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
directives: {
|
||||||
|
imask: IMaskDirective
|
||||||
|
},
|
||||||
mixins: [dynamicFilterTypeMixin],
|
mixins: [dynamicFilterTypeMixin],
|
||||||
props: {
|
props: {
|
||||||
itemMetadatum: Object,
|
itemMetadatum: Object,
|
||||||
|
@ -72,6 +82,15 @@
|
||||||
return this.itemMetadatum.metadatum.metadata_type_options.display_suggestions == 'yes';
|
return this.itemMetadatum.metadatum.metadata_type_options.display_suggestions == 'yes';
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
},
|
||||||
|
getMask() {
|
||||||
|
if (this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.mask)
|
||||||
|
return {
|
||||||
|
mask: this.itemMetadatum.metadatum.metadata_type_options.mask,
|
||||||
|
lazy: false
|
||||||
|
};
|
||||||
|
else
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
|
@ -35,6 +35,14 @@ class Text extends Metadata_Type {
|
||||||
'display_suggestions' => [
|
'display_suggestions' => [
|
||||||
'title' => __( 'Display suggestions', 'tainacan' ),
|
'title' => __( 'Display suggestions', 'tainacan' ),
|
||||||
'description' => __( 'Show an autocomplete input suggesting values inserted previously on other items for this metadatum.', 'tainacan' ),
|
'description' => __( 'Show an autocomplete input suggesting values inserted previously on other items for this metadatum.', 'tainacan' ),
|
||||||
|
],
|
||||||
|
'mask' => [
|
||||||
|
'title' => __( 'Mask input', 'tainacan' ),
|
||||||
|
'description' => sprintf(
|
||||||
|
__( 'Define a pattern that will be used to mask the input. Learn how to build mask patterns <a target="_blank" href="%1$s">here</a> or, for a more advanced usage, type a <a target="_blank" href="%2$s">Regular Expression</a>.', 'tainacan' ),
|
||||||
|
'https://imask.js.org/guide.html#masked-pattern',
|
||||||
|
'https://en.wikipedia.org/wiki/Regular_expression'
|
||||||
|
)
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
<template>
|
||||||
|
<section>
|
||||||
|
<b-field :addons="false">
|
||||||
|
<label class="label is-inline">
|
||||||
|
{{ $i18n.getHelperTitle('tainacan-textarea', 'maxlength') }}
|
||||||
|
<help-button
|
||||||
|
:title="$i18n.getHelperTitle('tainacan-textarea', 'maxlength')"
|
||||||
|
:message="$i18n.getHelperMessage('tainacan-textarea', 'maxlength')" />
|
||||||
|
</label>
|
||||||
|
<b-numberinput
|
||||||
|
v-model="maxlength"
|
||||||
|
name="maxlength"
|
||||||
|
step="1"
|
||||||
|
min="0"
|
||||||
|
@input="onUpdateMaxlength"/>
|
||||||
|
</b-field>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
value: [ String, Object, Array ]
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
maxlength: [Number, null]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.maxlength = this.value && this.value.maxlength ? Number(this.value.maxlength) : null;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onUpdateMaxlength(value) {
|
||||||
|
if (value == 0) value = null;
|
||||||
|
|
||||||
|
this.$emit('input', { maxlength: value });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
section{
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.tainacan-help-tooltip-trigger {
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -1,13 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<b-input
|
<b-input
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
:ref="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')"
|
||||||
:id="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')"
|
:id="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')"
|
||||||
:placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : ''"
|
:placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : ''"
|
||||||
:value="value"
|
:value="value"
|
||||||
@input="onInput($event)"
|
@input="onInput($event)"
|
||||||
@blur="onBlur"
|
@blur="onBlur"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
@focus="onMobileSpecialFocus" />
|
@focus="onMobileSpecialFocus"
|
||||||
|
:maxlength="getMaxlength" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -17,8 +19,20 @@
|
||||||
value: [String, Number, Array],
|
value: [String, Number, Array],
|
||||||
disabled: false
|
disabled: false
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
getMaxlength() {
|
||||||
|
if (this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.maxlength !== null && this.itemMetadatum.metadatum.metadata_type_options.maxlength !== undefined && this.itemMetadatum.metadatum.metadata_type_options.maxlength !== '')
|
||||||
|
return Number(this.itemMetadatum.metadatum.metadata_type_options.maxlength);
|
||||||
|
else
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onInput(value) {
|
onInput(value) {
|
||||||
|
const inputRef = this.$refs['tainacan-item-metadatum_id-' + this.itemMetadatum.metadatum.id + (this.itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + this.itemMetadatum.parent_meta_id) : '')];
|
||||||
|
if ( inputRef && this.getMaxlength && !inputRef.checkHtml5Validity() )
|
||||||
|
return;
|
||||||
|
|
||||||
this.$emit('input', value);
|
this.$emit('input', value);
|
||||||
},
|
},
|
||||||
onBlur() {
|
onBlur() {
|
||||||
|
|
|
@ -15,6 +15,7 @@ class Textarea extends Metadata_Type {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->set_primitive_type('long_string');
|
$this->set_primitive_type('long_string');
|
||||||
$this->set_component('tainacan-textarea');
|
$this->set_component('tainacan-textarea');
|
||||||
|
$this->set_form_component('tainacan-form-textarea');
|
||||||
$this->set_name( __('Textarea', 'tainacan') );
|
$this->set_name( __('Textarea', 'tainacan') );
|
||||||
$this->set_description( __('A textarea with multiple lines', 'tainacan') );
|
$this->set_description( __('A textarea with multiple lines', 'tainacan') );
|
||||||
$this->set_preview_template('
|
$this->set_preview_template('
|
||||||
|
@ -26,6 +27,18 @@ class Textarea extends Metadata_Type {
|
||||||
');
|
');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
public function get_form_labels(){
|
||||||
|
return [
|
||||||
|
'maxlength' => [
|
||||||
|
'title' => __( 'Maximum of characters', 'tainacan' ),
|
||||||
|
'description' => __( 'Limits the character input to a maximum value an displays a counter.', 'tainacan' ),
|
||||||
|
]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
public function get_multivalue_prefix() {
|
public function get_multivalue_prefix() {
|
||||||
return '<p>';
|
return '<p>';
|
||||||
|
|
|
@ -92,7 +92,6 @@
|
||||||
:forced-component-type="bulkEditionProcedures[criterion].metadatum.metadata_type_object.component.includes('taxonomy') ? 'tainacan-taxonomy-tag-input' : ''"
|
:forced-component-type="bulkEditionProcedures[criterion].metadatum.metadata_type_object.component.includes('taxonomy') ? 'tainacan-taxonomy-tag-input' : ''"
|
||||||
:item-metadatum="{ metadatum: bulkEditionProcedures[criterion].metadatum }"
|
:item-metadatum="{ metadatum: bulkEditionProcedures[criterion].metadatum }"
|
||||||
:allow-new="false"
|
:allow-new="false"
|
||||||
:allow-select-to-create="false"
|
|
||||||
:maxtags="1"
|
:maxtags="1"
|
||||||
:class="{'is-field-history': bulkEditionProcedures[criterion].isDone}"
|
:class="{'is-field-history': bulkEditionProcedures[criterion].isDone}"
|
||||||
:disabled="bulkEditionProcedures[criterion].isDone"
|
:disabled="bulkEditionProcedures[criterion].isDone"
|
||||||
|
@ -111,7 +110,6 @@
|
||||||
:forced-component-type="bulkEditionProcedures[criterion].metadatum.metadata_type_object.component.includes('taxonomy') ? 'tainacan-taxonomy-tag-input' : ''"
|
:forced-component-type="bulkEditionProcedures[criterion].metadatum.metadata_type_object.component.includes('taxonomy') ? 'tainacan-taxonomy-tag-input' : ''"
|
||||||
:item-metadatum="{ metadatum: bulkEditionProcedures[criterion].metadatum }"
|
:item-metadatum="{ metadatum: bulkEditionProcedures[criterion].metadatum }"
|
||||||
:allow-new="false"
|
:allow-new="false"
|
||||||
:allow-select-to-create="bulkEditionProcedures[criterion].metadatum.metadata_type_options.allow_new_terms === 'yes'"
|
|
||||||
:maxtags="1"
|
:maxtags="1"
|
||||||
:class="{'is-field-history': bulkEditionProcedures[criterion].isDone}"
|
:class="{'is-field-history': bulkEditionProcedures[criterion].isDone}"
|
||||||
class="tainacan-bulk-edition-field tainacan-bulk-edition-field-not-last"
|
class="tainacan-bulk-edition-field tainacan-bulk-edition-field-not-last"
|
||||||
|
@ -197,7 +195,6 @@
|
||||||
:forced-component-type="bulkEditionProcedures[criterion].metadatum.metadata_type_object.component.includes('taxonomy') ? 'tainacan-taxonomy-tag-input' : ''"
|
:forced-component-type="bulkEditionProcedures[criterion].metadatum.metadata_type_object.component.includes('taxonomy') ? 'tainacan-taxonomy-tag-input' : ''"
|
||||||
:item-metadatum="{ metadatum: bulkEditionProcedures[criterion].metadatum }"
|
:item-metadatum="{ metadatum: bulkEditionProcedures[criterion].metadatum }"
|
||||||
:allow-new="false"
|
:allow-new="false"
|
||||||
:allow-select-to-create="bulkEditionProcedures[criterion].metadatum.metadata_type_options.allow_new_terms === 'yes'"
|
|
||||||
:maxtags="1"
|
:maxtags="1"
|
||||||
:class="{ 'is-field-history': bulkEditionProcedures[criterion].isDone }"
|
:class="{ 'is-field-history': bulkEditionProcedures[criterion].isDone }"
|
||||||
class="tainacan-bulk-edition-field tainacan-bulk-edition-field-last"
|
class="tainacan-bulk-edition-field tainacan-bulk-edition-field-last"
|
||||||
|
@ -213,7 +210,7 @@
|
||||||
:style="{
|
:style="{
|
||||||
marginRight: !bulkEditionProcedures[criterion].isDone && !bulkEditionProcedures[criterion].isExecuting ? '-7.4px': 0
|
marginRight: !bulkEditionProcedures[criterion].isDone && !bulkEditionProcedures[criterion].isExecuting ? '-7.4px': 0
|
||||||
}"
|
}"
|
||||||
class="field buttons-r-bulk">
|
class="field bulk-last-field">
|
||||||
|
|
||||||
<button
|
<button
|
||||||
v-if="!bulkEditionProcedures[criterion].isDone && !bulkEditionProcedures[criterion].isExecuting"
|
v-if="!bulkEditionProcedures[criterion].isDone && !bulkEditionProcedures[criterion].isExecuting"
|
||||||
|
@ -643,7 +640,7 @@
|
||||||
padding-left: 0 !important;
|
padding-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttons-r-bulk {
|
.bulk-last-field {
|
||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
justify-content: center !important;
|
justify-content: center !important;
|
||||||
}
|
}
|
||||||
|
@ -786,9 +783,26 @@
|
||||||
&:not(:first-child) {
|
&:not(:first-child) {
|
||||||
padding-left: 13px;
|
padding-left: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/deep/ .is-special-hidden-for-mobile,
|
||||||
|
/deep/ .is-special-hidden-for-mobile:focus,
|
||||||
|
/deep/ .is-special-hidden-for-mobile:focus-visible {
|
||||||
|
opacity: 0;
|
||||||
|
width: 0;
|
||||||
|
height: 0 !important;
|
||||||
|
min-height: 0;
|
||||||
|
min-width: 0;
|
||||||
|
padding: 0 !important;
|
||||||
|
line-height: 0px !important;
|
||||||
|
border: none !important;
|
||||||
|
border-color: transparent !important;
|
||||||
|
border-width: 0px !important;
|
||||||
|
font-size: 0px !important;
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttons-r-bulk {
|
.bulk-last-field {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
|
|
|
@ -179,7 +179,7 @@ export default {
|
||||||
max-height: 100vh;
|
max-height: 100vh;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
max-width: 10em;
|
max-width: 11em;
|
||||||
-webkit-transition: max-width 0.2s linear; /* Safari */
|
-webkit-transition: max-width 0.2s linear; /* Safari */
|
||||||
transition: max-width 0.2s linear;
|
transition: max-width 0.2s linear;
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@
|
||||||
}
|
}
|
||||||
.logo-area {
|
.logo-area {
|
||||||
height: $header-height;
|
height: $header-height;
|
||||||
min-width: 10em;
|
min-width: 11em;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
|
|
|
@ -168,7 +168,7 @@ export default {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
padding-left: calc((var(--tainacan-one-column) - 6.666666667px) + 10em);
|
padding-left: calc((var(--tainacan-one-column) - 6.666666667px) + 11em);
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
|
@ -187,7 +187,9 @@
|
||||||
:id="`${key}.${index}-tainacan-li-checkbox-model`"
|
:id="`${key}.${index}-tainacan-li-checkbox-model`"
|
||||||
:ref="`${key}.${index}-tainacan-li-checkbox-model`"
|
:ref="`${key}.${index}-tainacan-li-checkbox-model`"
|
||||||
:key="index">
|
:key="index">
|
||||||
<label class="b-checkbox checkbox">
|
<label
|
||||||
|
@click="option.total_children > 0 && (!finderColumns[key + 1] || finderColumns[key + 1].label !== option.label) ? getOptionChildren(option, key, index) : null"
|
||||||
|
class="b-checkbox checkbox">
|
||||||
<input
|
<input
|
||||||
@input="$emit('input', $event.target.value)"
|
@input="$emit('input', $event.target.value)"
|
||||||
:value="(isNaN(Number(option.value)) ? option.value : Number(option.value))"
|
:value="(isNaN(Number(option.value)) ? option.value : Number(option.value))"
|
||||||
|
@ -829,8 +831,8 @@
|
||||||
|
|
||||||
this.$emit('appliedCheckBoxModal');
|
this.$emit('appliedCheckBoxModal');
|
||||||
},
|
},
|
||||||
renderHierarchicalPath(hierachyPath, label) {
|
renderHierarchicalPath(hierarchyPath, label) {
|
||||||
return '<span style="color: var(--tainacan-info-color);">' + hierachyPath.replace(/>/g, ' <span class="hierarchy-separator"> > </span> ') + '</span>' + label;
|
return '<span style="color: var(--tainacan-info-color);">' + hierarchyPath.replace(/>/g, ' <span class="hierarchy-separator"> > </span> ') + '</span>' + label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,7 +196,8 @@
|
||||||
'b-checkbox checkbox': isCheckbox,
|
'b-checkbox checkbox': isCheckbox,
|
||||||
'b-radio radio': !isCheckbox,
|
'b-radio radio': !isCheckbox,
|
||||||
'is-disabled': !isOptionSelected(option.value) && maxMultipleValues !== undefined && (maxMultipleValues - 1 < selected.length)
|
'is-disabled': !isOptionSelected(option.value) && maxMultipleValues !== undefined && (maxMultipleValues - 1 < selected.length)
|
||||||
}" >
|
}"
|
||||||
|
@click="option.total_children > 0 && (!finderColumns[key + 1] || finderColumns[key + 1].label !== option.label) ? getOptionChildren(option, key, index) : null">
|
||||||
<input
|
<input
|
||||||
:disabled="!isOptionSelected(option.value) && maxMultipleValues !== undefined && (maxMultipleValues - 1 < selected.length)"
|
:disabled="!isOptionSelected(option.value) && maxMultipleValues !== undefined && (maxMultipleValues - 1 < selected.length)"
|
||||||
@input="updateLocalSelection($event.target.value)"
|
@input="updateLocalSelection($event.target.value)"
|
||||||
|
@ -305,8 +306,8 @@
|
||||||
</div>
|
</div>
|
||||||
</b-tab-item>
|
</b-tab-item>
|
||||||
</b-tabs>
|
</b-tabs>
|
||||||
<!-- <pre>{{ hierarchicalPath }}</pre>
|
<!-- <pre>{{ hierarchicalPath }}</pre> -->
|
||||||
<pre>{{ finderColumns }}</pre> -->
|
<!-- <pre>{{ finderColumns }}</pre> -->
|
||||||
<!--<pre>{{ totalRemaining }}</pre>-->
|
<!--<pre>{{ totalRemaining }}</pre>-->
|
||||||
<!-- <pre>{{ selected }}</pre> -->
|
<!-- <pre>{{ selected }}</pre> -->
|
||||||
<!--<pre>{{ options }}</pre>-->
|
<!--<pre>{{ options }}</pre>-->
|
||||||
|
@ -444,7 +445,11 @@
|
||||||
axios.get(`/taxonomy/${this.taxonomy_id}/terms/?${qs.stringify({ hideempty: 0, include: selected})}`)
|
axios.get(`/taxonomy/${this.taxonomy_id}/terms/?${qs.stringify({ hideempty: 0, include: selected})}`)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
for (const term of res.data)
|
for (const term of res.data)
|
||||||
this.saveSelectedTagName(term.id, term.name, term.url);
|
this.saveSelectedTagName(
|
||||||
|
term.id,
|
||||||
|
!this.isCheckbox && term.hierarchy_path ? ( term.hierarchy_path + term.name ) : term.name,
|
||||||
|
term.url
|
||||||
|
);
|
||||||
|
|
||||||
this.isSelectedTermsLoading = false;
|
this.isSelectedTermsLoading = false;
|
||||||
})
|
})
|
||||||
|
@ -803,15 +808,15 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
renderHierarchicalPath(hierachyPath, label) {
|
renderHierarchicalPath(hierarchyPath, label) {
|
||||||
return '<span style="color: var(--tainacan-info-color);">' + hierachyPath.replace(/>/g, ' <span class="hierarchy-separator"> > </span> ') + '</span>' + label;
|
return '<span style="color: var(--tainacan-info-color);">' + hierarchyPath.replace(/>/g, ' <span class="hierarchy-separator"> > </span> ') + '</span>' + label;
|
||||||
},
|
},
|
||||||
onMobileSpecialFocus($event) {
|
onMobileSpecialFocus($event) {
|
||||||
$event.target.blur();
|
$event.target.blur();
|
||||||
this.$emit('mobileSpecialFocus');
|
this.$emit('mobileSpecialFocus');
|
||||||
},
|
},
|
||||||
isOptionSelected(optionValue) {
|
isOptionSelected(optionValue) {
|
||||||
if (Array.isArray(this.selected))
|
if ( Array.isArray(this.selected) )
|
||||||
return (this.selected.indexOf((isNaN(Number(optionValue)) ? optionValue : Number(optionValue))) >= 0)
|
return (this.selected.indexOf((isNaN(Number(optionValue)) ? optionValue : Number(optionValue))) >= 0)
|
||||||
else
|
else
|
||||||
return optionValue == this.selected;
|
return optionValue == this.selected;
|
||||||
|
@ -1211,7 +1216,7 @@
|
||||||
padding: 0px !important;
|
padding: 0px !important;
|
||||||
display: inline;
|
display: inline;
|
||||||
|
|
||||||
.control {
|
.field.is-grouped > .control:not(:last-child) {
|
||||||
margin-bottom: 0.25rem;
|
margin-bottom: 0.25rem;
|
||||||
margin-right: 0.25rem;
|
margin-right: 0.25rem;
|
||||||
}
|
}
|
||||||
|
@ -1223,6 +1228,11 @@
|
||||||
section p {
|
section p {
|
||||||
font-size: 0.875em;
|
font-size: 0.875em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/deep/ .field {
|
||||||
|
padding: 0.25rem !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-modal-checkbox-search-results-body {
|
.tainacan-modal-checkbox-search-results-body {
|
||||||
|
|
|
@ -48,6 +48,7 @@ import User from '../components/metadata-types/user/User.vue';
|
||||||
import GeoCoordinate from '../components/metadata-types/geocoordinate/GeoCoordinate.vue'
|
import GeoCoordinate from '../components/metadata-types/geocoordinate/GeoCoordinate.vue'
|
||||||
|
|
||||||
import FormText from '../components/metadata-types/text/FormText.vue';
|
import FormText from '../components/metadata-types/text/FormText.vue';
|
||||||
|
import FormTextarea from '../components/metadata-types/textarea/FormTextarea.vue';
|
||||||
import FormRelationship from '../components/metadata-types/relationship/FormRelationship.vue';
|
import FormRelationship from '../components/metadata-types/relationship/FormRelationship.vue';
|
||||||
import FormTaxonomy from '../components/metadata-types/taxonomy/FormTaxonomy.vue';
|
import FormTaxonomy from '../components/metadata-types/taxonomy/FormTaxonomy.vue';
|
||||||
import FormSelectbox from '../components/metadata-types/selectbox/FormSelectbox.vue';
|
import FormSelectbox from '../components/metadata-types/selectbox/FormSelectbox.vue';
|
||||||
|
@ -202,6 +203,7 @@ export default (element) => {
|
||||||
|
|
||||||
/* Metadata Option forms */
|
/* Metadata Option forms */
|
||||||
Vue.component('tainacan-form-text', FormText);
|
Vue.component('tainacan-form-text', FormText);
|
||||||
|
Vue.component('tainacan-form-textarea', FormTextarea);
|
||||||
Vue.component('tainacan-form-relationship', FormRelationship);
|
Vue.component('tainacan-form-relationship', FormRelationship);
|
||||||
Vue.component('tainacan-form-taxonomy', FormTaxonomy);
|
Vue.component('tainacan-form-taxonomy', FormTaxonomy);
|
||||||
Vue.component('tainacan-form-selectbox', FormSelectbox);
|
Vue.component('tainacan-form-selectbox', FormSelectbox);
|
||||||
|
|
|
@ -142,6 +142,7 @@ UserPrefsPlugin.install = function (Vue, options = {}) {
|
||||||
'taxonomies_order_by': 'title',
|
'taxonomies_order_by': 'title',
|
||||||
'collections_order': 'desc',
|
'collections_order': 'desc',
|
||||||
'collections_order_by': 'date',
|
'collections_order_by': 'date',
|
||||||
|
'collections_author_filter': '',
|
||||||
'map_view_mode_selected_geocoordinate_metadatum': 0
|
'map_view_mode_selected_geocoordinate_metadatum': 0
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
|
|
|
@ -98,7 +98,7 @@ export const eventBusItemMetadata = new Vue({
|
||||||
for (let conditionalSectionId in updatedConditionalSections) {
|
for (let conditionalSectionId in updatedConditionalSections) {
|
||||||
if ( updatedConditionalSections[conditionalSectionId].metadatumId == metadatumId ) {
|
if ( updatedConditionalSections[conditionalSectionId].metadatumId == metadatumId ) {
|
||||||
const conditionalValues = Array.isArray(updatedConditionalSections[conditionalSectionId].metadatumValues) ? updatedConditionalSections[conditionalSectionId].metadatumValues : [ this.conditionalSections[conditionalSectionId].metadatumValues ];
|
const conditionalValues = Array.isArray(updatedConditionalSections[conditionalSectionId].metadatumValues) ? updatedConditionalSections[conditionalSectionId].metadatumValues : [ this.conditionalSections[conditionalSectionId].metadatumValues ];
|
||||||
updatedConditionalSections[conditionalSectionId].hide = values.every(aValue => conditionalValues.indexOf(aValue) < 0);
|
updatedConditionalSections[conditionalSectionId].hide = Array.isArray(values) ? values.every(aValue => conditionalValues.indexOf(aValue) < 0) : conditionalValues.indexOf(values) < 0 ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.conditionalSections = updatedConditionalSections;
|
this.conditionalSections = updatedConditionalSections;
|
||||||
|
|
|
@ -148,6 +148,10 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.$store.dispatch('search/set_postquery', this.$route.query);
|
this.$store.dispatch('search/set_postquery', this.$route.query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Finally, loads items even berfore facets so they won't stuck them
|
||||||
|
if (to.fullPath != from.fullPath)
|
||||||
|
this.loadItems();
|
||||||
|
|
||||||
// Checks current metaqueries and taxqueries to alert filters that should reload
|
// Checks current metaqueries and taxqueries to alert filters that should reload
|
||||||
// For some reason, this process is not working accessing to.query, so we need to check the path string.
|
// For some reason, this process is not working accessing to.query, so we need to check the path string.
|
||||||
|
@ -174,10 +178,6 @@ export default {
|
||||||
) {
|
) {
|
||||||
this.$emit('has-to-reload-facets', true);
|
this.$emit('has-to-reload-facets', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally, loads items
|
|
||||||
if (to.fullPath != from.fullPath)
|
|
||||||
this.loadItems();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -146,7 +146,7 @@ export const deleteItem = ({ commit }, { itemId, isPermanently }) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const fetchCollections = ({commit} , { page, collectionsPerPage, status, contextEdit, order, orderby, search, collectionTaxonomies }) => {
|
export const fetchCollections = ({commit} , { page, collectionsPerPage, status, contextEdit, order, orderby, search, collectionTaxonomies, authorid }) => {
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let endpoint = '/collections?paged='+page+'&perpage='+collectionsPerPage;
|
let endpoint = '/collections?paged='+page+'&perpage='+collectionsPerPage;
|
||||||
|
@ -187,6 +187,9 @@ export const fetchCollections = ({commit} , { page, collectionsPerPage, status,
|
||||||
endpoint = endpoint + '&' + qs.stringify(taxQuery);
|
endpoint = endpoint + '&' + qs.stringify(taxQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (authorid != '' && authorid != undefined)
|
||||||
|
endpoint = endpoint + '&authorid=' + authorid;
|
||||||
|
|
||||||
axios.tainacan.get(endpoint)
|
axios.tainacan.get(endpoint)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
let collections = res.data;
|
let collections = res.data;
|
||||||
|
|
|
@ -123,7 +123,7 @@ export const fetchTaxonomyName = ({ commit }, taxonomyId) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// TAXONOMY TERMS
|
// TAXONOMY TERMS
|
||||||
export const fetchTerms = ({}, {taxonomyId, fetchOnly, search, all, order, offset, number, exclude }) => {
|
export const fetchTerms = ({}, {taxonomyId, fetchOnly, search, all, order, offset, number, exclude, include }) => {
|
||||||
|
|
||||||
let query = '';
|
let query = '';
|
||||||
|
|
||||||
|
@ -148,6 +148,9 @@ export const fetchTerms = ({}, {taxonomyId, fetchOnly, search, all, order, offse
|
||||||
if (exclude != undefined)
|
if (exclude != undefined)
|
||||||
query += '&' + qs.stringify({ exclude: exclude });
|
query += '&' + qs.stringify({ exclude: exclude });
|
||||||
|
|
||||||
|
if (include != undefined)
|
||||||
|
query += '&' + qs.stringify({ include: include });
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
axios.tainacan.get(`/taxonomy/${taxonomyId}/terms${query}`)
|
axios.tainacan.get(`/taxonomy/${taxonomyId}/terms${query}`)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
|
|
@ -420,7 +420,7 @@
|
||||||
|
|
||||||
.header-item {
|
.header-item {
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
min-height: 2em;
|
min-height: 1.875em;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
|
|
@ -199,10 +199,9 @@
|
||||||
top: calc(-1 * var(--tainacan-container-padding));
|
top: calc(-1 * var(--tainacan-container-padding));
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
background: var(--tainacan-background-color);
|
background: var(--tainacan-background-color);
|
||||||
min-height: $header-height;
|
min-height: 2.5em;
|
||||||
|
padding: 0.5em 0;
|
||||||
height: auto;
|
height: auto;
|
||||||
padding-left: 0;
|
|
||||||
padding-right: 0;
|
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
@ -212,7 +211,7 @@
|
||||||
|
|
||||||
.header-item {
|
.header-item {
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
min-height: 2em;
|
min-height: 1.875em;
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
|
|
@ -102,8 +102,27 @@
|
||||||
</b-field>
|
</b-field>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- Author filtering options ---- -->
|
||||||
|
<b-field
|
||||||
|
id="collections-page-author-filter"
|
||||||
|
class="header-item">
|
||||||
|
<label class="label">{{ $i18n.get('label_show_only_created_by_me') }} </label>
|
||||||
|
<b-switch
|
||||||
|
size="is-small"
|
||||||
|
class="author-filter-switch"
|
||||||
|
:disabled="collections.length <= 0 && isLoading"
|
||||||
|
@input="onChangeAuthorFilter($event)"
|
||||||
|
:value="authorFilter"
|
||||||
|
:true-value="'current-author'"
|
||||||
|
:false-value="''"
|
||||||
|
:label="$i18n.get('label_show_only_created_by_me')" />
|
||||||
|
|
||||||
|
</b-field>
|
||||||
|
|
||||||
<!-- Sorting options ---- -->
|
<!-- Sorting options ---- -->
|
||||||
<b-field class="header-item">
|
<b-field
|
||||||
|
id="collections-page-sorting-options"
|
||||||
|
class="header-item">
|
||||||
<label class="label">{{ $i18n.get('label_sort') }} </label>
|
<label class="label">{{ $i18n.get('label_sort') }} </label>
|
||||||
<b-dropdown
|
<b-dropdown
|
||||||
:mobile-modal="true"
|
:mobile-modal="true"
|
||||||
|
@ -172,7 +191,9 @@
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<!-- Textual Search -------------->
|
<!-- Textual Search -------------->
|
||||||
<b-field class="header-item">
|
<b-field
|
||||||
|
id="collection-page-search"
|
||||||
|
class="header-item">
|
||||||
<b-input
|
<b-input
|
||||||
:placeholder="$i18n.get('instruction_search')"
|
:placeholder="$i18n.get('instruction_search')"
|
||||||
type="search"
|
type="search"
|
||||||
|
@ -252,6 +273,8 @@
|
||||||
</p>
|
</p>
|
||||||
<p v-if="status == undefined || status == ''">{{ $i18n.get('info_no_collection_created') }}</p>
|
<p v-if="status == undefined || status == ''">{{ $i18n.get('info_no_collection_created') }}</p>
|
||||||
<p v-else>{{ $i18n.get('info_no_collections_' + status) }}</p>
|
<p v-else>{{ $i18n.get('info_no_collections_' + status) }}</p>
|
||||||
|
<p v-if="searchQuery">{{ $i18n.get('info_try_empting_the_textual_search') }}</p>
|
||||||
|
<p v-if="authorFilter !== '' && !searchQuery">{{ $i18n.get('info_try_selecting_all_collections_in_filter') }}</p>
|
||||||
<div v-if="!$adminOptions.hideCollectionsListCreationDropdown && $userCaps.hasCapability('tnc_rep_edit_collections') && status == undefined || status == ''">
|
<div v-if="!$adminOptions.hideCollectionsListCreationDropdown && $userCaps.hasCapability('tnc_rep_edit_collections') && status == undefined || status == ''">
|
||||||
<b-dropdown
|
<b-dropdown
|
||||||
id="collection-creation-options-dropdown"
|
id="collection-creation-options-dropdown"
|
||||||
|
@ -372,6 +395,7 @@ export default {
|
||||||
order: 'desc',
|
order: 'desc',
|
||||||
orderBy: 'date',
|
orderBy: 'date',
|
||||||
searchQuery: '',
|
searchQuery: '',
|
||||||
|
authorFilter: '',
|
||||||
sortingOptions: [
|
sortingOptions: [
|
||||||
{ label: this.$i18n.get('label_title'), value: 'title' },
|
{ label: this.$i18n.get('label_title'), value: 'title' },
|
||||||
{ label: this.$i18n.get('label_creation_date'), value: 'date' },
|
{ label: this.$i18n.get('label_creation_date'), value: 'date' },
|
||||||
|
@ -439,6 +463,13 @@ export default {
|
||||||
this.$userPrefs.set('collections_order_by', 'date');
|
this.$userPrefs.set('collections_order_by', 'date');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.authorFilter != this.$userPrefs.get('collections_author_filter'))
|
||||||
|
this.authorFilter = this.$userPrefs.get('collections_author_filter');
|
||||||
|
if (this.authorFilter === undefined) {
|
||||||
|
this.authorFilter = '';
|
||||||
|
this.$userPrefs.set('collections_author_filter', '');
|
||||||
|
}
|
||||||
|
|
||||||
this.loadCollections();
|
this.loadCollections();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -483,6 +514,19 @@ export default {
|
||||||
this.orderBy = newOrderBy;
|
this.orderBy = newOrderBy;
|
||||||
this.loadCollections();
|
this.loadCollections();
|
||||||
},
|
},
|
||||||
|
onChangeAuthorFilter(newAuthorFilter) {
|
||||||
|
if (newAuthorFilter != this.authorFilter) {
|
||||||
|
this.$userPrefs.set('collections_author_filter', newAuthorFilter)
|
||||||
|
.then((newAuthorFilter) => {
|
||||||
|
this.authorFilter = newAuthorFilter;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$console.log("Error settings user prefs for collections author filter")
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.authorFilter = newAuthorFilter;
|
||||||
|
this.loadCollections();
|
||||||
|
},
|
||||||
onChangeCollectionsPerPage(value) {
|
onChangeCollectionsPerPage(value) {
|
||||||
|
|
||||||
if (value != this.collectionsPerPage) {
|
if (value != this.collectionsPerPage) {
|
||||||
|
@ -521,6 +565,7 @@ export default {
|
||||||
orderby: this.orderBy,
|
orderby: this.orderBy,
|
||||||
search: this.searchQuery,
|
search: this.searchQuery,
|
||||||
collectionTaxonomies: this.collectionTaxonomies,
|
collectionTaxonomies: this.collectionTaxonomies,
|
||||||
|
authorid: this.authorFilter === 'current-author' && tainacan_plugin.user_data && tainacan_plugin.user_data.ID ? tainacan_plugin.user_data.ID : ''
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
@ -568,20 +613,20 @@ export default {
|
||||||
@import '../../scss/_variables.scss';
|
@import '../../scss/_variables.scss';
|
||||||
|
|
||||||
.sub-header {
|
.sub-header {
|
||||||
min-height: $header-height;
|
min-height: 2.5em;
|
||||||
|
padding: 0.5em 0;
|
||||||
height: auto;
|
height: auto;
|
||||||
padding-left: 0;
|
|
||||||
padding-right: 0;
|
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
gap: 4px;
|
||||||
|
|
||||||
.header-item {
|
.header-item {
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
min-height: 2em;
|
min-height: 1.875em;
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
@ -593,9 +638,11 @@ export default {
|
||||||
.label {
|
.label {
|
||||||
font-size: 0.875em;
|
font-size: 0.875em;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
margin-top: 5px;
|
margin-top: 2px;
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(:first-child) {
|
&:not(:first-child) {
|
||||||
|
@ -629,7 +676,9 @@ export default {
|
||||||
font-size: 1.125em !important;
|
font-size: 1.125em !important;
|
||||||
height: 1.75em
|
height: 1.75em
|
||||||
}
|
}
|
||||||
|
.collections-page-author-filter {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
|
@ -660,7 +709,6 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 769px) {
|
@media screen and (max-width: 769px) {
|
||||||
height: 120px;
|
|
||||||
margin-top: -0.5em;
|
margin-top: -0.5em;
|
||||||
padding-top: 0.9em;
|
padding-top: 0.9em;
|
||||||
|
|
||||||
|
|
|
@ -387,10 +387,9 @@
|
||||||
@import '../../scss/_variables.scss';
|
@import '../../scss/_variables.scss';
|
||||||
|
|
||||||
.sub-header {
|
.sub-header {
|
||||||
min-height: $header-height;
|
|
||||||
height: auto;
|
height: auto;
|
||||||
padding-left: 0;
|
min-height: 2.5em;
|
||||||
padding-right: 0;
|
padding: 0.5em 0;
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
@ -400,7 +399,7 @@
|
||||||
|
|
||||||
.header-item {
|
.header-item {
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
min-height: 2em;
|
min-height: 1.875em;
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
|
|
@ -46,8 +46,13 @@ button.link-style:active {
|
||||||
background: var(--tainacan-success) !important;
|
background: var(--tainacan-success) !important;
|
||||||
color: var(--tainacan-white) !important;
|
color: var(--tainacan-white) !important;
|
||||||
}
|
}
|
||||||
&.is-white, &.is-white:hover, &.is-white:focus, &.is-outlined:hover, &.is-outlined:focus {
|
&.is-white,
|
||||||
background-color: transparent !important;
|
&.is-outlined:hover, &.is-outlined:focus {
|
||||||
|
transition: background-color 0.2s ease-out;
|
||||||
|
background-color: rgba(125,125,125,0.0) !important;
|
||||||
|
}
|
||||||
|
&.is-white:hover, &.is-white:focus {
|
||||||
|
background-color: rgba(125,125,125,0.05) !important;
|
||||||
}
|
}
|
||||||
&.is-loading, &.is-loading:hover, &.is-loading:focus,
|
&.is-loading, &.is-loading:hover, &.is-loading:focus,
|
||||||
&.is-loading.is-success, &.is-loading.is-success:hover, &.is-loading.is-success:focus,
|
&.is-loading.is-success, &.is-loading.is-success:hover, &.is-loading.is-success:focus,
|
||||||
|
|
|
@ -150,10 +150,14 @@
|
||||||
background-color: var(--tainacan-success) !important;
|
background-color: var(--tainacan-success) !important;
|
||||||
color: var(--tainacan-white) !important;
|
color: var(--tainacan-white) !important;
|
||||||
}
|
}
|
||||||
.is-white,
|
.is-white {
|
||||||
|
color: var(--tainacan-black) !important;
|
||||||
|
transition: background-color 0.2s ease-out;
|
||||||
|
background-color: rgba(125,125,125,0.0) !important;
|
||||||
|
}
|
||||||
.is-white:hover,
|
.is-white:hover,
|
||||||
.is-white:focus {
|
.is-white:focus {
|
||||||
background-color: transparent !important;
|
background-color: rgba(125,125,125,0.05) !important;
|
||||||
color: var(--tainacan-black) !important;
|
color: var(--tainacan-black) !important;
|
||||||
}
|
}
|
||||||
.button.is-loading, .button.is-loading:hover, .button.is-loading:focus,
|
.button.is-loading, .button.is-loading:hover, .button.is-loading:focus,
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
font-family: var(--tainacan-font-family, inherit);
|
font-family: var(--tainacan-font-family, inherit);
|
||||||
line-height: 1.75em !important;
|
line-height: 1.75em !important;
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
padding: calc(0.375em - 1px) 20px calc(0.375em - 1px) 10px !important;
|
padding: calc(0.375em - 1px) 24px calc(0.375em - 1px) 10px !important;
|
||||||
margin-top: 0px !important;
|
margin-top: 0px !important;
|
||||||
margin-bottom: 0px !important;
|
margin-bottom: 0px !important;
|
||||||
color: var(--tainacan-input-color);
|
color: var(--tainacan-input-color);
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
&.is-narrow {
|
&.is-narrow {
|
||||||
tbody td {
|
tbody td {
|
||||||
height: 42px;
|
height: 44px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -191,15 +191,15 @@ $checkbox-border-width: 1px;
|
||||||
top: calc(-1 * var(--tainacan-container-padding));
|
top: calc(-1 * var(--tainacan-container-padding));
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
background: var(--tainacan-background-color);
|
background: var(--tainacan-background-color);
|
||||||
min-height: $header-height;
|
|
||||||
height: auto;
|
height: auto;
|
||||||
padding-left: 0;
|
min-height: 2.5em;
|
||||||
padding-right: 0;
|
padding: 0.5em 0;
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
gap: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// A copy of bootstrap's screen reader only class to be used for accessibility.
|
// A copy of bootstrap's screen reader only class to be used for accessibility.
|
||||||
|
|
|
@ -542,13 +542,13 @@
|
||||||
|
|
||||||
<!-- Default loading, to be used view modes without any skeleton-->
|
<!-- Default loading, to be used view modes without any skeleton-->
|
||||||
<b-loading
|
<b-loading
|
||||||
v-if="!(registeredViewModes[viewMode] != undefined && registeredViewModes[viewMode].skeleton_template != undefined)"
|
v-if="registeredViewModes[viewMode] != undefined && !registeredViewModes[viewMode].implements_skeleton && !registeredViewModes[viewMode].skeleton_template"
|
||||||
:is-full-page="false"
|
:is-full-page="false"
|
||||||
:active.sync="showLoading"/>
|
:active.sync="showLoading"/>
|
||||||
|
|
||||||
<!-- Custom skeleton templates used by some view modes -->
|
<!-- Custom skeleton templates used by some view modes -->
|
||||||
<div
|
<div
|
||||||
v-if="(registeredViewModes[viewMode] != undefined && registeredViewModes[viewMode].skeleton_template != undefined)"
|
v-if="registeredViewModes[viewMode] != undefined && registeredViewModes[viewMode].implements_skeleton && registeredViewModes[viewMode].skeleton_template"
|
||||||
v-html="registeredViewModes[viewMode].skeleton_template"/>
|
v-html="registeredViewModes[viewMode].skeleton_template"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -598,6 +598,11 @@
|
||||||
max-width: calc((90vh * 1) / 2);
|
max-width: calc((90vh * 1) / 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.pswp__content {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-content: center;
|
||||||
|
}
|
||||||
.pswp__content>.tainacan-content-embed:not(.attachment-without-image) {
|
.pswp__content>.tainacan-content-embed:not(.attachment-without-image) {
|
||||||
margin-top: 60px;
|
margin-top: 60px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -407,9 +407,6 @@ export default {
|
||||||
'setTaxonomyTerms',
|
'setTaxonomyTerms',
|
||||||
'setReportLatestCachedOn'
|
'setReportLatestCachedOn'
|
||||||
]),
|
]),
|
||||||
...mapActions('metadata', [
|
|
||||||
'fetchMetadata'
|
|
||||||
]),
|
|
||||||
buildMetadatumTermsChart() {
|
buildMetadatumTermsChart() {
|
||||||
this.isBuildingChart = true;
|
this.isBuildingChart = true;
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,7 @@ return apply_filters( 'tainacan-i18n', [
|
||||||
'delete' => __( 'Delete', 'tainacan' ),
|
'delete' => __( 'Delete', 'tainacan' ),
|
||||||
'skip' => __( 'Skip', 'tainacan' ),
|
'skip' => __( 'Skip', 'tainacan' ),
|
||||||
'add' => __( 'Add', 'tainacan' ),
|
'add' => __( 'Add', 'tainacan' ),
|
||||||
|
'show' => __( 'Show', 'tainacan' ),
|
||||||
|
|
||||||
// Wordpress Comments Status
|
// Wordpress Comments Status
|
||||||
'comments_status_open' => __( 'Open', 'tainacan' ),
|
'comments_status_open' => __( 'Open', 'tainacan' ),
|
||||||
|
@ -302,6 +303,8 @@ return apply_filters( 'tainacan-i18n', [
|
||||||
/* translators: 'Published' here refers to the sum of public and private items, not including draft or trashed ones. The are visible to those with permission */
|
/* translators: 'Published' here refers to the sum of public and private items, not including draft or trashed ones. The are visible to those with permission */
|
||||||
'label_all_items' => __( 'All items', 'tainacan' ),
|
'label_all_items' => __( 'All items', 'tainacan' ),
|
||||||
'label_all_collections' => __( 'All collections', 'tainacan' ),
|
'label_all_collections' => __( 'All collections', 'tainacan' ),
|
||||||
|
'label_show_only_created_by_me' => __( 'Show only created by me', 'tainacan' ),
|
||||||
|
'label_collections_that_i_can_edit' => __( 'Collections that I can edit', 'tainacan' ),
|
||||||
'label_all_taxonomies' => __( 'All taxonomies', 'tainacan' ),
|
'label_all_taxonomies' => __( 'All taxonomies', 'tainacan' ),
|
||||||
'label_bulk_actions' => __( 'Bulk actions', 'tainacan' ),
|
'label_bulk_actions' => __( 'Bulk actions', 'tainacan' ),
|
||||||
'label_delete_selected_collections' => __( 'Delete selected collections', 'tainacan' ),
|
'label_delete_selected_collections' => __( 'Delete selected collections', 'tainacan' ),
|
||||||
|
@ -1049,6 +1052,8 @@ return apply_filters( 'tainacan-i18n', [
|
||||||
'info_you_searched_for_%s' => __( 'You searched for %s', 'tainacan' ),
|
'info_you_searched_for_%s' => __( 'You searched for %s', 'tainacan' ),
|
||||||
'info_try_enabling_search_by_word' => __( 'Try enabling the search by words.', 'tainacan' ),
|
'info_try_enabling_search_by_word' => __( 'Try enabling the search by words.', 'tainacan' ),
|
||||||
'info_try_disabling_search_by_word' => __( 'Try disabling the search by words, to search for the complete phrase.', 'tainacan' ),
|
'info_try_disabling_search_by_word' => __( 'Try disabling the search by words, to search for the complete phrase.', 'tainacan' ),
|
||||||
|
'info_try_empting_the_textual_search' => __( 'Try empting the textual search.', 'tainacan' ),
|
||||||
|
'info_try_selecting_all_collections_in_filter' => __( 'Try selecting All Collections in the filter above.', 'tainacan' ),
|
||||||
'info_details_about_search_by_word' => __( 'They may be located on different metadata and order, but you will still be able to use quotes to group them.', 'tainacan' ),
|
'info_details_about_search_by_word' => __( 'They may be located on different metadata and order, but you will still be able to use quotes to group them.', 'tainacan' ),
|
||||||
'info_item_submission_draft_status' => __( 'Warning: draft items may be submitted even without filling all required metadata.', 'tainacan' ),
|
'info_item_submission_draft_status' => __( 'Warning: draft items may be submitted even without filling all required metadata.', 'tainacan' ),
|
||||||
'info_empty_geocoordinate_metadata_list' => __( 'No geocoordinate metadata was found. Try enabling it in the "displayed metadata" dropdown.', 'tainacan' ),
|
'info_empty_geocoordinate_metadata_list' => __( 'No geocoordinate metadata was found. Try enabling it in the "displayed metadata" dropdown.', 'tainacan' ),
|
||||||
|
|
Loading…
Reference in New Issue