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": {
|
||||
"version": "3.35.4",
|
||||
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.35.4.tgz",
|
||||
"integrity": "sha512-dsXjETHF2OmKtxNv66wBeFGU2qtZQnr6kp/vcNY05GWs4vcBepg54qNgOJ2Gp/gXskiGw/frrmIKGi8lJ/UDnQ==",
|
||||
"version": "3.35.5",
|
||||
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.35.5.tgz",
|
||||
"integrity": "sha512-Bi3aq35xWntI71JlywXTBBAOhuKTbB4wijKw4ClkIAFV904YDkHPIJ8N9LcZq9fvVb0VX1AEmyOFBOB2Vwsuew==",
|
||||
"requires": {
|
||||
"svg.draggable.js": "^2.2.2",
|
||||
"svg.easing.js": "^2.0.0",
|
||||
|
@ -2785,9 +2785,9 @@
|
|||
}
|
||||
},
|
||||
"css-vars-ponyfill": {
|
||||
"version": "2.4.7",
|
||||
"resolved": "https://registry.npmjs.org/css-vars-ponyfill/-/css-vars-ponyfill-2.4.7.tgz",
|
||||
"integrity": "sha512-KhG3AbiZrUpIvAQ9Oc/iBqCitmXg6MajFqNRQd9nHvlwOo8p54HTq5DFCIaAUwMGRyttJ+mBmZCRSHJpe6J9cg==",
|
||||
"version": "2.4.8",
|
||||
"resolved": "https://registry.npmjs.org/css-vars-ponyfill/-/css-vars-ponyfill-2.4.8.tgz",
|
||||
"integrity": "sha512-4/j4AX4htytYHWyHVZ2BFQ+NoCGZEcOH2h4/2mmgE4SkrFg4Xq6tGYR77DtvvUIDsaXuJN+sj41bbgauA0Gfmg==",
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.2",
|
||||
"get-css-data": "^2.0.2"
|
||||
|
@ -3688,9 +3688,9 @@
|
|||
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
|
||||
},
|
||||
"get-css-data": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/get-css-data/-/get-css-data-2.0.2.tgz",
|
||||
"integrity": "sha512-pYqg80/7u/MdBrrAQj2OIoZ08TxEnvCHyU5WFnPxxS/D0S8OpUTkqGFRzn8bO38DmtCuYBpR9VMCen78BL4jiQ=="
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/get-css-data/-/get-css-data-2.1.0.tgz",
|
||||
"integrity": "sha512-HtPrzGk8aBF9rLeQNuImcXci7YVqsMEKzVflEWaCJu25ehxyDNiZRWoSxqSFUBfma8LERqKo70t/TcaGjIsM9g=="
|
||||
},
|
||||
"get-intrinsic": {
|
||||
"version": "1.1.1",
|
||||
|
@ -4680,9 +4680,9 @@
|
|||
}
|
||||
},
|
||||
"mrmime": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.0.tgz",
|
||||
"integrity": "sha512-a70zx7zFfVO7XpnQ2IX1Myh9yY4UYvfld/dikWRnsXxbyvMcfz+u6UfgNAtH+k2QqtJuzVpv6eLTx1G2+WKZbQ==",
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz",
|
||||
"integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==",
|
||||
"dev": true
|
||||
},
|
||||
"ms": {
|
||||
|
@ -6783,9 +6783,9 @@
|
|||
}
|
||||
},
|
||||
"webpack-bundle-analyzer": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.5.0.tgz",
|
||||
"integrity": "sha512-GUMZlM3SKwS8Z+CKeIFx7CVoHn3dXFcUAjT/dcZQQmfSZGvitPfMob2ipjai7ovFFqPvTqkEZ/leL4O0YOdAYQ==",
|
||||
"version": "4.6.1",
|
||||
"resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.6.1.tgz",
|
||||
"integrity": "sha512-oKz9Oz9j3rUciLNfpGFjOb49/jEpXNmWdVH8Ls//zNcnLlQdTGXQQMsBbb/gR7Zl8WNLxVCq+0Hqbx3zv6twBw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"acorn": "^8.0.4",
|
||||
|
@ -7050,9 +7050,9 @@
|
|||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
},
|
||||
"ws": {
|
||||
"version": "7.5.7",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz",
|
||||
"integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==",
|
||||
"version": "7.5.9",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz",
|
||||
"integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==",
|
||||
"dev": true
|
||||
},
|
||||
"xml-name-validator": {
|
||||
|
|
|
@ -8,15 +8,15 @@
|
|||
"build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --progress --mode production"
|
||||
},
|
||||
"dependencies": {
|
||||
"apexcharts": "^3.35.4",
|
||||
"apexcharts": "^3.35.5",
|
||||
"axios": "^0.27.2",
|
||||
"blurhash": "^1.1.5",
|
||||
"buefy": "^0.9.21",
|
||||
"bulma": "^0.9.4",
|
||||
"conditioner-core": "^2.3.3",
|
||||
"countup.js": "^2.3.2",
|
||||
"css-vars-ponyfill": "^2.4.7",
|
||||
"floating-vue": "^1.0.0-beta.17",
|
||||
"css-vars-ponyfill": "^2.4.8",
|
||||
"floating-vue": "^1.0.0-beta.18",
|
||||
"masonry-layout": "^4.2.2",
|
||||
"moment": "^2.29.4",
|
||||
"node-sass": "^7.0.1",
|
||||
|
@ -58,7 +58,7 @@
|
|||
"vue-loader": "^15.9.8",
|
||||
"vue-template-compiler": "^2.6.14",
|
||||
"webpack": "^5.73.0",
|
||||
"webpack-bundle-analyzer": "^4.5.0",
|
||||
"webpack-bundle-analyzer": "^4.6.1",
|
||||
"webpack-cli": "^4.10.0",
|
||||
"webpack-dev-server": "^4.9.2",
|
||||
"webpack-merge": "^5.8.0"
|
||||
|
|
|
@ -40,7 +40,7 @@ class Elastic_Press {
|
|||
//activates the inclusion of the complete hierarchy of terms.
|
||||
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-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 );
|
||||
if ( $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 "";
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ abstract class Exporter {
|
|||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -379,7 +379,7 @@ class Collections extends Repository {
|
|||
|
||||
// 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 );
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ class Filters extends Repository {
|
|||
|
||||
$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 );
|
||||
|
||||
|
|
|
@ -356,7 +356,7 @@ class Items extends Repository {
|
|||
$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;
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ class Logs extends Repository {
|
|||
|
||||
$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 );
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ class Metadata_Sections extends Repository {
|
|||
|
||||
$args = $this->parse_fetch_args( $args );
|
||||
$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 );
|
||||
|
||||
|
|
|
@ -376,7 +376,7 @@ class Metadata extends Repository {
|
|||
|
||||
$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 );
|
||||
|
|
|
@ -191,7 +191,7 @@ class Taxonomies extends Repository {
|
|||
|
||||
$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 );
|
||||
|
||||
|
|
|
@ -13,7 +13,10 @@
|
|||
id="collection-page-container"
|
||||
:collection-id="collectionId"
|
||||
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>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -29,7 +32,8 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
collectionId: Number
|
||||
collectionId: Number,
|
||||
isLoadingCollectionBasics: Boolean
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -40,9 +44,16 @@ export default {
|
|||
(to.path != from.path) &&
|
||||
(this.collectionId != this.$route.params.collectionId)
|
||||
) {
|
||||
this.isLoadingCollectionBasics = true;
|
||||
this.collectionId = this.$route.params.collectionId;
|
||||
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.
|
||||
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: {
|
||||
...mapActions('collection', [
|
||||
|
@ -63,4 +80,12 @@ export default {
|
|||
}
|
||||
</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;
|
||||
|
||||
$components = ( has_filter( 'tainacan_register_web_components' ) ) ? apply_filters( 'tainacan_register_web_components' ) : [];
|
||||
|
||||
$cur_user = wp_get_current_user();
|
||||
$user_caps = array();
|
||||
$prefs = array();
|
||||
|
@ -312,7 +310,6 @@ class Admin {
|
|||
'wp_api_url' => esc_url_raw( rest_url() ) . 'wp/v2/',
|
||||
'wp_ajax_url' => admin_url( 'admin-ajax.php' ),
|
||||
'nonce' => is_user_logged_in() ? wp_create_nonce( 'wp_rest' ) : false,
|
||||
'components' => $components,
|
||||
'classes' => array(),
|
||||
'i18n' => $tainacan_admin_i18n,
|
||||
'user_caps' => $user_caps,
|
||||
|
@ -392,7 +389,10 @@ class Admin {
|
|||
|
||||
function admin_page() {
|
||||
global $TAINACAN_BASE_URL;
|
||||
|
||||
// @deprecated: use tainacan-admin-ui-options instead
|
||||
$admin_options = apply_filters('set_tainacan_admin_options', $_GET);
|
||||
$admin_options = apply_filters('tainacan-admin-ui-options', $_GET);
|
||||
$admin_options = json_encode($admin_options);
|
||||
// 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>";
|
||||
|
|
Loading…
Reference in New Issue