Merge branch 'release/0.19' of github.com:tainacan/tainacan into release/0.19
This commit is contained in:
commit
4eaab2cb1b
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"projectId": "tubzok",
|
|
||||||
"videoRecording": false,
|
|
||||||
"viewportWidth": 1280,
|
|
||||||
"viewportHeight": 720
|
|
||||||
}
|
|
|
@ -0,0 +1 @@
|
||||||
|
You can find all of Tainacan documentation in our Wiki: [https://wiki.tainacan.org](https://wiki.tainacan.org)
|
|
@ -2023,9 +2023,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"apexcharts": {
|
"apexcharts": {
|
||||||
"version": "3.35.4",
|
"version": "3.35.5",
|
||||||
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.35.4.tgz",
|
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.35.5.tgz",
|
||||||
"integrity": "sha512-dsXjETHF2OmKtxNv66wBeFGU2qtZQnr6kp/vcNY05GWs4vcBepg54qNgOJ2Gp/gXskiGw/frrmIKGi8lJ/UDnQ==",
|
"integrity": "sha512-Bi3aq35xWntI71JlywXTBBAOhuKTbB4wijKw4ClkIAFV904YDkHPIJ8N9LcZq9fvVb0VX1AEmyOFBOB2Vwsuew==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"svg.draggable.js": "^2.2.2",
|
"svg.draggable.js": "^2.2.2",
|
||||||
"svg.easing.js": "^2.0.0",
|
"svg.easing.js": "^2.0.0",
|
||||||
|
@ -2785,9 +2785,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"css-vars-ponyfill": {
|
"css-vars-ponyfill": {
|
||||||
"version": "2.4.7",
|
"version": "2.4.8",
|
||||||
"resolved": "https://registry.npmjs.org/css-vars-ponyfill/-/css-vars-ponyfill-2.4.7.tgz",
|
"resolved": "https://registry.npmjs.org/css-vars-ponyfill/-/css-vars-ponyfill-2.4.8.tgz",
|
||||||
"integrity": "sha512-KhG3AbiZrUpIvAQ9Oc/iBqCitmXg6MajFqNRQd9nHvlwOo8p54HTq5DFCIaAUwMGRyttJ+mBmZCRSHJpe6J9cg==",
|
"integrity": "sha512-4/j4AX4htytYHWyHVZ2BFQ+NoCGZEcOH2h4/2mmgE4SkrFg4Xq6tGYR77DtvvUIDsaXuJN+sj41bbgauA0Gfmg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^1.0.2",
|
"balanced-match": "^1.0.2",
|
||||||
"get-css-data": "^2.0.2"
|
"get-css-data": "^2.0.2"
|
||||||
|
@ -3688,9 +3688,9 @@
|
||||||
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
|
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
|
||||||
},
|
},
|
||||||
"get-css-data": {
|
"get-css-data": {
|
||||||
"version": "2.0.2",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/get-css-data/-/get-css-data-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/get-css-data/-/get-css-data-2.1.0.tgz",
|
||||||
"integrity": "sha512-pYqg80/7u/MdBrrAQj2OIoZ08TxEnvCHyU5WFnPxxS/D0S8OpUTkqGFRzn8bO38DmtCuYBpR9VMCen78BL4jiQ=="
|
"integrity": "sha512-HtPrzGk8aBF9rLeQNuImcXci7YVqsMEKzVflEWaCJu25ehxyDNiZRWoSxqSFUBfma8LERqKo70t/TcaGjIsM9g=="
|
||||||
},
|
},
|
||||||
"get-intrinsic": {
|
"get-intrinsic": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
|
@ -4680,9 +4680,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mrmime": {
|
"mrmime": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz",
|
||||||
"integrity": "sha512-a70zx7zFfVO7XpnQ2IX1Myh9yY4UYvfld/dikWRnsXxbyvMcfz+u6UfgNAtH+k2QqtJuzVpv6eLTx1G2+WKZbQ==",
|
"integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
|
@ -6783,9 +6783,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"webpack-bundle-analyzer": {
|
"webpack-bundle-analyzer": {
|
||||||
"version": "4.5.0",
|
"version": "4.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.6.1.tgz",
|
||||||
"integrity": "sha512-GUMZlM3SKwS8Z+CKeIFx7CVoHn3dXFcUAjT/dcZQQmfSZGvitPfMob2ipjai7ovFFqPvTqkEZ/leL4O0YOdAYQ==",
|
"integrity": "sha512-oKz9Oz9j3rUciLNfpGFjOb49/jEpXNmWdVH8Ls//zNcnLlQdTGXQQMsBbb/gR7Zl8WNLxVCq+0Hqbx3zv6twBw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"acorn": "^8.0.4",
|
"acorn": "^8.0.4",
|
||||||
|
@ -7050,9 +7050,9 @@
|
||||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||||
},
|
},
|
||||||
"ws": {
|
"ws": {
|
||||||
"version": "7.5.7",
|
"version": "7.5.9",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz",
|
||||||
"integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==",
|
"integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"xml-name-validator": {
|
"xml-name-validator": {
|
||||||
|
|
|
@ -8,15 +8,15 @@
|
||||||
"build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --progress --mode production"
|
"build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --progress --mode production"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"apexcharts": "^3.35.4",
|
"apexcharts": "^3.35.5",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"blurhash": "^1.1.5",
|
"blurhash": "^1.1.5",
|
||||||
"buefy": "^0.9.21",
|
"buefy": "^0.9.21",
|
||||||
"bulma": "^0.9.4",
|
"bulma": "^0.9.4",
|
||||||
"conditioner-core": "^2.3.3",
|
"conditioner-core": "^2.3.3",
|
||||||
"countup.js": "^2.3.2",
|
"countup.js": "^2.3.2",
|
||||||
"css-vars-ponyfill": "^2.4.7",
|
"css-vars-ponyfill": "^2.4.8",
|
||||||
"floating-vue": "^1.0.0-beta.17",
|
"floating-vue": "^1.0.0-beta.18",
|
||||||
"masonry-layout": "^4.2.2",
|
"masonry-layout": "^4.2.2",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"node-sass": "^7.0.1",
|
"node-sass": "^7.0.1",
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
"vue-loader": "^15.9.8",
|
"vue-loader": "^15.9.8",
|
||||||
"vue-template-compiler": "^2.6.14",
|
"vue-template-compiler": "^2.6.14",
|
||||||
"webpack": "^5.73.0",
|
"webpack": "^5.73.0",
|
||||||
"webpack-bundle-analyzer": "^4.5.0",
|
"webpack-bundle-analyzer": "^4.6.1",
|
||||||
"webpack-cli": "^4.10.0",
|
"webpack-cli": "^4.10.0",
|
||||||
"webpack-dev-server": "^4.9.2",
|
"webpack-dev-server": "^4.9.2",
|
||||||
"webpack-merge": "^5.8.0"
|
"webpack-merge": "^5.8.0"
|
||||||
|
|
|
@ -40,7 +40,7 @@ class Elastic_Press {
|
||||||
//activates the inclusion of the complete hierarchy of terms.
|
//activates the inclusion of the complete hierarchy of terms.
|
||||||
add_filter('ep_sync_terms_allow_hierarchy', '__return_true');
|
add_filter('ep_sync_terms_allow_hierarchy', '__return_true');
|
||||||
|
|
||||||
add_filter('tainacan_fetch_args', [$this, 'filter_args'], 10, 2);
|
add_filter('tainacan-fetch-args', [$this, 'filter_args'], 10, 2);
|
||||||
add_filter('tainacan-api-items-filters-response', function($filters) { return $this->last_aggregations; });
|
add_filter('tainacan-api-items-filters-response', function($filters) { return $this->last_aggregations; });
|
||||||
|
|
||||||
add_filter('tainacan-fetch-all-metadatum-values', [$this, 'fetch_all_metadatum_values'], 10, 3);
|
add_filter('tainacan-fetch-all-metadatum-values', [$this, 'fetch_all_metadatum_values'], 10, 3);
|
||||||
|
|
|
@ -162,7 +162,7 @@ class CSV extends Exporter {
|
||||||
$last_id = get_post_meta( $item_id, '_user_edit_lastr', true );
|
$last_id = get_post_meta( $item_id, '_user_edit_lastr', true );
|
||||||
if ( $last_id ) {
|
if ( $last_id ) {
|
||||||
$last_user = get_userdata( $last_id );
|
$last_user = get_userdata( $last_id );
|
||||||
return apply_filters( 'the_modified_author', $last_user->display_name );
|
return apply_filters( 'tainacan-the-modified-author', $last_user->display_name );
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,7 +250,7 @@ abstract class Exporter {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get_step_length_items() {
|
public function get_step_length_items() {
|
||||||
return apply_filters('exporter_step_length_items', 20, $this->get_current_step());
|
return apply_filters('tainacan-exporter-step-length-items', 20, $this->get_current_step());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function set_current_collection_item($value) {
|
public function set_current_collection_item($value) {
|
||||||
|
|
|
@ -379,7 +379,7 @@ class Collections extends Repository {
|
||||||
|
|
||||||
// TODO: Pegar coleções registradas via código
|
// TODO: Pegar coleções registradas via código
|
||||||
|
|
||||||
$args = apply_filters( 'tainacan_fetch_args', $args, 'collections' );
|
$args = apply_filters( 'tainacan-fetch-args', $args, 'collections' );
|
||||||
|
|
||||||
$wp_query = new \WP_Query( $args );
|
$wp_query = new \WP_Query( $args );
|
||||||
|
|
||||||
|
|
|
@ -242,7 +242,7 @@ class Filters extends Repository {
|
||||||
|
|
||||||
$args['post_type'] = Entities\Filter::get_post_type();
|
$args['post_type'] = Entities\Filter::get_post_type();
|
||||||
|
|
||||||
$args = apply_filters( 'tainacan_fetch_args', $args, 'filters' );
|
$args = apply_filters( 'tainacan-fetch-args', $args, 'filters' );
|
||||||
|
|
||||||
$wp_query = new \WP_Query( $args );
|
$wp_query = new \WP_Query( $args );
|
||||||
|
|
||||||
|
|
|
@ -356,7 +356,7 @@ class Items extends Repository {
|
||||||
$args = $this->parse_relationship_metaquery($args);
|
$args = $this->parse_relationship_metaquery($args);
|
||||||
}
|
}
|
||||||
|
|
||||||
$args = apply_filters( 'tainacan_fetch_args', $args, 'items' );
|
$args = apply_filters( 'tainacan-fetch-args', $args, 'items' );
|
||||||
|
|
||||||
$should_filter = is_user_logged_in() && sizeof($cpt) > 1;
|
$should_filter = is_user_logged_in() && sizeof($cpt) > 1;
|
||||||
|
|
||||||
|
|
|
@ -214,7 +214,7 @@ class Logs extends Repository {
|
||||||
|
|
||||||
$args['post_type'] = Entities\Log::get_post_type();
|
$args['post_type'] = Entities\Log::get_post_type();
|
||||||
|
|
||||||
$args = apply_filters( 'tainacan_fetch_args', $args, 'logs' );
|
$args = apply_filters( 'tainacan-fetch-args', $args, 'logs' );
|
||||||
|
|
||||||
$wp_query = new \WP_Query( $args );
|
$wp_query = new \WP_Query( $args );
|
||||||
|
|
||||||
|
|
|
@ -199,7 +199,7 @@ class Metadata_Sections extends Repository {
|
||||||
|
|
||||||
$args = $this->parse_fetch_args( $args );
|
$args = $this->parse_fetch_args( $args );
|
||||||
$args['post_type'] = Entities\Metadata_Section::get_post_type();
|
$args['post_type'] = Entities\Metadata_Section::get_post_type();
|
||||||
$args = apply_filters( 'tainacan_fetch_args', $args, 'metadata-section' );
|
$args = apply_filters( 'tainacan-fetch-args', $args, 'metadata-section' );
|
||||||
|
|
||||||
$wp_query = new \WP_Query( $args );
|
$wp_query = new \WP_Query( $args );
|
||||||
|
|
||||||
|
|
|
@ -376,7 +376,7 @@ class Metadata extends Repository {
|
||||||
|
|
||||||
$args['post_type'] = Entities\Metadatum::get_post_type();
|
$args['post_type'] = Entities\Metadatum::get_post_type();
|
||||||
|
|
||||||
$args = apply_filters( 'tainacan_fetch_args', $args, 'metadata' );
|
$args = apply_filters( 'tainacan-fetch-args', $args, 'metadata' );
|
||||||
|
|
||||||
|
|
||||||
$wp_query = new \WP_Query( $args );
|
$wp_query = new \WP_Query( $args );
|
||||||
|
|
|
@ -191,7 +191,7 @@ class Taxonomies extends Repository {
|
||||||
|
|
||||||
$args['post_type'] = Entities\Taxonomy::get_post_type();
|
$args['post_type'] = Entities\Taxonomy::get_post_type();
|
||||||
|
|
||||||
$args = apply_filters( 'tainacan_fetch_args', $args, 'taxonomies' );
|
$args = apply_filters( 'tainacan-fetch-args', $args, 'taxonomies' );
|
||||||
|
|
||||||
$wp_query = new \WP_Query( $args );
|
$wp_query = new \WP_Query( $args );
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,10 @@
|
||||||
id="collection-page-container"
|
id="collection-page-container"
|
||||||
:collection-id="collectionId"
|
:collection-id="collectionId"
|
||||||
class="page-container"
|
class="page-container"
|
||||||
:class="{ 'page-container-small': !$adminOptions.hideRepositorySubheader && !$adminOptions.hideCollectionSubheader }"/>
|
:class="{
|
||||||
|
'page-container-small': !$adminOptions.hideRepositorySubheader && !$adminOptions.hideCollectionSubheader,
|
||||||
|
'is-loading-collection-basics': isLoadingCollectionBasics
|
||||||
|
}"/>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -29,7 +32,8 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
collectionId: Number
|
collectionId: Number,
|
||||||
|
isLoadingCollectionBasics: Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -40,9 +44,16 @@ export default {
|
||||||
(to.path != from.path) &&
|
(to.path != from.path) &&
|
||||||
(this.collectionId != this.$route.params.collectionId)
|
(this.collectionId != this.$route.params.collectionId)
|
||||||
) {
|
) {
|
||||||
|
this.isLoadingCollectionBasics = true;
|
||||||
this.collectionId = this.$route.params.collectionId;
|
this.collectionId = this.$route.params.collectionId;
|
||||||
this.fetchCollectionBasics({ collectionId: this.collectionId, isContextEdit: true })
|
this.fetchCollectionBasics({ collectionId: this.collectionId, isContextEdit: true })
|
||||||
.catch((error) => this.$console.error(error));
|
.then(() => {
|
||||||
|
this.isLoadingCollectionBasics = false;
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
this.$console.error(error);
|
||||||
|
this.isLoadingCollectionBasics = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -53,7 +64,13 @@ export default {
|
||||||
|
|
||||||
// Loads to store basic collection info such as name, url, current_user_can_edit... etc.
|
// Loads to store basic collection info such as name, url, current_user_can_edit... etc.
|
||||||
this.fetchCollectionBasics({ collectionId: this.collectionId, isContextEdit: true })
|
this.fetchCollectionBasics({ collectionId: this.collectionId, isContextEdit: true })
|
||||||
.catch((error) => this.$console.error(error));
|
.then(() => {
|
||||||
|
this.isLoadingCollectionBasics = false;
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
this.$console.error(error);
|
||||||
|
this.isLoadingCollectionBasics = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions('collection', [
|
...mapActions('collection', [
|
||||||
|
@ -63,4 +80,12 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
#collection-page-container.is-loading-collection-basics {
|
||||||
|
.section {
|
||||||
|
display: none; // Prevents info as "No permissions to see this" to appear before we finished loading.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -294,8 +294,6 @@ class Admin {
|
||||||
|
|
||||||
$tainacan_admin_i18n['entities_labels'] = $entities_labels;
|
$tainacan_admin_i18n['entities_labels'] = $entities_labels;
|
||||||
|
|
||||||
$components = ( has_filter( 'tainacan_register_web_components' ) ) ? apply_filters( 'tainacan_register_web_components' ) : [];
|
|
||||||
|
|
||||||
$cur_user = wp_get_current_user();
|
$cur_user = wp_get_current_user();
|
||||||
$user_caps = array();
|
$user_caps = array();
|
||||||
$prefs = array();
|
$prefs = array();
|
||||||
|
@ -312,7 +310,6 @@ class Admin {
|
||||||
'wp_api_url' => esc_url_raw( rest_url() ) . 'wp/v2/',
|
'wp_api_url' => esc_url_raw( rest_url() ) . 'wp/v2/',
|
||||||
'wp_ajax_url' => admin_url( 'admin-ajax.php' ),
|
'wp_ajax_url' => admin_url( 'admin-ajax.php' ),
|
||||||
'nonce' => is_user_logged_in() ? wp_create_nonce( 'wp_rest' ) : false,
|
'nonce' => is_user_logged_in() ? wp_create_nonce( 'wp_rest' ) : false,
|
||||||
'components' => $components,
|
|
||||||
'classes' => array(),
|
'classes' => array(),
|
||||||
'i18n' => $tainacan_admin_i18n,
|
'i18n' => $tainacan_admin_i18n,
|
||||||
'user_caps' => $user_caps,
|
'user_caps' => $user_caps,
|
||||||
|
@ -392,7 +389,10 @@ class Admin {
|
||||||
|
|
||||||
function admin_page() {
|
function admin_page() {
|
||||||
global $TAINACAN_BASE_URL;
|
global $TAINACAN_BASE_URL;
|
||||||
|
|
||||||
|
// @deprecated: use tainacan-admin-ui-options instead
|
||||||
$admin_options = apply_filters('set_tainacan_admin_options', $_GET);
|
$admin_options = apply_filters('set_tainacan_admin_options', $_GET);
|
||||||
|
$admin_options = apply_filters('tainacan-admin-ui-options', $_GET);
|
||||||
$admin_options = json_encode($admin_options);
|
$admin_options = json_encode($admin_options);
|
||||||
// TODO move it to a separate file and start the Vue project
|
// TODO move it to a separate file and start the Vue project
|
||||||
echo "<div id='tainacan-admin-app' data-module='admin' data-options='$admin_options'></div>";
|
echo "<div id='tainacan-admin-app' data-module='admin' data-options='$admin_options'></div>";
|
||||||
|
|
Loading…
Reference in New Issue