Skip to content
Snippets Groups Projects
Commit 9e584734 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

disable imports when offline

parent d5d40a32
No related branches found
No related tags found
2 merge requests!424version 3.1.0,!306REDMINE_ISSUE-13263|REDMINE_ISSUE-13277
...@@ -71,13 +71,13 @@ ...@@ -71,13 +71,13 @@
class="ui styled accordion" class="ui styled accordion"
> >
<div <div
:class="['title', { active: showImport }]" :class="['title', { active: showImport && isOnline, nohover: !isOnline }]"
@click="toggleShowImport" @click="toggleShowImport"
> >
<i class="dropdown icon" /> <i class="dropdown icon" />
Importer des signalements Importer des signalements
</div> </div>
<div :class="['content', { active: showImport }]"> <div :class="['content', { active: showImport && isOnline }]">
<div <div
id="form-import-features" id="form-import-features"
class="ui form" class="ui form"
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
</router-link> </router-link>
<div <div
v-if="$route.params.geojson" v-if="$route.params.geojson"
class="ui button import-catalog basic active teal no-hover" class="ui button import-catalog basic active teal nohover"
> >
Ressource {{ $route.params.geojson.name }} Ressource {{ $route.params.geojson.name }}
</div> </div>
...@@ -149,13 +149,13 @@ ...@@ -149,13 +149,13 @@
</div> </div>
<div class="ui styled accordion"> <div class="ui styled accordion">
<div <div
:class="['title', { active: !showImport }]" :class="['title', { active: !showImport && isOnline, nohover: !isOnline }]"
@click="toggleShowImport" @click="toggleShowImport"
> >
<i class="dropdown icon" /> <i class="dropdown icon" />
Exporter les signalements Exporter les signalements
</div> </div>
<div :class="['content', { active: !showImport }]"> <div :class="['content', { active: !showImport && isOnline}]">
<p> <p>
Vous pouvez télécharger tous les signalements qui vous sont Vous pouvez télécharger tous les signalements qui vous sont
accessibles. accessibles.
...@@ -332,7 +332,7 @@ export default { ...@@ -332,7 +332,7 @@ export default {
computed: { computed: {
...mapGetters([ ...mapGetters([
'permissions' 'permissions',
]), ]),
...mapGetters('projects', [ ...mapGetters('projects', [
'project' 'project'
...@@ -340,6 +340,7 @@ export default { ...@@ -340,6 +340,7 @@ export default {
...mapState([ ...mapState([
'reloadIntervalId', 'reloadIntervalId',
'configuration', 'configuration',
'isOnline',
]), ]),
...mapState('projects', [ ...mapState('projects', [
'project' 'project'
...@@ -591,7 +592,11 @@ export default { ...@@ -591,7 +592,11 @@ export default {
margin-bottom: 1em; margin-bottom: 1em;
} }
.no-hover { .nohover, .nohover:hover {
cursor: default; cursor: default;
} }
.ui.styled.accordion .nohover.title:hover {
color: rgba(0, 0, 0, .4);
}
</style> </style>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment