+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
{{ isRepositoryLevel ?
- $i18n.get('info_there_are_no_metadata_in_repository_level' ) :
- $i18n.get('info_there_are_no_metadata_to_search' ) }}
+
+ {{ isRepositoryLevel ? $i18n.get('info_there_are_no_metadata_in_repository_level' ) : $i18n.get('info_there_are_no_metadata_to_search' ) }}
+
-
-
-
-
-
-
-
-
-
-
-
- {{ advancedSearchQuery.taxquery[searchCriterion].terms }}
-
-
- {{ advancedSearchQuery.metaquery[searchCriterion].value }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -581,23 +484,16 @@
\ No newline at end of file
diff --git a/src/views/admin/js/event-bus-search.js b/src/views/admin/js/event-bus-search.js
index 47d945e81..5e9ef28c6 100644
--- a/src/views/admin/js/event-bus-search.js
+++ b/src/views/admin/js/event-bus-search.js
@@ -26,12 +26,12 @@ export default {
this.$root.$on('closeAdvancedSearch', () => {
this.$store.dispatch('search/setPage', 1);
- this.searchAdvanced({});
+ this.performAdvancedSearch({});
});
- this.$root.$on('searchAdvanced', advancedSearchQuery => {
+ this.$root.$on('performAdvancedSearch', advancedSearchQuery => {
this.$store.dispatch('search/setPage', 1);
- this.searchAdvanced(advancedSearchQuery);
+ this.performAdvancedSearch(advancedSearchQuery);
this.updateURLQueries();
});
@@ -177,7 +177,7 @@ export default {
}
},
methods: {
- searchAdvanced(data) {
+ performAdvancedSearch(data) {
this.$store.dispatch('search/set_advanced_query', data);
this.updateURLQueries();
},
@@ -385,9 +385,8 @@ export default {
this.$emit( 'isLoadingItems', false);
this.$emit( 'hasFiltered', res.hasFiltered);
- if (res.advancedSearchResults){
- this.$emit('advancedSearchResults', res.advancedSearchResults);
- }
+ if (res.hasAdvancedSearchResults)
+ this.$emit('hasAdvancedSearchResults', res.hasAdvancedSearchResults);
})
.catch(() => {
this.$emit( 'isLoadingItems', false);
diff --git a/src/views/admin/js/store/modules/collection/actions.js b/src/views/admin/js/store/modules/collection/actions.js
index 59a1d1550..3175a4703 100644
--- a/src/views/admin/js/store/modules/collection/actions.js
+++ b/src/views/admin/js/store/modules/collection/actions.js
@@ -25,7 +25,7 @@ export const fetchItems = ({ rootGetters, dispatch, commit }, { collectionId, is
// Sets a flag to inform components that an empty sate is or not due to filtering
let hasFiltered = false;
- let advancedSearchResults = false;
+ let hasAdvancedSearchResults = false;
// We mark as filtered if there is a metaquery, taxquery or a postin
if (
@@ -43,7 +43,7 @@ export const fetchItems = ({ rootGetters, dispatch, commit }, { collectionId, is
hasFiltered = true;
if (postQueries.advancedSearch)
- advancedSearchResults = postQueries.advancedSearch;
+ hasAdvancedSearchResults = postQueries.advancedSearch;
}
// Admin default tab should load publish, private and draft statuses
@@ -93,7 +93,7 @@ export const fetchItems = ({ rootGetters, dispatch, commit }, { collectionId, is
'itemsListTemplate': res.data.template,
'total': res.headers['x-wp-total'],
hasFiltered: hasFiltered,
- advancedSearchResults: advancedSearchResults,
+ hasAdvancedSearchResults: hasAdvancedSearchResults,
itemsPerPage: res.headers['x-wp-itemperpage']});
} else {
commit('setItems', items);
@@ -102,7 +102,7 @@ export const fetchItems = ({ rootGetters, dispatch, commit }, { collectionId, is
'total': res.headers['x-wp-total'],
totalPages: res.headers['x-wp-totalpages'],
hasFiltered: hasFiltered,
- advancedSearchResults: advancedSearchResults ,
+ hasAdvancedSearchResults: hasAdvancedSearchResults ,
itemsPerPage: res.headers['x-wp-itemperpage'] });
}
dispatch('search/setTotalItems', res.headers['x-wp-total'], { root: true } );
diff --git a/src/views/admin/pages/lists/items-page.vue b/src/views/admin/pages/lists/items-page.vue
index 80e1befc8..7764f0068 100644
--- a/src/views/admin/pages/lists/items-page.vue
+++ b/src/views/admin/pages/lists/items-page.vue
@@ -9,27 +9,8 @@
-
-
-
-
{{ $i18n.get('info_search_criteria') }}
-
-
-
-
-
@@ -75,9 +55,7 @@
-
+
@@ -95,15 +73,19 @@
{{ $i18n.get('advanced_search') }}
+ class="advanced-search-toggle has-text-secondary"
+ :class="openAdvancedSearch ? 'is-open' : 'is-closed'">
+ {{ $i18n.get('advanced_search') }}
+
+
+
+
@@ -478,41 +460,22 @@
@mousemove="handleMouseMoveOverList">
-
-
-
-
-
+
@@ -557,7 +520,7 @@
v-if="hasAnOpenAlert &&
isSortingByCustomMetadata &&
!showLoading &&
- ((openAdvancedSearch && advancedSearchResults) || !openAdvancedSearch)"
+ ((openAdvancedSearch && hasAdvancedSearchResults) || !openAdvancedSearch)"
class="metadata-alert">
{{
@@ -584,7 +547,7 @@
+ v-if="totalItems > 0 && (hasAdvancedSearchResults || !openAdvancedSearch)"/>
@@ -679,9 +642,7 @@
localDisplayedMetadata: [],
registeredViewModes: tainacan_plugin.registered_view_modes,
openAdvancedSearch: false,
- openFormAdvancedSearch: false,
- advancedSearchResults: false,
- isDoingSearch: false,
+ hasAdvancedSearchResults: false,
sortingMetadata: [],
isFiltersModalActive: false,
hasAnOpenModal: false,
@@ -746,7 +707,7 @@
openAdvancedSearch(newValue) {
if (newValue == false){
this.$eventBusSearch.$emit('closeAdvancedSearch');
- this.advancedSearchResults = false;
+ this.hasAdvancedSearchResults = false;
this.isFiltersModalActive = true;
} else {
this.isFiltersModalActive = false;
@@ -790,8 +751,8 @@
this.hasFiltered = hasFiltered;
});
- this.$eventBusSearch.$on('advancedSearchResults', advancedSearchResults => {
- this.advancedSearchResults = advancedSearchResults;
+ this.$eventBusSearch.$on('hasAdvancedSearchResults', hasAdvancedSearchResults => {
+ this.hasAdvancedSearchResults = hasAdvancedSearchResults;
});
this.$eventBusSearch.$on('hasToPrepareMetadataAndFilters', () => {
@@ -1327,7 +1288,7 @@
// $eventBusSearch
this.$eventBusSearch.$off('isLoadingItems');
this.$eventBusSearch.$off('hasFiltered');
- this.$eventBusSearch.$off('advancedSearchResults');
+ this.$eventBusSearch.$off('hasAdvancedSearchResults');
this.$eventBusSearch.$off('hasToPrepareMetadataAndFilters');
}
}
@@ -1373,7 +1334,7 @@
}
}
- .advanced-search-results-title {
+ .has-advanced-search-results-title {
margin-bottom: 40px;
margin: 0 var(--tainacan-one-column) 42px var(--tainacan-one-column);
@@ -1516,7 +1477,7 @@
opacity: 1;
}
- .search-area .is-pulled-right {
+ .search-area .advanced-search-toggle {
display: none;
}
}
@@ -1538,7 +1499,7 @@
padding-right: 0;
max-width: 100% !important;
}
- .is-pulled-right {
+ .advanced-search-toggle.is-closed {
position: relative;
right: 0px !important;
}
@@ -1627,15 +1588,43 @@
width: 100%;
margin-bottom: 5px;
}
- .is-pulled-right {
- position: absolute;
- right: 15px;
- top: 100%;
- }
- a {
+ a.advanced-search-toggle {
margin-left: 12px;
white-space: nowrap;
+ position: absolute;
+ transition: font-size 0.2s ease, right 0.3s ease, left 0.3s ease, top 0.4s ease;
+
+ .icon {
+ transition: opacity 0.2s ease, max-width 0.2s ease;
+ }
+
+ &.is-closed {
+ font-size: 0.75em;
+ right: 15px;
+ left: unset;
+ top: 100%;
+
+ .icon {
+ display: 0;
+ opacity: 0.0;
+ max-width: 0;
+ }
+ }
+ &.is-open {
+ font-size: 1em;
+ right: unset;
+ left: 15px;
+ top: 6.125em;
+ z-index: 9;
+
+ .icon {
+ display: inline;
+ opacity: 1.0;
+ max-width: 1.5em;
+ }
+ }
}
+
}
}
diff --git a/src/views/admin/pages/lists/metadata-page.vue b/src/views/admin/pages/lists/metadata-page.vue
index 9cf65cea0..8893eaeed 100644
--- a/src/views/admin/pages/lists/metadata-page.vue
+++ b/src/views/admin/pages/lists/metadata-page.vue
@@ -560,8 +560,6 @@ export default {
.then(() => {
if (!this.isRepositoryLevel)
this.updateMetadataOrder();
- else
- this.$root.$emit('metadatumUpdated', this.isRepositoryLevel);
})
.catch(() => {
this.$console.log("Error deleting metadatum.")
diff --git a/src/views/gutenberg-blocks/blocks/faceted-search/theme-search/theme-items-page.vue b/src/views/gutenberg-blocks/blocks/faceted-search/theme-search/theme-items-page.vue
index dede25134..00f14baa3 100644
--- a/src/views/gutenberg-blocks/blocks/faceted-search/theme-search/theme-items-page.vue
+++ b/src/views/gutenberg-blocks/blocks/faceted-search/theme-search/theme-items-page.vue
@@ -8,57 +8,6 @@
'is-fullscreen': registeredViewModes[viewMode] != undefined && registeredViewModes[viewMode].full_screen
}"
aria-live="polite">
-
-
-
-
-
-
-
-
{{ $i18n.get('info_search_criteria') }}
-
-
-
-
-
-
-
-
-
-
+
+
{{
@@ -509,7 +470,7 @@
@@ -613,9 +574,7 @@
localDisplayedMetadata: [],
registeredViewModes: tainacan_plugin.registered_view_modes,
openAdvancedSearch: false,
- openFormAdvancedSearch: false,
- advancedSearchResults: false,
- isDoingSearch: false,
+ hasAdvancedSearchResults: false,
sortingMetadata: [],
isFiltersModalActive: false,
hasAnOpenModal: false,
@@ -681,7 +640,7 @@
openAdvancedSearch(newValue){
if (newValue == false){
this.$eventBusSearch.$emit('closeAdvancedSearch');
- this.advancedSearchResults = false;
+ this.hasAdvancedSearchResults = false;
this.isFiltersModalActive = !this.startWithFiltersHidden;
} else {
this.isFiltersModalActive = false;
@@ -739,8 +698,8 @@
});
if (!this.hideAdvancedSearch) {
- this.$eventBusSearch.$on('advancedSearchResults', advancedSearchResults => {
- this.advancedSearchResults = advancedSearchResults;
+ this.$eventBusSearch.$on('hasAdvancedSearchResults', hasAdvancedSearchResults => {
+ this.hasAdvancedSearchResults = hasAdvancedSearchResults;
});
if (this.$route.query && this.$route.query.advancedSearch) {
@@ -1209,7 +1168,7 @@
this.$eventBusSearch.$off('isLoadingItems');
this.$eventBusSearch.$off('hasFiltered');
if (!this.hideAdvancedSearch)
- this.$eventBusSearch.$off('advancedSearchResults');
+ this.$eventBusSearch.$off('hasAdvancedSearchResults');
this.$eventBusSearch.$off('hasToPrepareMetadataAndFilters');
},
@@ -1279,7 +1238,7 @@
}
}
- .advanced-search-results-title {
+ .has-advanced-search-results-title {
margin-bottom: 40px;
margin: 0 var(--tainacan-one-column) 42px var(--tainacan-one-column);