First updates to support breaking changes on Vue Router and Vuex, at least in the admin build. #794.
This commit is contained in:
parent
d3491e91cf
commit
b3e834e73c
|
@ -1939,6 +1939,11 @@
|
||||||
"@vue/shared": "3.3.4"
|
"@vue/shared": "3.3.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@vue/devtools-api": {
|
||||||
|
"version": "6.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.5.0.tgz",
|
||||||
|
"integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q=="
|
||||||
|
},
|
||||||
"@vue/reactivity": {
|
"@vue/reactivity": {
|
||||||
"version": "3.3.4",
|
"version": "3.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.4.tgz",
|
||||||
|
@ -6879,9 +6884,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vue-router": {
|
"vue-router": {
|
||||||
"version": "3.6.5",
|
"version": "4.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz",
|
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.2.4.tgz",
|
||||||
"integrity": "sha512-VYXZQLtjuvKxxcshuRAwjHnciqZVoXAjTjcqBTz4rKc8qih9g9pI3hbDjmqXaHdgL3v8pV6P8Z335XvHzESxLQ=="
|
"integrity": "sha512-9PISkmaCO02OzPVOMq2w82ilty6+xJmQrarYZDkjZBfl4RvYAlt4PKnEX21oW4KTtWfa9OuO/b3qk1Od3AEdCQ==",
|
||||||
|
"requires": {
|
||||||
|
"@vue/devtools-api": "^6.5.0"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"vue-the-mask": {
|
"vue-the-mask": {
|
||||||
"version": "0.11.1",
|
"version": "0.11.1",
|
||||||
|
@ -6902,9 +6910,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vuex": {
|
"vuex": {
|
||||||
"version": "3.6.2",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz",
|
||||||
"integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw=="
|
"integrity": "sha512-hmV6UerDrPcgbSy9ORAtNXDr9M4wlNP4pEFKye4ujJF8oqgFFuxDCdOLS3eNoRTtq5O3hoBDh9Doj1bQMYHRbQ==",
|
||||||
|
"requires": {
|
||||||
|
"@vue/devtools-api": "^6.0.0-beta.11"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"watchpack": {
|
"watchpack": {
|
||||||
"version": "2.4.0",
|
"version": "2.4.0",
|
||||||
|
|
|
@ -32,11 +32,11 @@
|
||||||
"vue-apexcharts": "^1.6.2",
|
"vue-apexcharts": "^1.6.2",
|
||||||
"vue-blurhash": "^0.1.4",
|
"vue-blurhash": "^0.1.4",
|
||||||
"vue-countup-v2": "^4.0.0",
|
"vue-countup-v2": "^4.0.0",
|
||||||
"vue-router": "^3.6.5",
|
"vue-router": "^4.2.4",
|
||||||
"vue-the-mask": "^0.11.1",
|
"vue-the-mask": "^0.11.1",
|
||||||
"vue2-leaflet": "^2.7.1",
|
"vue2-leaflet": "^2.7.1",
|
||||||
"vuedraggable": "^2.24.3",
|
"vuedraggable": "^2.24.3",
|
||||||
"vuex": "^3.6.2"
|
"vuex": "^4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.21.0",
|
"@babel/core": "^7.21.0",
|
||||||
|
|
|
@ -121,7 +121,6 @@
|
||||||
</b-select>
|
</b-select>
|
||||||
<router-link
|
<router-link
|
||||||
v-if="$userCaps.hasCapability('tnc_rep_edit_collections')"
|
v-if="$userCaps.hasCapability('tnc_rep_edit_collections')"
|
||||||
tag="a"
|
|
||||||
style="font-size: 0.875em;"
|
style="font-size: 0.875em;"
|
||||||
class="add-link"
|
class="add-link"
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath(), query: { fromImporter: true }}">
|
:to="{ path: $routerHelper.getNewCollectionPath(), query: { fromImporter: true }}">
|
||||||
|
|
|
@ -11,16 +11,12 @@
|
||||||
<hr>
|
<hr>
|
||||||
<nav class="breadcrumbs">
|
<nav class="breadcrumbs">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getCollectionsPath()">{{ $i18n.get('repository') }}</router-link> >
|
:to="$routerHelper.getCollectionsPath()">{{ $i18n.get('repository') }}</router-link> >
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getAvailableImportersPath()">{{ $i18n.get('importers') }}</router-link> >
|
:to="$routerHelper.getAvailableImportersPath()">{{ $i18n.get('importers') }}</router-link> >
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getImporterPath(importerType, sessionId)">{{ importerType != undefined ? (importerName != undefined ? importerName :importerType) : $i18n.get('title_importer_page') }}</router-link> >
|
:to="$routerHelper.getImporterPath(importerType, sessionId)">{{ importerType != undefined ? (importerName != undefined ? importerName :importerType) : $i18n.get('title_importer_page') }}</router-link> >
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getImporterMappingPath(importerType, sessionId, collectionId)">{{ $i18n.get('label_metadata_mapping') }}</router-link>
|
:to="$routerHelper.getImporterMappingPath(importerType, sessionId, collectionId)">{{ $i18n.get('label_metadata_mapping') }}</router-link>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
class="new-collection-menu">
|
class="new-collection-menu">
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getNewCollectionPath()"
|
:to="$routerHelper.getNewCollectionPath()"
|
||||||
class="first-card">
|
class="first-card">
|
||||||
<div class="list-metadata">
|
<div class="list-metadata">
|
||||||
|
@ -20,7 +19,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||||
:aria-label="$i18n.get('label_collection_items')">
|
:aria-label="$i18n.get('label_collection_items')">
|
||||||
<span
|
<span
|
||||||
|
@ -38,7 +36,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||||
:aria-label="$i18n.get('label_collection_metadata')">
|
:aria-label="$i18n.get('label_collection_metadata')">
|
||||||
<span
|
<span
|
||||||
|
@ -56,7 +53,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||||
:aria-label="$i18n.get('label_collection_filters')">
|
:aria-label="$i18n.get('label_collection_filters')">
|
||||||
<span
|
<span
|
||||||
|
@ -76,7 +72,6 @@
|
||||||
<ul v-if="collections.length > 0 && !isLoading">
|
<ul v-if="collections.length > 0 && !isLoading">
|
||||||
<li v-if="!$adminOptions.hideHomeCollectionCreateNewButton && $userCaps.hasCapability('tnc_rep_edit_collections')">
|
<li v-if="!$adminOptions.hideHomeCollectionCreateNewButton && $userCaps.hasCapability('tnc_rep_edit_collections')">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getNewCollectionPath()"
|
:to="$routerHelper.getNewCollectionPath()"
|
||||||
class="tainacan-card new-card">
|
class="tainacan-card new-card">
|
||||||
<div class="list-metadata">
|
<div class="list-metadata">
|
||||||
|
@ -88,7 +83,6 @@
|
||||||
<ul class="menu-list">
|
<ul class="menu-list">
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||||
:aria-label="$i18n.get('label_collection_items')">
|
:aria-label="$i18n.get('label_collection_items')">
|
||||||
<span
|
<span
|
||||||
|
@ -105,7 +99,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||||
:aria-label="$i18n.get('label_collection_metadata')">
|
:aria-label="$i18n.get('label_collection_metadata')">
|
||||||
<span
|
<span
|
||||||
|
@ -122,7 +115,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||||
:aria-label="$i18n.get('label_collection_filters')">
|
:aria-label="$i18n.get('label_collection_filters')">
|
||||||
<span
|
<span
|
||||||
|
@ -148,7 +140,6 @@
|
||||||
<ul class="menu-list">
|
<ul class="menu-list">
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getCollectionItemsPath(collection.id, '') }"
|
:to="{ path: $routerHelper.getCollectionItemsPath(collection.id, '') }"
|
||||||
:aria-label="$i18n.get('label_collection_items')">
|
:aria-label="$i18n.get('label_collection_items')">
|
||||||
<span
|
<span
|
||||||
|
@ -165,7 +156,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="collection.current_user_can_edit_items && $adminOptions.showHomeCollectionCreateItemButton">
|
<li v-if="collection.current_user_can_edit_items && $adminOptions.showHomeCollectionCreateItemButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getNewItemPath(collection.id) }"
|
:to="{ path: $routerHelper.getNewItemPath(collection.id) }"
|
||||||
:aria-label="$i18n.get('add_one_item')">
|
:aria-label="$i18n.get('add_one_item')">
|
||||||
<span
|
<span
|
||||||
|
@ -182,7 +172,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="collection.current_user_can_edit && !$adminOptions.hideHomeCollectionSettingsButton">
|
<li v-if="collection.current_user_can_edit && !$adminOptions.hideHomeCollectionSettingsButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getCollectionEditPath(collection.id) }"
|
:to="{ path: $routerHelper.getCollectionEditPath(collection.id) }"
|
||||||
:aria-label="$i18n.get('label_settings')">
|
:aria-label="$i18n.get('label_settings')">
|
||||||
<span
|
<span
|
||||||
|
@ -199,7 +188,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="collection.current_user_can_edit_metadata && !$adminOptions.hideHomeCollectionMetadataButton">
|
<li v-if="collection.current_user_can_edit_metadata && !$adminOptions.hideHomeCollectionMetadataButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getCollectionMetadataPath(collection.id) }"
|
:to="{ path: $routerHelper.getCollectionMetadataPath(collection.id) }"
|
||||||
:aria-label="$i18n.get('label_collection_metadata')">
|
:aria-label="$i18n.get('label_collection_metadata')">
|
||||||
<span
|
<span
|
||||||
|
@ -216,7 +204,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="collection.current_user_can_edit_filters && !$adminOptions.hideHomeCollectionFiltersButton">
|
<li v-if="collection.current_user_can_edit_filters && !$adminOptions.hideHomeCollectionFiltersButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getCollectionFiltersPath(collection.id) }"
|
:to="{ path: $routerHelper.getCollectionFiltersPath(collection.id) }"
|
||||||
:aria-label="$i18n.get('label_collection_filters')">
|
:aria-label="$i18n.get('label_collection_filters')">
|
||||||
<span
|
<span
|
||||||
|
@ -233,7 +220,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="$userCaps.hasCapability('tnc_rep_read_logs') && !$adminOptions.hideHomeCollectionActivitiesButton">
|
<li v-if="$userCaps.hasCapability('tnc_rep_read_logs') && !$adminOptions.hideHomeCollectionActivitiesButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getCollectionActivitiesPath(collection.id) }"
|
:to="{ path: $routerHelper.getCollectionActivitiesPath(collection.id) }"
|
||||||
:aria-label="$i18n.get('label_collection_activities')">
|
:aria-label="$i18n.get('label_collection_activities')">
|
||||||
<span
|
<span
|
||||||
|
@ -266,7 +252,6 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getCollectionPath(collection.id)"
|
:to="$routerHelper.getCollectionPath(collection.id)"
|
||||||
class="card-body">
|
class="card-body">
|
||||||
<img
|
<img
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
v-if="!$adminOptions.hidePrimaryMenuRepositoryButton"
|
v-if="!$adminOptions.hidePrimaryMenuRepositoryButton"
|
||||||
class="repository-label">
|
class="repository-label">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getCollectionsPath()"
|
:to="$routerHelper.getCollectionsPath()"
|
||||||
:aria-label="$i18n.get('repository')">
|
:aria-label="$i18n.get('repository')">
|
||||||
<span v-if="!isMenuCompressed">{{ $i18n.get('repository') }}</span>
|
<span v-if="!isMenuCompressed">{{ $i18n.get('repository') }}</span>
|
||||||
|
@ -25,7 +24,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="!$adminOptions.hidePrimaryMenuCollectionsButton">
|
<li v-if="!$adminOptions.hidePrimaryMenuCollectionsButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getCollectionsPath()"
|
:to="$routerHelper.getCollectionsPath()"
|
||||||
:class="activeRoute == 'CollectionsPage' || $route.params.collectionId != undefined ? 'is-active':''">
|
:class="activeRoute == 'CollectionsPage' || $route.params.collectionId != undefined ? 'is-active':''">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -36,7 +34,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="!$adminOptions.hidePrimaryMenuItemsButton">
|
<li v-if="!$adminOptions.hidePrimaryMenuItemsButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getItemsPath()"
|
:to="$routerHelper.getItemsPath()"
|
||||||
:class="activeRoute == 'ItemsPage' ? 'is-active':''">
|
:class="activeRoute == 'ItemsPage' ? 'is-active':''">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -48,7 +45,6 @@
|
||||||
<li class="separator"/>
|
<li class="separator"/>
|
||||||
<li v-if="$userCaps.hasCapability('tnc_rep_edit_metadata') && !$adminOptions.hidePrimaryMenuMetadataButton">
|
<li v-if="$userCaps.hasCapability('tnc_rep_edit_metadata') && !$adminOptions.hidePrimaryMenuMetadataButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/metadata"
|
to="/metadata"
|
||||||
:class="activeRoute == 'MetadataPage' ? 'is-active':''">
|
:class="activeRoute == 'MetadataPage' ? 'is-active':''">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -59,7 +55,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="$userCaps.hasCapability('tnc_rep_edit_filters') && !$adminOptions.hidePrimaryMenuFiltersButton">
|
<li v-if="$userCaps.hasCapability('tnc_rep_edit_filters') && !$adminOptions.hidePrimaryMenuFiltersButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/filters"
|
to="/filters"
|
||||||
:class="activeRoute == 'FiltersPage' ? 'is-active':''">
|
:class="activeRoute == 'FiltersPage' ? 'is-active':''">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -70,7 +65,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="!$adminOptions.hidePrimaryMenuTaxonomiesButton">
|
<li v-if="!$adminOptions.hidePrimaryMenuTaxonomiesButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/taxonomies"
|
to="/taxonomies"
|
||||||
:class="activeRoute == 'Page' ? 'is-active':''">
|
:class="activeRoute == 'Page' ? 'is-active':''">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -81,7 +75,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="!$adminOptions.hidePrimaryMenuActivitiesButton">
|
<li v-if="!$adminOptions.hidePrimaryMenuActivitiesButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/activities"
|
to="/activities"
|
||||||
:class="activeRoute == 'ActivitiesPage' ? 'is-active':''">
|
:class="activeRoute == 'ActivitiesPage' ? 'is-active':''">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -94,7 +87,6 @@
|
||||||
class="is-hidden-mobile"
|
class="is-hidden-mobile"
|
||||||
v-if="$userCaps.hasCapability('tnc_rep_edit_users') && !$adminOptions.hidePrimaryMenuCapabilitiesButton">
|
v-if="$userCaps.hasCapability('tnc_rep_edit_users') && !$adminOptions.hidePrimaryMenuCapabilitiesButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getCapabilitiesPath()"
|
:to="$routerHelper.getCapabilitiesPath()"
|
||||||
:class="activeRoute == 'CapabilitiesPage' ? 'is-active':''">
|
:class="activeRoute == 'CapabilitiesPage' ? 'is-active':''">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -105,7 +97,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="!$adminOptions.hidePrimaryMenuImportersButton">
|
<li v-if="!$adminOptions.hidePrimaryMenuImportersButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/importers"
|
to="/importers"
|
||||||
:class="(
|
:class="(
|
||||||
activeRoute == 'AvailableImportersPage' ||
|
activeRoute == 'AvailableImportersPage' ||
|
||||||
|
@ -120,7 +111,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="!$adminOptions.hidePrimaryMenuExportersButton">
|
<li v-if="!$adminOptions.hidePrimaryMenuExportersButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/exporters"
|
to="/exporters"
|
||||||
:class="(
|
:class="(
|
||||||
activeRoute == 'ExportersPage' ||
|
activeRoute == 'ExportersPage' ||
|
||||||
|
|
|
@ -7,12 +7,18 @@
|
||||||
<router-link
|
<router-link
|
||||||
v-if="activeRoute == 'ItemPage' || activeRoute == 'ItemEditionForm' || activeRoute == 'ItemCreatePage'"
|
v-if="activeRoute == 'ItemPage' || activeRoute == 'ItemEditionForm' || activeRoute == 'ItemCreatePage'"
|
||||||
:to="{ path: collection && collection.id ? $routerHelper.getCollectionItemsPath(collection.id, '') : '', query: activeRoute == 'CollectionItemsPage' ? $route.query : '' }"
|
:to="{ path: collection && collection.id ? $routerHelper.getCollectionItemsPath(collection.id, '') : '', query: activeRoute == 'CollectionItemsPage' ? $route.query : '' }"
|
||||||
class="button is-turquoise4"
|
custom
|
||||||
tag="button"
|
v-slot="{ navigate }">
|
||||||
:aria-label="$i18n.get('back')">
|
<button
|
||||||
<span class="icon">
|
@click="navigate()"
|
||||||
<i class="tainacan-icon tainacan-icon-previous"/>
|
role="link"
|
||||||
</span>
|
:aria-label="$i18n.get('back')"
|
||||||
|
type="button"
|
||||||
|
class="button is-turquoise4">
|
||||||
|
<span class="icon">
|
||||||
|
<i class="tainacan-icon tainacan-icon-previous"/>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="level">
|
<div class="level">
|
||||||
|
@ -21,12 +27,18 @@
|
||||||
<router-link
|
<router-link
|
||||||
v-if="activeRoute == 'ItemPage' || activeRoute == 'ItemEditionForm' || activeRoute == 'ItemCreatePage'"
|
v-if="activeRoute == 'ItemPage' || activeRoute == 'ItemEditionForm' || activeRoute == 'ItemCreatePage'"
|
||||||
:to="{ path: collection && collection.id ? $routerHelper.getCollectionItemsPath(collection.id, '') : '', query: activeRoute == 'CollectionItemsPage' ? $route.query : '' }"
|
:to="{ path: collection && collection.id ? $routerHelper.getCollectionItemsPath(collection.id, '') : '', query: activeRoute == 'CollectionItemsPage' ? $route.query : '' }"
|
||||||
class="button is-turquoise4"
|
custom
|
||||||
tag="button"
|
v-slot="{ navigate }">
|
||||||
:aria-label="$i18n.get('back')">
|
<button
|
||||||
<span class="icon">
|
@click="navigate()"
|
||||||
<i class="tainacan-icon tainacan-icon-previous"/>
|
role="link"
|
||||||
</span>
|
:aria-label="$i18n.get('back')"
|
||||||
|
type="button"
|
||||||
|
class="button is-turquoise4">
|
||||||
|
<span class="icon">
|
||||||
|
<i class="tainacan-icon tainacan-icon-previous"/>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -36,7 +48,6 @@
|
||||||
:class="activeRoute == 'ItemPage' || activeRoute == 'CollectionItemsPage' || activeRoute == 'ItemEditionForm' || activeRoute == 'ItemCreatePage' ? 'is-active':''"
|
:class="activeRoute == 'ItemPage' || activeRoute == 'CollectionItemsPage' || activeRoute == 'ItemEditionForm' || activeRoute == 'ItemCreatePage' ? 'is-active':''"
|
||||||
class="level-item">
|
class="level-item">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: collection && collection.id ? $routerHelper.getCollectionItemsPath(collection.id, '') : '', query: activeRoute == 'CollectionItemsPage' ? $route.query : '' }"
|
:to="{ path: collection && collection.id ? $routerHelper.getCollectionItemsPath(collection.id, '') : '', query: activeRoute == 'CollectionItemsPage' ? $route.query : '' }"
|
||||||
:aria-label="$i18n.get('label_collection_items')">
|
:aria-label="$i18n.get('label_collection_items')">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -50,7 +61,6 @@
|
||||||
:class="activeRoute == 'CollectionEditionForm' ? 'is-active':''"
|
:class="activeRoute == 'CollectionEditionForm' ? 'is-active':''"
|
||||||
class="level-item">
|
class="level-item">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: collection && collection.id ? $routerHelper.getCollectionEditPath(collection.id) : '' }"
|
:to="{ path: collection && collection.id ? $routerHelper.getCollectionEditPath(collection.id) : '' }"
|
||||||
:aria-label="$i18n.get('label_settings')">
|
:aria-label="$i18n.get('label_settings')">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -65,7 +75,6 @@
|
||||||
:class="activeRoute == 'CollectionMetadataPage' ? 'is-active':''"
|
:class="activeRoute == 'CollectionMetadataPage' ? 'is-active':''"
|
||||||
class="level-item">
|
class="level-item">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: collection && collection.id ? $routerHelper.getCollectionMetadataPath(collection.id) : '' }"
|
:to="{ path: collection && collection.id ? $routerHelper.getCollectionMetadataPath(collection.id) : '' }"
|
||||||
:aria-label="$i18n.get('label_collection_metadata')">
|
:aria-label="$i18n.get('label_collection_metadata')">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -79,7 +88,6 @@
|
||||||
:class="activeRoute == 'CollectionFiltersPage' ? 'is-active':''"
|
:class="activeRoute == 'CollectionFiltersPage' ? 'is-active':''"
|
||||||
class="level-item">
|
class="level-item">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: collection && collection.id ? $routerHelper.getCollectionFiltersPath(collection.id) : ''}"
|
:to="{ path: collection && collection.id ? $routerHelper.getCollectionFiltersPath(collection.id) : ''}"
|
||||||
:aria-label="$i18n.get('label_collection_filters')">
|
:aria-label="$i18n.get('label_collection_filters')">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -93,7 +101,6 @@
|
||||||
:class="activeRoute == 'CollectionActivitiesPage' ? 'is-active':''"
|
:class="activeRoute == 'CollectionActivitiesPage' ? 'is-active':''"
|
||||||
class="level-item">
|
class="level-item">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: collection && collection.id ? $routerHelper.getCollectionActivitiesPath(collection.id) : '' }"
|
:to="{ path: collection && collection.id ? $routerHelper.getCollectionActivitiesPath(collection.id) : '' }"
|
||||||
:aria-label="$i18n.get('label_collection_activities')">
|
:aria-label="$i18n.get('label_collection_activities')">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -107,7 +114,6 @@
|
||||||
:class="activeRoute == 'CollectionCapabilitiesPage' ? 'is-active':''"
|
:class="activeRoute == 'CollectionCapabilitiesPage' ? 'is-active':''"
|
||||||
class="level-item is-hidden-mobile">
|
class="level-item is-hidden-mobile">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: collection && collection.id ? $routerHelper.getCollectionCapabilitiesPath(collection.id) : '' }"
|
:to="{ path: collection && collection.id ? $routerHelper.getCollectionCapabilitiesPath(collection.id) : '' }"
|
||||||
:aria-label="$i18n.get('label_collection_capabilities')">
|
:aria-label="$i18n.get('label_collection_capabilities')">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
v-if="!$adminOptions.hideTainacanHeaderHomeButton"
|
v-if="!$adminOptions.hideTainacanHeaderHomeButton"
|
||||||
class="level-item home-area">
|
class="level-item home-area">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/"
|
to="/"
|
||||||
:aria-label="$i18n.get('label_plugin_home_page')">
|
:aria-label="$i18n.get('label_plugin_home_page')">
|
||||||
<span
|
<span
|
||||||
|
@ -24,7 +23,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="level-item logo-area">
|
<div class="level-item logo-area">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/"
|
to="/"
|
||||||
:aria-label="$i18n.get('label_plugin_home_page')">
|
:aria-label="$i18n.get('label_plugin_home_page')">
|
||||||
<h1>
|
<h1>
|
||||||
|
|
|
@ -10,12 +10,18 @@
|
||||||
<router-link
|
<router-link
|
||||||
v-if="activeRoute == 'ItemPage' || activeRoute == 'ItemEditionForm' || activeRoute == 'ItemCreatePage'"
|
v-if="activeRoute == 'ItemPage' || activeRoute == 'ItemEditionForm' || activeRoute == 'ItemCreatePage'"
|
||||||
:to="{ path: collection && collection.id ? $routerHelper.getCollectionItemsPath(collection.id, '') : '', query: activeRoute == 'CollectionItemsPage' ? $route.query : '' }"
|
:to="{ path: collection && collection.id ? $routerHelper.getCollectionItemsPath(collection.id, '') : '', query: activeRoute == 'CollectionItemsPage' ? $route.query : '' }"
|
||||||
class="button is-turquoise4"
|
custom
|
||||||
tag="button"
|
v-slot="{ navigate }">
|
||||||
:aria-label="$i18n.get('back')">
|
<button
|
||||||
<span class="icon">
|
role="link"
|
||||||
<i class="tainacan-icon tainacan-icon-previous"/>
|
class="button is-turquoise4"
|
||||||
</span>
|
type="button"
|
||||||
|
:aria-label="$i18n.get('back')"
|
||||||
|
@click="navigate()">
|
||||||
|
<span class="icon">
|
||||||
|
<i class="tainacan-icon tainacan-icon-previous"/>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -14,16 +14,13 @@
|
||||||
<nav
|
<nav
|
||||||
v-if="isRepositoryLevel"
|
v-if="isRepositoryLevel"
|
||||||
class="breadcrumbs">
|
class="breadcrumbs">
|
||||||
<router-link
|
<router-link :to="$routerHelper.getCollectionsPath()">{{ $i18n.get('repository') }}</router-link>
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getCollectionsPath()">{{ $i18n.get('repository') }}</router-link>
|
|
||||||
<template
|
<template
|
||||||
v-for="(breadCrumbItem, index) of breadCrumbItems"
|
v-for="(breadCrumbItem, index) of breadCrumbItems"
|
||||||
:key="index">
|
:key="index">
|
||||||
<span> > </span>
|
<span> > </span>
|
||||||
<router-link
|
<router-link
|
||||||
v-if="breadCrumbItem.path != ''"
|
v-if="breadCrumbItem.path != ''"
|
||||||
tag="a"
|
|
||||||
:to="breadCrumbItem.path">{{ breadCrumbItem.label }}</router-link>
|
:to="breadCrumbItem.path">{{ breadCrumbItem.label }}</router-link>
|
||||||
<span v-else>{{ breadCrumbItem.label }}</span>
|
<span v-else>{{ breadCrumbItem.label }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -32,15 +29,12 @@
|
||||||
v-else
|
v-else
|
||||||
class="breadcrumbs">
|
class="breadcrumbs">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getCollectionsPath()">{{ $i18n.get('repository') }}</router-link>
|
:to="$routerHelper.getCollectionsPath()">{{ $i18n.get('repository') }}</router-link>
|
||||||
>
|
>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getCollectionsPath()">{{ $i18n.get('collections') }}</router-link>
|
:to="$routerHelper.getCollectionsPath()">{{ $i18n.get('collections') }}</router-link>
|
||||||
>
|
>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: collectionBreadCrumbItem.url, query: { fromBreadcrumb: true }}">{{ collectionBreadCrumbItem.name }}</router-link>
|
:to="{ path: collectionBreadCrumbItem.url, query: { fromBreadcrumb: true }}">{{ collectionBreadCrumbItem.name }}</router-link>
|
||||||
<template
|
<template
|
||||||
v-for="(childBreadCrumbItem, index) of childrenBreadCrumbItems"
|
v-for="(childBreadCrumbItem, index) of childrenBreadCrumbItems"
|
||||||
|
@ -48,7 +42,6 @@
|
||||||
<span> > </span>
|
<span> > </span>
|
||||||
<router-link
|
<router-link
|
||||||
v-if="childBreadCrumbItem.path != ''"
|
v-if="childBreadCrumbItem.path != ''"
|
||||||
tag="a"
|
|
||||||
:to="{ path: childBreadCrumbItem.path, query: index === $i18n.get('items') ? { fromBreadcrumb: true } : null }">{{ childBreadCrumbItem.label }}</router-link>
|
:to="{ path: childBreadCrumbItem.path, query: index === $i18n.get('items') ? { fromBreadcrumb: true } : null }">{{ childBreadCrumbItem.label }}</router-link>
|
||||||
<span v-else>{{ childBreadCrumbItem.label }}</span>
|
<span v-else>{{ childBreadCrumbItem.label }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<li class="popup-list-subheader">
|
<li class="popup-list-subheader">
|
||||||
{{ $i18n.get('label_last_processed_on') + ' ' + getDate(bgProcesses[0].processed_last) }}
|
{{ $i18n.get('label_last_processed_on') + ' ' + getDate(bgProcesses[0].processed_last) }}
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getProcessesPage()"
|
:to="$routerHelper.getProcessesPage()"
|
||||||
class="is-secondary">
|
class="is-secondary">
|
||||||
{{ $i18n.get('label_view_more') }}
|
{{ $i18n.get('label_view_more') }}
|
||||||
|
|
|
@ -283,11 +283,17 @@
|
||||||
<p>{{ $i18n.get('info_there_is_no_filter' ) }}</p>
|
<p>{{ $i18n.get('info_there_is_no_filter' ) }}</p>
|
||||||
<router-link
|
<router-link
|
||||||
v-if="!$adminOptions.hideItemsListFilterCreationButton && $route.name != null && ((isRepositoryLevel && $userCaps.hasCapability('tnc_rep_edit_filters')) || (!isRepositoryLevel && collection && collection.current_user_can_edit_filters))"
|
v-if="!$adminOptions.hideItemsListFilterCreationButton && $route.name != null && ((isRepositoryLevel && $userCaps.hasCapability('tnc_rep_edit_filters')) || (!isRepositoryLevel && collection && collection.current_user_can_edit_filters))"
|
||||||
id="button-create-filter"
|
|
||||||
:to="isRepositoryLevel && $routerHelper ? $routerHelper.getNewFilterPath() : $routerHelper.getNewCollectionFilterPath(collectionId)"
|
:to="isRepositoryLevel && $routerHelper ? $routerHelper.getNewFilterPath() : $routerHelper.getNewCollectionFilterPath(collectionId)"
|
||||||
tag="button"
|
custom
|
||||||
class="button is-secondary is-centered">
|
v-slot="{ navigate }">
|
||||||
{{ $i18n.getFrom('filters', 'new_item') }}
|
<button
|
||||||
|
type="button"
|
||||||
|
role="button"
|
||||||
|
@click="navigate()"
|
||||||
|
id="button-create-filter"
|
||||||
|
class="button is-secondary is-centered">
|
||||||
|
{{ $i18n.getFrom('filters', 'new_item') }}
|
||||||
|
</button>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
//window.underscore = _.noConflict();
|
//window.underscore = _.noConflict();
|
||||||
|
|
||||||
// Main imports
|
// Main imports
|
||||||
import Vue from 'vue';
|
import { createApp } from 'vue';
|
||||||
import {
|
import {
|
||||||
Field,
|
Field,
|
||||||
Input,
|
Input,
|
||||||
|
@ -90,9 +90,6 @@ import {
|
||||||
|
|
||||||
export default (element) => {
|
export default (element) => {
|
||||||
|
|
||||||
// Vue Dev Tools!
|
|
||||||
Vue.config.devtools = TAINACAN_ENV === 'development';
|
|
||||||
|
|
||||||
function renderTainacanAdminPage() {
|
function renderTainacanAdminPage() {
|
||||||
|
|
||||||
// Gets the div with the content of the page
|
// Gets the div with the content of the page
|
||||||
|
@ -101,37 +98,47 @@ export default (element) => {
|
||||||
// Mount only if the div exists and it is not already mounted
|
// Mount only if the div exists and it is not already mounted
|
||||||
if ( pageElement && pageElement.classList && !pageElement.classList.contains('has-mounted') ) {
|
if ( pageElement && pageElement.classList && !pageElement.classList.contains('has-mounted') ) {
|
||||||
|
|
||||||
|
const app = createApp({
|
||||||
|
el: '#tainacan-admin-app',
|
||||||
|
router,
|
||||||
|
store,
|
||||||
|
render: h => h(AdminPage)
|
||||||
|
});
|
||||||
|
|
||||||
|
app.use(router);
|
||||||
|
app.use(store);
|
||||||
|
|
||||||
/* Registers Extra Vue Plugins passed to the window.tainacan_extra_plugins */
|
/* Registers Extra Vue Plugins passed to the window.tainacan_extra_plugins */
|
||||||
if (typeof window.tainacan_extra_plugins != "undefined") {
|
if (typeof window.tainacan_extra_plugins != "undefined") {
|
||||||
for (let [extraVuePluginName, extraVuePluginObject] of Object.entries(window.tainacan_extra_plugins))
|
for (let [extraVuePluginName, extraVuePluginObject] of Object.entries(window.tainacan_extra_plugins))
|
||||||
Vue.use(extraVuePluginObject);
|
app.use(extraVuePluginObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure and Register Plugins
|
// Configure and Register Plugins
|
||||||
Vue.use(Field);
|
app.use(Field);
|
||||||
Vue.use(Input);
|
app.use(Input);
|
||||||
Vue.use(Autocomplete);
|
app.use(Autocomplete);
|
||||||
Vue.use(Taginput);
|
app.use(Taginput);
|
||||||
Vue.use(Collapse);
|
app.use(Collapse);
|
||||||
Vue.use(Button);
|
app.use(Button);
|
||||||
Vue.use(Datepicker);
|
app.use(Datepicker);
|
||||||
Vue.use(Select);
|
app.use(Select);
|
||||||
Vue.use(Switch);
|
app.use(Switch);
|
||||||
Vue.use(Upload);
|
app.use(Upload);
|
||||||
Vue.use(Icon);
|
app.use(Icon);
|
||||||
Vue.use(Pagination);
|
app.use(Pagination);
|
||||||
Vue.use(Checkbox);
|
app.use(Checkbox);
|
||||||
Vue.use(Radio);
|
app.use(Radio);
|
||||||
Vue.use(Tag);
|
app.use(Tag);
|
||||||
Vue.use(Tabs);
|
app.use(Tabs);
|
||||||
Vue.use(Loading);
|
app.use(Loading);
|
||||||
Vue.use(Dropdown);
|
app.use(Dropdown);
|
||||||
Vue.use(Modal);
|
app.use(Modal);
|
||||||
Vue.use(Dialog);
|
app.use(Dialog);
|
||||||
Vue.use(Snackbar);
|
app.use(Snackbar);
|
||||||
Vue.use(Toast);
|
app.use(Toast);
|
||||||
Vue.use(Numberinput);
|
app.use(Numberinput);
|
||||||
Vue.use(VTooltip, {
|
app.use(VTooltip, {
|
||||||
popperTriggers: ['hover', 'touch'],
|
popperTriggers: ['hover', 'touch'],
|
||||||
themes: {
|
themes: {
|
||||||
'taianacan-tooltip': {
|
'taianacan-tooltip': {
|
||||||
|
@ -166,67 +173,67 @@ export default (element) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Vue.use(VueBlurHash);
|
app.use(VueBlurHash);
|
||||||
Vue.use(I18NPlugin);
|
app.use(I18NPlugin);
|
||||||
Vue.use(UserPrefsPlugin);
|
app.use(UserPrefsPlugin);
|
||||||
Vue.use(RouterHelperPlugin);
|
app.use(RouterHelperPlugin);
|
||||||
Vue.use(UserCapabilitiesPlugin);
|
app.use(UserCapabilitiesPlugin);
|
||||||
Vue.use(ThumbnailHelperPlugin);
|
app.use(ThumbnailHelperPlugin);
|
||||||
Vue.use(OrderByHelperPlugin);
|
app.use(OrderByHelperPlugin);
|
||||||
Vue.use(StatusHelperPlugin);
|
app.use(StatusHelperPlugin);
|
||||||
Vue.use(ConsolePlugin, {visual: false});
|
app.use(ConsolePlugin, {visual: false});
|
||||||
Vue.use(VueTheMask);
|
app.use(VueTheMask);
|
||||||
Vue.use(CommentsStatusHelperPlugin);
|
app.use(CommentsStatusHelperPlugin);
|
||||||
Vue.use(AdminOptionsHelperPlugin, pageElement.dataset['options']);
|
app.use(AdminOptionsHelperPlugin, pageElement.dataset['options']);
|
||||||
|
|
||||||
|
|
||||||
/* Registers Extra Vue Components passed to the window.tainacan_extra_components */
|
/* Registers Extra Vue Components passed to the window.tainacan_extra_components */
|
||||||
if (typeof window.tainacan_extra_components != "undefined") {
|
if (typeof window.tainacan_extra_components != "undefined") {
|
||||||
for (let [extraVueComponentName, extraVueComponentObject] of Object.entries(window.tainacan_extra_components)) {
|
for (let [extraVueComponentName, extraVueComponentObject] of Object.entries(window.tainacan_extra_components)) {
|
||||||
Vue.component(extraVueComponentName, extraVueComponentObject);
|
app.component(extraVueComponentName, extraVueComponentObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Metadata */
|
/* Metadata */
|
||||||
Vue.component('tainacan-text', Text);
|
app.component('tainacan-text', Text);
|
||||||
Vue.component('tainacan-textarea', Textarea);
|
app.component('tainacan-textarea', Textarea);
|
||||||
Vue.component('tainacan-selectbox', Selectbox);
|
app.component('tainacan-selectbox', Selectbox);
|
||||||
Vue.component('tainacan-numeric', Numeric);
|
app.component('tainacan-numeric', Numeric);
|
||||||
Vue.component('tainacan-date', Date);
|
app.component('tainacan-date', Date);
|
||||||
Vue.component('tainacan-relationship', Relationship);
|
app.component('tainacan-relationship', Relationship);
|
||||||
Vue.component('tainacan-taxonomy', Taxonomy);
|
app.component('tainacan-taxonomy', Taxonomy);
|
||||||
Vue.component('tainacan-compound', Compound);
|
app.component('tainacan-compound', Compound);
|
||||||
Vue.component('tainacan-user', User);
|
app.component('tainacan-user', User);
|
||||||
Vue.component('tainacan-geocoordinate', GeoCoordinate);
|
app.component('tainacan-geocoordinate', GeoCoordinate);
|
||||||
|
|
||||||
|
|
||||||
/* Metadata Option forms */
|
/* Metadata Option forms */
|
||||||
Vue.component('tainacan-form-text', FormText);
|
app.component('tainacan-form-text', FormText);
|
||||||
Vue.component('tainacan-form-relationship', FormRelationship);
|
app.component('tainacan-form-relationship', FormRelationship);
|
||||||
Vue.component('tainacan-form-taxonomy', FormTaxonomy);
|
app.component('tainacan-form-taxonomy', FormTaxonomy);
|
||||||
Vue.component('tainacan-form-selectbox', FormSelectbox);
|
app.component('tainacan-form-selectbox', FormSelectbox);
|
||||||
Vue.component('tainacan-form-numeric', FormNumeric);
|
app.component('tainacan-form-numeric', FormNumeric);
|
||||||
Vue.component('tainacan-form-user', FormUser);
|
app.component('tainacan-form-user', FormUser);
|
||||||
Vue.component('term-edition-form', TermEditionForm);
|
app.component('term-edition-form', TermEditionForm);
|
||||||
Vue.component('tainacan-form-geocoordinate', FormGeoCoordinate);
|
app.component('tainacan-form-geocoordinate', FormGeoCoordinate);
|
||||||
|
|
||||||
/* Filter Metadata Option forms */
|
/* Filter Metadata Option forms */
|
||||||
Vue.component('tainacan-filter-form-numeric', FormFilterNumeric);
|
app.component('tainacan-filter-form-numeric', FormFilterNumeric);
|
||||||
Vue.component('tainacan-filter-form-numeric-interval', FormFilterNumericInterval);
|
app.component('tainacan-filter-form-numeric-interval', FormFilterNumericInterval);
|
||||||
Vue.component('tainacan-filter-form-numeric-list-interval', FormFilterNumericListInterval);
|
app.component('tainacan-filter-form-numeric-list-interval', FormFilterNumericListInterval);
|
||||||
// Vue.component('tainacan-filter-form-date', FormDate);
|
// app.component('tainacan-filter-form-date', FormDate);
|
||||||
|
|
||||||
// Metadadum parent containers
|
// Metadadum parent containers
|
||||||
Vue.component('tainacan-form-item', TainacanFormItem);
|
app.component('tainacan-form-item', TainacanFormItem);
|
||||||
|
|
||||||
/* Others */
|
/* Others */
|
||||||
Vue.component('help-button', HelpButton);
|
app.component('help-button', HelpButton);
|
||||||
Vue.component('draggable', draggable);
|
app.component('draggable', draggable);
|
||||||
Vue.component('tainacan-title', TainacanTitle);
|
app.component('tainacan-title', TainacanTitle);
|
||||||
|
|
||||||
// Event bus are needed to facilate comunication between child-parent-child components
|
// Event bus are needed to facilate comunication between child-parent-child components
|
||||||
Vue.use(eventBusMetadataList, {});
|
app.use(eventBusMetadataList, {});
|
||||||
Vue.use(eventBusSearch, { store: store, router: router});
|
app.use(eventBusSearch, { store: store, router: router });
|
||||||
|
|
||||||
// Changing title of pages
|
// Changing title of pages
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
|
@ -235,12 +242,7 @@ export default (element) => {
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
new Vue({
|
app.mount();
|
||||||
el: '#tainacan-admin-app',
|
|
||||||
store,
|
|
||||||
router,
|
|
||||||
render: h => h(AdminPage)
|
|
||||||
});
|
|
||||||
|
|
||||||
// Initialize Ponyfill for Custom CSS properties
|
// Initialize Ponyfill for Custom CSS properties
|
||||||
cssVars({
|
cssVars({
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import Vue from 'vue';
|
import { createRouter } from 'vue-router'
|
||||||
import VueRouter from 'vue-router'
|
|
||||||
import qs from 'qs';
|
import qs from 'qs';
|
||||||
|
|
||||||
// Main Pages
|
// Main Pages
|
||||||
|
@ -25,8 +24,6 @@ import ItemBulkEditionForm from '../components/edition/item-bulk-edition-form.vu
|
||||||
import TaxonomyEditionForm from '../components/edition/taxonomy-edition-form.vue'
|
import TaxonomyEditionForm from '../components/edition/taxonomy-edition-form.vue'
|
||||||
import ExporterEditionForm from '../components/edition/exporter-edition-form.vue'
|
import ExporterEditionForm from '../components/edition/exporter-edition-form.vue'
|
||||||
|
|
||||||
Vue.use(VueRouter);
|
|
||||||
|
|
||||||
const i18nGet = function (key) {
|
const i18nGet = function (key) {
|
||||||
let string = tainacan_plugin.i18n[key];
|
let string = tainacan_plugin.i18n[key];
|
||||||
return (string !== undefined && string !== null && string !== '' ) ? string : "ERROR: Invalid i18n key!";
|
return (string !== undefined && string !== null && string !== '' ) ? string : "ERROR: Invalid i18n key!";
|
||||||
|
@ -42,7 +39,7 @@ const routes = [
|
||||||
|
|
||||||
{ path: '/collections/:collectionId', component: CollectionPage, meta: {title: i18nGet('title_collection_page') },
|
{ path: '/collections/:collectionId', component: CollectionPage, meta: {title: i18nGet('title_collection_page') },
|
||||||
children: [
|
children: [
|
||||||
{ path: '', redirect: 'items'},
|
{ path: '/', redirect: 'items'},
|
||||||
{ path: 'items', component: ItemsPage, name: 'CollectionItemsPage', meta: {title: i18nGet('title_collection_page') }, props: { isOnTheme: false } },
|
{ path: 'items', component: ItemsPage, name: 'CollectionItemsPage', meta: {title: i18nGet('title_collection_page') }, props: { isOnTheme: false } },
|
||||||
{ path: 'items/:itemId/edit', name: 'ItemEditionForm', component: ItemEditionForm, meta: {title: i18nGet('title_edit_item') } },
|
{ path: 'items/:itemId/edit', name: 'ItemEditionForm', component: ItemEditionForm, meta: {title: i18nGet('title_edit_item') } },
|
||||||
{ path: 'items/new', name: 'CollectionItemCreatePage', component: ItemEditionForm, meta: {title: i18nGet('title_create_item_collection') } },
|
{ path: 'items/new', name: 'CollectionItemCreatePage', component: ItemEditionForm, meta: {title: i18nGet('title_create_item_collection') } },
|
||||||
|
@ -68,7 +65,7 @@ const routes = [
|
||||||
{ path: '/taxonomies', name: 'TaxonomyPage', component: TaxonomyPage, meta: {title: i18nGet('title_taxonomies_page') } },
|
{ path: '/taxonomies', name: 'TaxonomyPage', component: TaxonomyPage, meta: {title: i18nGet('title_taxonomies_page') } },
|
||||||
{ path: '/taxonomies/new', name: 'TaxonomyCreationForm', component: TaxonomyEditionForm, meta: {title: i18nGet('title_create_taxonomy_page') } },
|
{ path: '/taxonomies/new', name: 'TaxonomyCreationForm', component: TaxonomyEditionForm, meta: {title: i18nGet('title_create_taxonomy_page') } },
|
||||||
{ path: '/taxonomies/:taxonomyId/edit', name: 'TaxonomyEditionForm', component: TaxonomyEditionForm, meta: {title: i18nGet('title_taxonomy_edit_page') } },
|
{ path: '/taxonomies/:taxonomyId/edit', name: 'TaxonomyEditionForm', component: TaxonomyEditionForm, meta: {title: i18nGet('title_taxonomy_edit_page') } },
|
||||||
{ path: '/taxonomies/:taxonomyId', redirect: '/taxonomies/:taxonomyId/edit' },
|
{ path: '/taxonomies/:taxonomyId', redirect: { name: 'TaxonomyEditionForm' } },
|
||||||
|
|
||||||
{ path: '/activities', name: 'ActivitiesPage', component: ActivitiesPage, meta: {title: i18nGet('title_repository_activities_page') } },
|
{ path: '/activities', name: 'ActivitiesPage', component: ActivitiesPage, meta: {title: i18nGet('title_repository_activities_page') } },
|
||||||
|
|
||||||
|
@ -82,10 +79,9 @@ const routes = [
|
||||||
{ path: '/exporters/', name: 'ExportersPage', component: AvailableExportersPage, meta: {title: i18nGet('title_exporters_page') } },
|
{ path: '/exporters/', name: 'ExportersPage', component: AvailableExportersPage, meta: {title: i18nGet('title_exporters_page') } },
|
||||||
{ path: '/exporters/:exporterSlug', name: 'ExporterEditionForm', component: ExporterEditionForm, meta: {title: i18nGet('title_exporter_page') }},
|
{ path: '/exporters/:exporterSlug', name: 'ExporterEditionForm', component: ExporterEditionForm, meta: {title: i18nGet('title_exporter_page') }},
|
||||||
|
|
||||||
{ path: '*', redirect: '/'}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export default new VueRouter ({
|
export default createRouter({
|
||||||
routes,
|
routes,
|
||||||
// set custom query resolver
|
// set custom query resolver
|
||||||
parseQuery(query) {
|
parseQuery(query) {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import Vue from 'vue';
|
import { createStore } from 'vuex';
|
||||||
import Vuex from 'vuex';
|
|
||||||
|
|
||||||
import item from './modules/item';
|
import item from './modules/item';
|
||||||
import collection from './modules/collection';
|
import collection from './modules/collection';
|
||||||
|
@ -16,11 +15,7 @@ import exposer from './modules/exposer';
|
||||||
import capability from './modules/capability';
|
import capability from './modules/capability';
|
||||||
import report from './modules/report';
|
import report from './modules/report';
|
||||||
|
|
||||||
// Vue Dev Tools!
|
export default createStore({
|
||||||
Vue.config.devtools = TAINACAN_ENV === 'development';
|
|
||||||
Vue.use(Vuex);
|
|
||||||
|
|
||||||
export default new Vuex.Store({
|
|
||||||
/*
|
/*
|
||||||
In strict mode, whenever Vuex state is mutated outside of mutation handlers, an error will be thrown
|
In strict mode, whenever Vuex state is mutated outside of mutation handlers, an error will be thrown
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
<ul class="repository-menu-list">
|
<ul class="repository-menu-list">
|
||||||
<!-- <li>
|
<!-- <li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/collections">
|
to="/collections">
|
||||||
<span class="icon is-medium">
|
<span class="icon is-medium">
|
||||||
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-collections"/>
|
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-collections"/>
|
||||||
|
@ -40,7 +39,6 @@
|
||||||
</li> -->
|
</li> -->
|
||||||
<!-- <li>
|
<!-- <li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/items">
|
to="/items">
|
||||||
<span class="icon is-medium">
|
<span class="icon is-medium">
|
||||||
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-items"/>
|
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-items"/>
|
||||||
|
@ -50,7 +48,6 @@
|
||||||
</li> -->
|
</li> -->
|
||||||
<li v-if="$userCaps.hasCapability('tnc_rep_edit_metadata') && !$adminOptions.hideHomeMetadataButton">
|
<li v-if="$userCaps.hasCapability('tnc_rep_edit_metadata') && !$adminOptions.hideHomeMetadataButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/metadata">
|
to="/metadata">
|
||||||
<span class="icon is-medium">
|
<span class="icon is-medium">
|
||||||
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-metadata"/>
|
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-metadata"/>
|
||||||
|
@ -60,7 +57,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="$userCaps.hasCapability('tnc_rep_edit_filters') && !$adminOptions.hideHomeFiltersButton">
|
<li v-if="$userCaps.hasCapability('tnc_rep_edit_filters') && !$adminOptions.hideHomeFiltersButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/filters">
|
to="/filters">
|
||||||
<span class="icon is-medium">
|
<span class="icon is-medium">
|
||||||
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-filters"/>
|
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-filters"/>
|
||||||
|
@ -70,7 +66,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="!$adminOptions.hideHomeTaxonomiesButton">
|
<li v-if="!$adminOptions.hideHomeTaxonomiesButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/taxonomies">
|
to="/taxonomies">
|
||||||
<span class="icon is-medium">
|
<span class="icon is-medium">
|
||||||
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-taxonomies"/>
|
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-taxonomies"/>
|
||||||
|
@ -80,7 +75,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="!$adminOptions.hideHomeActivitiesButton">
|
<li v-if="!$adminOptions.hideHomeActivitiesButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/activities">
|
to="/activities">
|
||||||
<span class="icon is-medium">
|
<span class="icon is-medium">
|
||||||
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-activities"/>
|
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-activities"/>
|
||||||
|
@ -90,7 +84,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="!$adminOptions.hideHomeImportersButton">
|
<li v-if="!$adminOptions.hideHomeImportersButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/importers">
|
to="/importers">
|
||||||
<span class="icon is-medium">
|
<span class="icon is-medium">
|
||||||
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-importers"/>
|
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-importers"/>
|
||||||
|
@ -100,7 +93,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="!$adminOptions.hideHomeExportersButton">
|
<li v-if="!$adminOptions.hideHomeExportersButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
to="/exporters">
|
to="/exporters">
|
||||||
<span class="icon is-medium">
|
<span class="icon is-medium">
|
||||||
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-export"/>
|
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-export"/>
|
||||||
|
@ -122,10 +114,14 @@
|
||||||
<div class="home-section-header collections-section-header">
|
<div class="home-section-header collections-section-header">
|
||||||
<div class="home-section-icon">
|
<div class="home-section-icon">
|
||||||
<router-link
|
<router-link
|
||||||
tag="span"
|
to="/collections"
|
||||||
class="icon"
|
custom
|
||||||
to="/collections">
|
v-slot="{ navigate }">
|
||||||
<i class="tainacan-icon tainacan-icon-collections"/>
|
<span
|
||||||
|
@click="navigate()"
|
||||||
|
class="icon">
|
||||||
|
<i class="tainacan-icon tainacan-icon-collections"/>
|
||||||
|
</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
<h1>{{ $i18n.get('label_recent_collections') }}</h1>
|
<h1>{{ $i18n.get('label_recent_collections') }}</h1>
|
||||||
|
@ -147,7 +143,6 @@
|
||||||
<router-link
|
<router-link
|
||||||
v-if="!$adminOptions.hideHomeCollectionsButton"
|
v-if="!$adminOptions.hideHomeCollectionsButton"
|
||||||
class="collections-see-more"
|
class="collections-see-more"
|
||||||
tag="a"
|
|
||||||
to="/collections">
|
to="/collections">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-viewtable"/>
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-viewtable"/>
|
||||||
|
|
|
@ -23,12 +23,16 @@
|
||||||
</button>
|
</button>
|
||||||
<b-dropdown-item aria-role="listitem">
|
<b-dropdown-item aria-role="listitem">
|
||||||
<router-link
|
<router-link
|
||||||
id="a-create-collection"
|
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||||
tag="div"
|
custom
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath() }">
|
v-slot="{ navigate }">
|
||||||
{{ $i18n.get('new_blank_collection') }}
|
<div
|
||||||
<br>
|
id="a-create-collection"
|
||||||
<small class="is-small">{{ $i18n.get('info_choose_your_metadata') }}</small>
|
@click="navigate()">
|
||||||
|
{{ $i18n.get('new_blank_collection') }}
|
||||||
|
<br>
|
||||||
|
<small class="is-small">{{ $i18n.get('info_choose_your_metadata') }}</small>
|
||||||
|
</div>
|
||||||
</router-link>
|
</router-link>
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<b-dropdown-item aria-role="listitem">
|
<b-dropdown-item aria-role="listitem">
|
||||||
|
@ -267,12 +271,16 @@
|
||||||
</button>
|
</button>
|
||||||
<b-dropdown-item aria-role="listitem">
|
<b-dropdown-item aria-role="listitem">
|
||||||
<router-link
|
<router-link
|
||||||
id="a-create-collection"
|
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||||
tag="div"
|
custom
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath() }">
|
v-slot="{ navigate }">
|
||||||
{{ $i18n.get('new_blank_collection') }}
|
<div
|
||||||
<br>
|
id="a-create-collection"
|
||||||
<small class="is-small">{{ $i18n.get('info_choose_your_metadata') }}</small>
|
@click="navigate()">
|
||||||
|
{{ $i18n.get('new_blank_collection') }}
|
||||||
|
<br>
|
||||||
|
<small class="is-small">{{ $i18n.get('info_choose_your_metadata') }}</small>
|
||||||
|
</div>
|
||||||
</router-link>
|
</router-link>
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<b-dropdown-item aria-role="listitem">
|
<b-dropdown-item aria-role="listitem">
|
||||||
|
|
|
@ -330,11 +330,18 @@
|
||||||
</p>
|
</p>
|
||||||
<p>{{ $i18n.get('info_there_is_no_metadatum' ) }}</p>
|
<p>{{ $i18n.get('info_there_is_no_metadatum' ) }}</p>
|
||||||
<router-link
|
<router-link
|
||||||
id="button-create-metadatum"
|
|
||||||
:to="isRepositoryLevel ? $routerHelper.getNewMetadatumPath() : $routerHelper.getNewCollectionMetadatumPath(collectionId)"
|
:to="isRepositoryLevel ? $routerHelper.getNewMetadatumPath() : $routerHelper.getNewCollectionMetadatumPath(collectionId)"
|
||||||
tag="button"
|
custom
|
||||||
class="button is-secondary is-centered">
|
v-slot="{ navigate }">
|
||||||
{{ $i18n.getFrom('metadata', 'new_item') }}</router-link>
|
<button
|
||||||
|
role="link"
|
||||||
|
ttype="button"
|
||||||
|
@click="navigate()"
|
||||||
|
id="button-create-metadatum"
|
||||||
|
class="button is-secondary is-centered">
|
||||||
|
{{ $i18n.getFrom('metadata', 'new_item') }}
|
||||||
|
</button>
|
||||||
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -128,16 +128,22 @@
|
||||||
collection.current_user_can_edit_items"
|
collection.current_user_can_edit_items"
|
||||||
class="search-control-item">
|
class="search-control-item">
|
||||||
<router-link
|
<router-link
|
||||||
id="item-creation-options-dropdown"
|
:to="{ path: $routerHelper.getNewItemPath(collectionId) }"
|
||||||
v-if="$adminOptions.hideItemsListCreationDropdownBulkAdd && $adminOptions.hideItemsListCreationDropdownImport"
|
v-if="$adminOptions.hideItemsListCreationDropdownBulkAdd && $adminOptions.hideItemsListCreationDropdownImport"
|
||||||
class="button is-secondary"
|
custom
|
||||||
tag="button"
|
v-slot="{ navigate }">
|
||||||
:to="{ path: $routerHelper.getNewItemPath(collectionId) }">
|
<button
|
||||||
<span class="is-hidden-touch">{{ $i18n.getFrom('items','add_new') }}</span>
|
type="button"
|
||||||
<span class="is-hidden-desktop">{{ $i18n.get('add') }}</span>
|
role="link"
|
||||||
<span class="icon">
|
@click="navigate()"
|
||||||
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-add" />
|
class="button is-secondary"
|
||||||
</span>
|
id="item-creation-options-dropdown">
|
||||||
|
<span class="is-hidden-touch">{{ $i18n.getFrom('items','add_new') }}</span>
|
||||||
|
<span class="is-hidden-desktop">{{ $i18n.get('add') }}</span>
|
||||||
|
<span class="icon">
|
||||||
|
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-add" />
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
</router-link>
|
</router-link>
|
||||||
<b-dropdown
|
<b-dropdown
|
||||||
v-else
|
v-else
|
||||||
|
@ -159,10 +165,15 @@
|
||||||
v-if="!isRepositoryLevel"
|
v-if="!isRepositoryLevel"
|
||||||
aria-role="listitem">
|
aria-role="listitem">
|
||||||
<router-link
|
<router-link
|
||||||
id="a-create-item"
|
:to="{ path: $routerHelper.getNewItemPath(collectionId) }"
|
||||||
tag="div"
|
custom
|
||||||
:to="{ path: $routerHelper.getNewItemPath(collectionId) }">
|
v-slot="{ navigate }">
|
||||||
{{ $i18n.get('add_one_item') }}
|
<div
|
||||||
|
role="link"
|
||||||
|
id="a-create-item"
|
||||||
|
@click="navigate()" >
|
||||||
|
{{ $i18n.get('add_one_item') }}
|
||||||
|
</div>
|
||||||
</router-link>
|
</router-link>
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<b-dropdown-item
|
<b-dropdown-item
|
||||||
|
@ -179,12 +190,17 @@
|
||||||
v-if="!isRepositoryLevel && !$adminOptions.hideItemsListCreationDropdownBulkAdd"
|
v-if="!isRepositoryLevel && !$adminOptions.hideItemsListCreationDropdownBulkAdd"
|
||||||
aria-role="listitem">
|
aria-role="listitem">
|
||||||
<router-link
|
<router-link
|
||||||
id="a-item-add-bulk"
|
:to="{ path: $routerHelper.getNewItemBulkAddPath(collectionId) }"
|
||||||
tag="div"
|
custom
|
||||||
:to="{ path: $routerHelper.getNewItemBulkAddPath(collectionId) }">
|
v-slot="{ navigate }">
|
||||||
{{ $i18n.get('add_items_bulk') }}
|
<button
|
||||||
<br>
|
role="link"
|
||||||
<small class="is-small">{{ $i18n.get('info_bulk_add_items') }}</small>
|
@click="navigate()"
|
||||||
|
id="a-item-add-bulk">
|
||||||
|
{{ $i18n.get('add_items_bulk') }}
|
||||||
|
<br>
|
||||||
|
<small class="is-small">{{ $i18n.get('info_bulk_add_items') }}</small>
|
||||||
|
</button>
|
||||||
</router-link>
|
</router-link>
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<b-dropdown-item
|
<b-dropdown-item
|
||||||
|
@ -638,11 +654,17 @@
|
||||||
|
|
||||||
<router-link
|
<router-link
|
||||||
v-if="!isRepositoryLevel && !isSortingByCustomMetadata && !hasFiltered && (status == undefined || status == '') && !$adminOptions.hideItemsListCreationDropdown"
|
v-if="!isRepositoryLevel && !isSortingByCustomMetadata && !hasFiltered && (status == undefined || status == '') && !$adminOptions.hideItemsListCreationDropdown"
|
||||||
id="button-create-item"
|
:to="{ path: $routerHelper.getNewItemPath(collectionId) }"
|
||||||
tag="button"
|
custom
|
||||||
class="button is-secondary"
|
v-slot="{ navigate }">
|
||||||
:to="{ path: $routerHelper.getNewItemPath(collectionId) }">
|
<button
|
||||||
{{ $i18n.getFrom('items', 'add_new') }}
|
id="button-create-item"
|
||||||
|
type="button"
|
||||||
|
@click="navigate()"
|
||||||
|
role="link"
|
||||||
|
class="button is-secondary">
|
||||||
|
{{ $i18n.getFrom('items', 'add_new') }}
|
||||||
|
</button>
|
||||||
</router-link>
|
</router-link>
|
||||||
<button
|
<button
|
||||||
v-else-if="isRepositoryLevel && !isSortingByCustomMetadata && !hasFiltered && (status == undefined || status == '') && !$adminOptions.hideItemsListCreationDropdown"
|
v-else-if="isRepositoryLevel && !isSortingByCustomMetadata && !hasFiltered && (status == undefined || status == '') && !$adminOptions.hideItemsListCreationDropdown"
|
||||||
|
|
|
@ -10,11 +10,18 @@
|
||||||
v-if="$userCaps.hasCapability('tnc_rep_edit_taxonomies')"
|
v-if="$userCaps.hasCapability('tnc_rep_edit_taxonomies')"
|
||||||
class="header-item">
|
class="header-item">
|
||||||
<router-link
|
<router-link
|
||||||
id="button-create-taxonomy"
|
|
||||||
tag="button"
|
tag="button"
|
||||||
class="button is-secondary"
|
:to="{ path: $routerHelper.getNewTaxonomyPath() }"
|
||||||
:to="{ path: $routerHelper.getNewTaxonomyPath() }">
|
custom
|
||||||
{{ $i18n.getFrom('taxonomies', 'new_item') }}
|
v-slot="{ navigate }">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
role="link"
|
||||||
|
id="button-create-taxonomy"
|
||||||
|
class="button is-secondary"
|
||||||
|
@click="navigate()">
|
||||||
|
{{ $i18n.getFrom('taxonomies', 'new_item') }}
|
||||||
|
</button>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -175,11 +182,17 @@
|
||||||
</p>
|
</p>
|
||||||
<router-link
|
<router-link
|
||||||
v-if="status == undefined || status == ''"
|
v-if="status == undefined || status == ''"
|
||||||
id="button-create-taxonomy"
|
:to="{ path: $routerHelper.getNewTaxonomyPath() }"
|
||||||
tag="button"
|
custom
|
||||||
class="button is-secondary"
|
v-slot="{ navigate }">
|
||||||
:to="{ path: $routerHelper.getNewTaxonomyPath() }">
|
<button
|
||||||
{{ $i18n.getFrom('taxonomies', 'new_item') }}
|
role="link"
|
||||||
|
id="button-create-taxonomy"
|
||||||
|
type="button"
|
||||||
|
class="button is-secondary"
|
||||||
|
@click="navigate()">
|
||||||
|
{{ $i18n.getFrom('taxonomies', 'new_item') }}
|
||||||
|
</button>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
import Vue from 'vue';
|
import { createRouter, createWebHistory } from 'vue-router';
|
||||||
import VueRouter from 'vue-router'
|
|
||||||
import qs from 'qs';
|
import qs from 'qs';
|
||||||
|
|
||||||
Vue.use(VueRouter);
|
|
||||||
|
|
||||||
const themeRoutes = [];
|
const themeRoutes = [];
|
||||||
|
|
||||||
export default new VueRouter ({
|
export default createRouter ({
|
||||||
mode: 'history',
|
history: createWebHistory(),
|
||||||
themeRoutes,
|
routes: themeRoutes,
|
||||||
// set custom query resolver
|
// set custom query resolver
|
||||||
parseQuery(query) {
|
parseQuery(query) {
|
||||||
return qs.parse(query);
|
return qs.parse(query);
|
||||||
|
|
|
@ -1,21 +1,15 @@
|
||||||
import Vue from 'vue';
|
import { createRouter } from 'vue-router';
|
||||||
import VueRouter from 'vue-router'
|
|
||||||
import qs from 'qs';
|
import qs from 'qs';
|
||||||
|
|
||||||
import ReportsList from '../pages/reports-list.vue';
|
import ReportsList from '../pages/reports-list.vue';
|
||||||
|
|
||||||
const { __ } = wp.i18n;
|
const { __ } = wp.i18n;
|
||||||
|
|
||||||
Vue.use(VueRouter);
|
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{ path: '/', redirect:'/reports' },
|
{ path: '/', redirect:'/reports' },
|
||||||
{ path: '/reports', name: 'ReportsList', component: ReportsList, meta: { title: __('Tainacan Reports') } },
|
{ path: '/reports', name: 'ReportsList', component: ReportsList, meta: { title: __('Tainacan Reports') } },
|
||||||
|
|
||||||
{ path: '*', redirect: '/'}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export default new VueRouter ({
|
export default createRouter({
|
||||||
routes,
|
routes,
|
||||||
// set custom query resolver
|
// set custom query resolver
|
||||||
parseQuery(query) {
|
parseQuery(query) {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import Vue from 'vue';
|
import { createRouter } from 'vue-router';
|
||||||
import VueRouter from 'vue-router'
|
|
||||||
import qs from 'qs';
|
import qs from 'qs';
|
||||||
|
|
||||||
import RolesList from '../pages/roles-list.vue';
|
import RolesList from '../pages/roles-list.vue';
|
||||||
|
@ -7,17 +6,13 @@ import RoleEditionForm from '../pages/role-edition-form.vue'
|
||||||
|
|
||||||
const { __ } = wp.i18n;
|
const { __ } = wp.i18n;
|
||||||
|
|
||||||
Vue.use(VueRouter);
|
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{ path: '/', redirect:'/roles' },
|
{ path: '/', redirect:'/roles' },
|
||||||
{ path: '/roles', name: 'RolesList', component: RolesList, meta: { title: __('Tainacan User Roles') } },
|
{ path: '/roles', name: 'RolesList', component: RolesList, meta: { title: __('Tainacan User Roles') } },
|
||||||
{ path: '/roles/:roleSlug', name: 'RoleEditionForm', component: RoleEditionForm, meta: { title: __('Editing User Role') } },
|
{ path: '/roles/:roleSlug', name: 'RoleEditionForm', component: RoleEditionForm, meta: { title: __('Editing User Role') } },
|
||||||
|
|
||||||
{ path: '*', redirect: '/'}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export default new VueRouter ({
|
export default createRouter({
|
||||||
routes,
|
routes,
|
||||||
// set custom query resolver
|
// set custom query resolver
|
||||||
parseQuery(query) {
|
parseQuery(query) {
|
||||||
|
|
Loading…
Reference in New Issue