From acdc56087bbffd4342bb323acfae6ea71a3cab06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Poussard?= <tpoussard@neogeo.fr> Date: Mon, 10 Jan 2022 11:36:27 +0100 Subject: [PATCH] add parameter to disable idgo buttons --- public/config/config.json | 1 + src/views/feature_type/Feature_type_detail.vue | 10 +++++++++- src/views/project/Project_detail.vue | 6 +++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/public/config/config.json b/public/config/config.json index 9651190e..fd6f71da 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -9,6 +9,7 @@ "VUE_APP_LOGO_PATH":"/geocontrib/img/logo-neogeo-circle.png", "VUE_APP_DJANGO_BASE":"http://localhost:8010", "VUE_APP_DJANGO_API_BASE":"http://localhost:8010/api/", + "VUE_APP_IDGO": false, "VUE_APP_RELOAD_INTERVAL": 15000, "VUE_APP_DISABLE_LOGIN_BUTTON":false, "VUE_APP_LOGIN_URL":"", diff --git a/src/views/feature_type/Feature_type_detail.vue b/src/views/feature_type/Feature_type_detail.vue index bae93743..85d6831b 100644 --- a/src/views/feature_type/Feature_type_detail.vue +++ b/src/views/feature_type/Feature_type_detail.vue @@ -88,6 +88,7 @@ <router-link v-if=" + IDGO && permissions && permissions.can_create_feature " @@ -101,7 +102,7 @@ class="ui icon button import-catalog" >Créer un nouveau type de signalement à partir du catalogue Datasud </router-link> - <div v-if="$route.params.geojson" class="ui button import-catalog basic active teal"> + <div v-if="$route.params.geojson" class="ui button import-catalog basic active teal no-hover"> Ressource {{$route.params.geojson.name}} </div> <ul v-if="importError" class="errorlist"> @@ -289,6 +290,9 @@ export default { 'feature_types', 'importFeatureTypeData' ]), + IDGO() { + return this.$store.state.configuration.VUE_APP_IDGO; + }, structure: function () { if (Object.keys(this.feature_types).length) { let st = this.feature_types.find( @@ -503,4 +507,8 @@ export default { .import-catalog { margin-bottom: 1em; } + +.no-hover { + cursor: default; +} </style> \ No newline at end of file diff --git a/src/views/project/Project_detail.vue b/src/views/project/Project_detail.vue index 419469b6..d5a42d06 100644 --- a/src/views/project/Project_detail.vue +++ b/src/views/project/Project_detail.vue @@ -327,6 +327,7 @@ <div class="nouveau-type-signalement"> <router-link v-if=" + IDGO && permissions && permissions.can_update_project && isOffline() !== true @@ -683,7 +684,7 @@ export default { ...mapState([ 'last_comments', 'user', - 'reloadIntervalId' + 'reloadIntervalId', ]), ...mapState('map', [ 'map' @@ -694,6 +695,9 @@ export default { API_BASE_URL() { return this.$store.state.configuration.VUE_APP_DJANGO_API_BASE; }, + IDGO() { + return this.$store.state.configuration.VUE_APP_IDGO; + }, fileSize() { return fileConvertSizeToMo(this.fileToImport.size); } -- GitLab