diff --git a/src/admin/class-tainacan-admin.php b/src/admin/class-tainacan-admin.php index 5a6955a98..0ab34ebe2 100644 --- a/src/admin/class-tainacan-admin.php +++ b/src/admin/class-tainacan-admin.php @@ -134,7 +134,7 @@ class Admin { * Also used by DevInterface */ function get_admin_js_localization_params() { - global $TAINACAN_BASE_URL; + global $TAINACAN_BASE_URL, $TAINACAN_API_MAX_ITEMS_PER_PAGE; $Tainacan_Collections = \Tainacan\Repositories\Collections::get_instance(); $Tainacan_Metadata = \Tainacan\Repositories\Metadata::get_instance(); @@ -171,8 +171,8 @@ class Admin { } $settings = [ - 'root' => esc_url_raw( rest_url() ) . 'tainacan/v2', - 'root_wp_api' => esc_url_raw( rest_url() ) . 'wp/v2/', + 'tainacan_api_url' => esc_url_raw( rest_url() ) . 'tainacan/v2', + 'wp_api_url' => esc_url_raw( rest_url() ) . 'wp/v2/', 'wp_ajax_url' => admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'wp_rest' ), 'components' => $components, @@ -184,9 +184,10 @@ class Admin { 'theme_collection_list_url' => get_post_type_archive_link( 'tainacan-collection' ), 'custom_header_support' => get_theme_support('custom-header'), 'registered_view_modes' => \Tainacan\Theme_Helper::get_instance()->get_registered_view_modes(), - 'exposer_mapper_param' => \Tainacan\Exposers\Exposers::MAPPER_PARAM, - 'exposer_type_param' => \Tainacan\Exposers\Exposers::TYPE_PARAM, - 'repository_name' => get_bloginfo('name') + 'exposer_mapper_param' => \Tainacan\Mappers_Handler::MAPPER_PARAM, + 'exposer_type_param' => \Tainacan\Exposers_Handler::TYPE_PARAM, + 'repository_name' => get_bloginfo('name'), + 'api_max_items_per_page' => $TAINACAN_API_MAX_ITEMS_PER_PAGE, ]; $maps = [ diff --git a/src/admin/components/edition/exporter-edition-form.vue b/src/admin/components/edition/exporter-edition-form.vue index cb165d415..11caa4af8 100644 --- a/src/admin/components/edition/exporter-edition-form.vue +++ b/src/admin/components/edition/exporter-edition-form.vue @@ -35,17 +35,19 @@ Object.keys(exporterSession.mapping_accept).length && exporterSession.mapping_accept.any" :label="$i18n.get('mapping')"> -
+ + + |
---|
+ |
@@ -445,6 +445,20 @@
@@ -744,8 +758,10 @@ import FiltersTagsList from '../../components/search/filters-tags-list.vue'; import FiltersItemsList from '../../components/search/filters-items-list.vue'; import Pagination from '../../components/search/pagination.vue' + import SkeletonItemsList from '../../components/search/skeleton-items-list.vue' import AdvancedSearch from '../../components/advanced-search/advanced-search.vue'; import AvailableImportersModal from '../../components/other/available-importers-modal.vue'; + import ExposersModal from '../../components/other/exposers-modal.vue'; import CollectionsModal from '../../components/other/collections-modal.vue'; import { mapActions, mapGetters } from 'vuex'; @@ -842,8 +858,10 @@ ItemsList, FiltersTagsList, FiltersItemsList, + SkeletonItemsList, Pagination, AdvancedSearch, + ExposersModal }, watch: { displayedMetadata() { @@ -915,6 +933,17 @@ } }); }, + openExposersModal() { + this.$modal.open({ + parent: this, + component: ExposersModal, + hasModalCard: true, + props: { + collectionId: this.collectionId, + totalItems: this.totalItems + } + }) + }, onOpenCollectionsModal() { this.$modal.open({ parent: this, diff --git a/src/admin/pages/lists/term-items-page.vue b/src/admin/pages/lists/term-items-page.vue index 4d665f633..736a0392b 100644 --- a/src/admin/pages/lists/term-items-page.vue +++ b/src/admin/pages/lists/term-items-page.vue @@ -73,10 +73,10 @@