Improvements on advanced search component
This commit is contained in:
parent
7d1f934795
commit
7711f002b6
|
@ -129,7 +129,11 @@
|
||||||
icon="plus-circle"
|
icon="plus-circle"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
type="is-secondary"/>
|
type="is-secondary"/>
|
||||||
{{ $i18n.get('add_another_search_criterion') }}</a>
|
{{ searchCriteria.length <= 0 ?
|
||||||
|
$i18n.get('add_one_search_criterion') :
|
||||||
|
$i18n.get('add_another_search_criterion')
|
||||||
|
}}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Tags -->
|
<!-- Tags -->
|
||||||
|
@ -173,7 +177,10 @@
|
||||||
v-show="!advancedSearchResults"
|
v-show="!advancedSearchResults"
|
||||||
class="column">
|
class="column">
|
||||||
<div class="field is-grouped is-pulled-right">
|
<div class="field is-grouped is-pulled-right">
|
||||||
<p class="control">
|
<p
|
||||||
|
v-if="Object.keys(this.advancedSearchQuery.taxquery).length > 0 ||
|
||||||
|
Object.keys(this.advancedSearchQuery.metaquery).length > 0"
|
||||||
|
class="control">
|
||||||
<button
|
<button
|
||||||
@click="clearSearch"
|
@click="clearSearch"
|
||||||
class="button is-outlined">{{ $i18n.get('clear_search') }}</button>
|
class="button is-outlined">{{ $i18n.get('clear_search') }}</button>
|
||||||
|
@ -600,7 +607,7 @@
|
||||||
margin-left: -5px !important;
|
margin-left: -5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
tainacan-input-disabled {
|
.tainacan-input-disabled {
|
||||||
background-color: $gray;
|
background-color: $gray;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="block overflow-at">
|
class="block">
|
||||||
<div
|
<div
|
||||||
v-for="(collection, key) in collections"
|
v-for="(collection, key) in collections"
|
||||||
:key="key"
|
:key="key"
|
||||||
|
@ -87,11 +87,3 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
.overflow-at {
|
|
||||||
overflow: auto;
|
|
||||||
max-height: 125px;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -381,7 +381,7 @@
|
||||||
</p>
|
</p>
|
||||||
<p class="control">
|
<p class="control">
|
||||||
<a @click="openAdvancedSearch = false">
|
<a @click="openAdvancedSearch = false">
|
||||||
{{ $i18n.get('exit') }}
|
{{ $i18n.get('back') }}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
.tag {
|
.tag {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
|
margin-right: 4px !important;
|
||||||
max-width: calc(100% - 21px);
|
max-width: calc(100% - 21px);
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
@ -58,10 +58,10 @@ return apply_filters( 'tainacan-admin-i18n', [
|
||||||
'split' => __( 'Split', 'tainacan' ),
|
'split' => __( 'Split', 'tainacan' ),
|
||||||
'unified' => __( 'Unified', 'tainacan' ),
|
'unified' => __( 'Unified', 'tainacan' ),
|
||||||
'add_another_search_criterion' => __( 'Add another search criterion', 'tainacan' ),
|
'add_another_search_criterion' => __( 'Add another search criterion', 'tainacan' ),
|
||||||
|
'add_one_search_criterion' => __( 'Add one search criterion', 'tainacan' ),
|
||||||
'clear_search' => __( 'Clear search', 'tainacan' ),
|
'clear_search' => __( 'Clear search', 'tainacan' ),
|
||||||
'run' => __( 'Run', 'tainacan' ),
|
'run' => __( 'Run', 'tainacan' ),
|
||||||
'edit_search' => __( 'Edit search', 'tainacan' ),
|
'edit_search' => __( 'Edit search', 'tainacan' ),
|
||||||
'exit' => __( 'Exit', 'tainacan' ),
|
|
||||||
|
|
||||||
// Wordpress Status
|
// Wordpress Status
|
||||||
'publish' => __( 'Publish', 'tainacan' ),
|
'publish' => __( 'Publish', 'tainacan' ),
|
||||||
|
|
|
@ -45,7 +45,7 @@ class CSV extends Importer {
|
||||||
$processedItem = [];
|
$processedItem = [];
|
||||||
$headers = $this->get_source_metadata();
|
$headers = $this->get_source_metadata();
|
||||||
|
|
||||||
$this->add_log('Proccessing item index ' . $index . ' in collection ' . $collection_id['id'] );
|
$this->add_log('Proccessing item index ' . $index . ' in collection ' . $collection_definition['id'] );
|
||||||
// search the index in the file and get values
|
// search the index in the file and get values
|
||||||
$file = new \SplFileObject( $this->tmp_file, 'r' );
|
$file = new \SplFileObject( $this->tmp_file, 'r' );
|
||||||
$file->setFlags(\SplFileObject::SKIP_EMPTY);
|
$file->setFlags(\SplFileObject::SKIP_EMPTY);
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import axios from '../../../axios/axios';
|
import axios from '../../../axios/axios';
|
||||||
|
|
||||||
export const fetchMetadata = ({commit}, {collectionId, isRepositoryLevel, isContextEdit, includeDisabled}) => {
|
export const fetchMetadata = ({commit}, {collectionId, isRepositoryLevel, isContextEdit, includeDisabled}) => {
|
||||||
|
commit('cleanMetadata');
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let endpoint = '';
|
let endpoint = '';
|
||||||
if (!isRepositoryLevel)
|
if (!isRepositoryLevel)
|
||||||
|
|
|
@ -22,3 +22,7 @@ export const setMetadatumTypes = (state, metadatumTypes) => {
|
||||||
export const setMetadatumMappers = (state, metadatumMappers) => {
|
export const setMetadatumMappers = (state, metadatumMappers) => {
|
||||||
state.metadatumMappers = metadatumMappers;
|
state.metadatumMappers = metadatumMappers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const cleanMetadata = (state) => {
|
||||||
|
state.metadata = [];
|
||||||
|
}
|
|
@ -40,7 +40,7 @@ function tainacan_create_bd_process_db() {
|
||||||
if(empty($column_exists)) {
|
if(empty($column_exists)) {
|
||||||
$wpdb->query("
|
$wpdb->query("
|
||||||
ALTER TABLE {$wpdb->prefix}tnc_bg_process
|
ALTER TABLE {$wpdb->prefix}tnc_bg_process
|
||||||
ADD name text NOT NULL,
|
ADD name text NOT NULL
|
||||||
");
|
");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue