Mercurial > gemma
annotate client/src/components/systemconfiguration/Systemconfiguration.vue @ 5472:9321d9fb719f
improve README.md about licensing
* Use meanwhile established `SPDX-FileCopyrightText:` line to give the
holder of the usage rights, improve the explanation.
* Use `SPDX-License-Identifier:` also here.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Tue, 20 Jul 2021 11:50:17 +0200 |
parents | 851c0ccba59b |
children | 7768f14f6535 |
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 | |
3889
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
72 <style lang="sass"> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
73 .nav-pills |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
74 .nav-link |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
75 border-radius: 0 |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
76 &.active |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
77 background: $color-info |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
78 </style> |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
79 |
2213 | 80 <script> |
81 /* This is Free Software under GNU Affero General Public License v >= 3.0 | |
82 * without warranty, see README.md and license for details. | |
83 * | |
84 * SPDX-License-Identifier: AGPL-3.0-or-later | |
85 * License-Filename: LICENSES/AGPL-3.0.txt | |
86 * | |
87 * Copyright (C) 2018 by via donau | |
88 * – Österreichische Wasserstraßen-Gesellschaft mbH | |
89 * Software engineering by Intevation GmbH | |
90 * | |
91 * Author(s): | |
92 * Thomas Junk <thomas.junk@intevation.de> | |
93 * Bernhard Reiter <bernhard@intevation.de> | |
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
2247
diff
changeset
|
94 * Markus Kottländer <markus@intevation.de> |
2213 | 95 */ |
2277
5f3110aa1ad1
made configuration page accessible for waterway admins
Markus Kottlaender <markus@intevation.de>
parents:
2276
diff
changeset
|
96 import { mapGetters } from "vuex"; |
5f3110aa1ad1
made configuration page accessible for waterway admins
Markus Kottlaender <markus@intevation.de>
parents:
2276
diff
changeset
|
97 |
2213 | 98 export default { |
3889
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
99 data() { |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
100 return { |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
101 activeTab: "pdf-templates" |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
102 }; |
851c0ccba59b
client: configuration: separated sections in tabs
Markus Kottlaender <markus@intevation.de>
parents:
3680
diff
changeset
|
103 }, |
2213 | 104 components: { |
105 Spacer: () => import("../Spacer"), | |
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
2247
diff
changeset
|
106 PDFTemplates: () => import("./PDFTemplates"), |
3625
a688a478e35f
implemented configuration backend and frontend
Markus Kottlaender <markus@intevation.de>
parents:
3597
diff
changeset
|
107 ColorSettings: () => import("./ColorSettings"), |
a688a478e35f
implemented configuration backend and frontend
Markus Kottlaender <markus@intevation.de>
parents:
3597
diff
changeset
|
108 MapLayers: () => import("./MapLayers"), |
a688a478e35f
implemented configuration backend and frontend
Markus Kottlaender <markus@intevation.de>
parents:
3597
diff
changeset
|
109 DataAccuracy: () => import("./DataAccuracy"), |
a688a478e35f
implemented configuration backend and frontend
Markus Kottlaender <markus@intevation.de>
parents:
3597
diff
changeset
|
110 MorphologyClassbreaks: () => import("./MorphologyClassbreaks") |
2277
5f3110aa1ad1
made configuration page accessible for waterway admins
Markus Kottlaender <markus@intevation.de>
parents:
2276
diff
changeset
|
111 }, |
5f3110aa1ad1
made configuration page accessible for waterway admins
Markus Kottlaender <markus@intevation.de>
parents:
2276
diff
changeset
|
112 computed: { |
2760
c6fba10926cc
client:correct a set of strings marking
Fadi Abbud <fadi.abbud@intevation.de>
parents:
2534
diff
changeset
|
113 ...mapGetters("user", ["isSysAdmin"]), |
c6fba10926cc
client:correct a set of strings marking
Fadi Abbud <fadi.abbud@intevation.de>
parents:
2534
diff
changeset
|
114 systemconfigurationLabel() { |
c6fba10926cc
client:correct a set of strings marking
Fadi Abbud <fadi.abbud@intevation.de>
parents:
2534
diff
changeset
|
115 return this.$gettext("Systemconfiguration"); |
c6fba10926cc
client:correct a set of strings marking
Fadi Abbud <fadi.abbud@intevation.de>
parents:
2534
diff
changeset
|
116 } |
3680
0300282b9537
client: configuration: changed loading strategy
Markus Kottlaender <markus@intevation.de>
parents:
3625
diff
changeset
|
117 }, |
0300282b9537
client: configuration: changed loading strategy
Markus Kottlaender <markus@intevation.de>
parents:
3625
diff
changeset
|
118 mounted() { |
0300282b9537
client: configuration: changed loading strategy
Markus Kottlaender <markus@intevation.de>
parents:
3625
diff
changeset
|
119 this.$store.dispatch("application/loadConfig"); |
2213 | 120 } |
121 }; | |
122 </script> |