Mercurial > gemma
annotate client/src/components/systemconfiguration/Systemconfiguration.vue @ 5736:55892008ec96 default tip
Fixed a bunch of corner cases in WG import.
author | Sascha Wilde <wilde@sha-bang.de> |
---|---|
date | Wed, 29 May 2024 19:02:42 +0200 |
parents | 84d01a536bec |
children |
rev | line source |
---|---|
2213 | 1 <template> |
3588
cffa99aa523c
client: systemconfiguration: made container scrollable for more configuration options
Markus Kottlaender <markus@intevation.de>
parents:
2919
diff
changeset
|
2 <div class="d-flex h-100"> |
2919
6c5364ff0abb
client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents:
2760
diff
changeset
|
3 <Spacer /> |
3588
cffa99aa523c
client: systemconfiguration: made container scrollable for more configuration options
Markus Kottlaender <markus@intevation.de>
parents:
2919
diff
changeset
|
4 <div class="card my-2 mr-2 flex-fill shadow-xs"> |
2760
c6fba10926cc
client:correct a set of strings marking
Fadi Abbud <fadi.abbud@intevation.de>
parents:
2534
diff
changeset
|
5 <UIBoxHeader icon="wrench" :title="systemconfigurationLabel" /> |
3597
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3588
diff
changeset
|
6 <div class="text-left flex-fill" style="overflow: auto"> |
3889
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
7 <ul class="nav nav-pills nav-fill border-bottom"> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
8 <li class="nav-item"> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
9 <a |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
10 :class="['nav-link', { active: activeTab === 'pdf-templates' }]" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
11 href="#" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
12 @click.prevent="activeTab = 'pdf-templates'" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
13 > |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
14 <translate>PDF-Templates</translate> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
15 </a> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
16 </li> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
17 <li class="nav-item" v-if="isSysAdmin"> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
18 <a |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
19 :class="['nav-link', { active: activeTab === 'color-settings' }]" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
20 href="#" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
21 @click.prevent="activeTab = 'color-settings'" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
22 > |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
23 <translate>Color Settings</translate> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
24 </a> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
25 </li> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
26 <li class="nav-item" v-if="isSysAdmin"> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
27 <a |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
28 :class="['nav-link', { active: activeTab === 'map-layers' }]" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
29 href="#" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
30 @click.prevent="activeTab = 'map-layers'" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
31 > |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
32 <translate>Map Layers</translate> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
33 </a> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
34 </li> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
35 <li class="nav-item" v-if="isSysAdmin"> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
36 <a |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
37 :class="['nav-link', { active: activeTab === 'data-accuracy' }]" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
38 href="#" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
39 @click.prevent="activeTab = 'data-accuracy'" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
40 > |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
41 <translate>Data Availability/Accuracy</translate> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
42 </a> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
43 </li> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
44 <li class="nav-item" v-if="isSysAdmin"> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
45 <a |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
46 :class="[ |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
47 'nav-link', |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
48 { active: activeTab === 'morphology-classbreaks' } |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
49 ]" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
50 href="#" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
51 @click.prevent="activeTab = 'morphology-classbreaks'" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
52 > |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
53 <translate>Bottleneck Morphology Classbreaks</translate> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
54 </a> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
55 </li> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
56 </ul> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
57 <keep-alive> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
58 <PDFTemplates v-if="activeTab === 'pdf-templates'" /> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
59 <ColorSettings v-if="isSysAdmin && activeTab === 'color-settings'" /> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
60 <MapLayers v-if="isSysAdmin && activeTab === 'map-layers'" /> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
61 <DataAccuracy v-if="isSysAdmin && activeTab === 'data-accuracy'" /> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
62 <MorphologyClassbreaks |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
63 v-if="isSysAdmin && activeTab === 'morphology-classbreaks'" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
64 /> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
65 </keep-alive> |
2213 | 66 </div> |
67 <!-- card-body --> | |
68 </div> | |
69 </div> | |
70 </template> | |
71 | |
5629
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5627
diff
changeset
|
72 <style> |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5627
diff
changeset
|
73 .nav-pills .nav-link { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5627
diff
changeset
|
74 border-radius: 0; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5627
diff
changeset
|
75 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5627
diff
changeset
|
76 .nav-pills .nav-link.active { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5627
diff
changeset
|
77 background: var(--color-info); |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5627
diff
changeset
|
78 } |
3889
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
79 </style> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
80 |
2213 | 81 <script> |
82 /* This is Free Software under GNU Affero General Public License v >= 3.0 | |
83 * without warranty, see README.md and license for details. | |
84 * | |
85 * SPDX-License-Identifier: AGPL-3.0-or-later | |
86 * License-Filename: LICENSES/AGPL-3.0.txt | |
87 * | |
88 * Copyright (C) 2018 by via donau | |
89 * – Österreichische Wasserstraßen-Gesellschaft mbH | |
90 * Software engineering by Intevation GmbH | |
91 * | |
92 * Author(s): | |
93 * Thomas Junk <thomas.junk@intevation.de> | |
94 * Bernhard Reiter <bernhard@intevation.de> | |
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
2247
diff
changeset
|
95 * Markus Kottländer <markus@intevation.de> |
2213 | 96 */ |
2277
5f3110aa1ad1
made configuration page accessible for waterway admins
Markus Kottlaender <markus@intevation.de>
parents:
2276
diff
changeset
|
97 import { mapGetters } from "vuex"; |
5f3110aa1ad1
made configuration page accessible for waterway admins
Markus Kottlaender <markus@intevation.de>
parents:
2276
diff
changeset
|
98 |
2213 | 99 export default { |
3889
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
100 data() { |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
101 return { |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
102 activeTab: "pdf-templates" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
103 }; |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
104 }, |
2213 | 105 components: { |
106 Spacer: () => import("../Spacer"), | |
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
2247
diff
changeset
|
107 PDFTemplates: () => import("./PDFTemplates"), |
3625
a688a478e35f
implemented configuration backend and frontend
Markus Kottlaender <markus@intevation.de>
parents:
3597
diff
changeset
|
108 ColorSettings: () => import("./ColorSettings"), |
a688a478e35f
implemented configuration backend and frontend
Markus Kottlaender <markus@intevation.de>
parents:
3597
diff
changeset
|
109 MapLayers: () => import("./MapLayers"), |
a688a478e35f
implemented configuration backend and frontend
Markus Kottlaender <markus@intevation.de>
parents:
3597
diff
changeset
|
110 DataAccuracy: () => import("./DataAccuracy"), |
a688a478e35f
implemented configuration backend and frontend
Markus Kottlaender <markus@intevation.de>
parents:
3597
diff
changeset
|
111 MorphologyClassbreaks: () => import("./MorphologyClassbreaks") |
2277
5f3110aa1ad1
made configuration page accessible for waterway admins
Markus Kottlaender <markus@intevation.de>
parents:
2276
diff
changeset
|
112 }, |
5f3110aa1ad1
made configuration page accessible for waterway admins
Markus Kottlaender <markus@intevation.de>
parents:
2276
diff
changeset
|
113 computed: { |
2760
c6fba10926cc
client:correct a set of strings marking
Fadi Abbud <fadi.abbud@intevation.de>
parents:
2534
diff
changeset
|
114 ...mapGetters("user", ["isSysAdmin"]), |
c6fba10926cc
client:correct a set of strings marking
Fadi Abbud <fadi.abbud@intevation.de>
parents:
2534
diff
changeset
|
115 systemconfigurationLabel() { |
c6fba10926cc
client:correct a set of strings marking
Fadi Abbud <fadi.abbud@intevation.de>
parents:
2534
diff
changeset
|
116 return this.$gettext("Systemconfiguration"); |
c6fba10926cc
client:correct a set of strings marking
Fadi Abbud <fadi.abbud@intevation.de>
parents:
2534
diff
changeset
|
117 } |
3680
0300282b9537
client: configuration: changed loading strategy
Markus Kottlaender <markus@intevation.de>
parents:
3625
diff
changeset
|
118 }, |
0300282b9537
client: configuration: changed loading strategy
Markus Kottlaender <markus@intevation.de>
parents:
3625
diff
changeset
|
119 mounted() { |
0300282b9537
client: configuration: changed loading strategy
Markus Kottlaender <markus@intevation.de>
parents:
3625
diff
changeset
|
120 this.$store.dispatch("application/loadConfig"); |
2213 | 121 } |
122 }; | |
123 </script> |