From fb63dc9c2780aa42ff2c241730155ae6ccd1d9de Mon Sep 17 00:00:00 2001 From: Mateus Machado Luna Date: Thu, 2 Aug 2018 11:15:12 -0300 Subject: [PATCH] Fixes View Collection button not always getting proper url. --- .../tainacan-collection-subheader.vue | 178 +++++++++--------- .../components/navigation/tainacan-title.vue | 6 +- 2 files changed, 92 insertions(+), 92 deletions(-) diff --git a/src/admin/components/navigation/tainacan-collection-subheader.vue b/src/admin/components/navigation/tainacan-collection-subheader.vue index a7776ba23..7647402bc 100644 --- a/src/admin/components/navigation/tainacan-collection-subheader.vue +++ b/src/admin/components/navigation/tainacan-collection-subheader.vue @@ -13,94 +13,94 @@
-
-
- -
-
- - + :to="{ path: $routerHelper.getCollectionMetadataPath(id) }" + :aria-label="$i18n.get('label_collection_metadata')"> + + + + {{ $i18n.getFrom('metadata', 'name') }} + + +
  • + + + + + {{ $i18n.getFrom('filters', 'name') }} + +
  • +
  • + + + {{ $i18n.get('events') }} + +
  • + +
    @@ -141,7 +141,7 @@ export default { }, methods: { ...mapActions('collection', [ - 'fetchCollectionName' + 'fetchCollectionNameAndURL' ]), ...mapGetters('collection', [ 'getCollectionName', @@ -172,8 +172,8 @@ export default { switch(this.arrayRealPath[i-1]) { case 'collections': - this.fetchCollectionName(this.arrayRealPath[i]) - .then(collectionName => this.arrayViewPath.splice(i, 1, collectionName)) + this.fetchCollectionNameAndURL(this.arrayRealPath[i]) + .then(collection => this.arrayViewPath.splice(i, 1, collection.name)) .catch((error) => this.$console.error(error)); break; diff --git a/src/admin/components/navigation/tainacan-title.vue b/src/admin/components/navigation/tainacan-title.vue index 23a43771f..b75c46708 100644 --- a/src/admin/components/navigation/tainacan-title.vue +++ b/src/admin/components/navigation/tainacan-title.vue @@ -46,7 +46,7 @@ export default { }, methods: { ...mapActions('collection', [ - 'fetchCollectionName' + 'fetchCollectionNameAndURL' ]), ...mapGetters('collection', [ 'getCollectionName' @@ -79,8 +79,8 @@ export default { switch(this.arrayRealPath[i-1]) { case 'collections': - this.fetchCollectionName(this.arrayRealPath[i]) - .then(collectionName => { this.arrayViewPath.splice(i, 1, collectionName); this.entityName = collectionName; }) + this.fetchCollectionNameAndURL(this.arrayRealPath[i]) + .then(collection => { this.arrayViewPath.splice(i, 1, collection.name); this.entityName = collection.name; }) .catch((error) => this.$console.error(error)); break; case 'items':