Module: check_mk
Branch: master
Commit: 454f93fc73805413af1f9c48116e1167943335a2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=454f93fc738054…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Mon Jul 30 12:29:49 2018 +0200
Change theme descriptions in the GUI to "Modern" and "Classic"
Change-Id: If4fbf33cb121fc66a876d8154874485c324a7100
---
cmk/gui/config.py | 7 +++++++
cmk/gui/plugins/userdb/user_attributes.py | 6 ++----
cmk/gui/plugins/wato/check_mk_configuration.py | 5 +----
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/cmk/gui/config.py b/cmk/gui/config.py
index 99ef446..91f39cf 100644
--- a/cmk/gui/config.py
+++ b/cmk/gui/config.py
@@ -1046,3 +1046,10 @@ def load_plugins(force):
# Make sure, builtin roles are present, even if not modified and saved with WATO.
for br in builtin_role_ids:
roles.setdefault(br, {})
+
+
+def theme_choices():
+ return [
+ ("classic", _("Classic")),
+ ("facelift", _("Modern")),
+ ]
diff --git a/cmk/gui/plugins/userdb/user_attributes.py
b/cmk/gui/plugins/userdb/user_attributes.py
index bde8b0e..171ee5f 100644
--- a/cmk/gui/plugins/userdb/user_attributes.py
+++ b/cmk/gui/plugins/userdb/user_attributes.py
@@ -24,6 +24,7 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+from cmk.gui.config import theme_choices
from cmk.gui.valuespec import *
from cmk.gui.i18n import _
from cmk.gui.globals import html
@@ -193,10 +194,7 @@ class UIThemeUserAttribute(UserAttribute):
),
DropdownChoice(
title = _("Set custom theme"),
- choices = [
- ("classic", _("Classic user interface")),
- ("facelift", _("Face lifted")),
- ],
+ choices = theme_choices(),
),
],
)
diff --git a/cmk/gui/plugins/wato/check_mk_configuration.py
b/cmk/gui/plugins/wato/check_mk_configuration.py
index 487cc7d..64ef5ef 100644
--- a/cmk/gui/plugins/wato/check_mk_configuration.py
+++ b/cmk/gui/plugins/wato/check_mk_configuration.py
@@ -111,10 +111,7 @@ register_configvar(
DropdownChoice(
title = _("User interface theme"),
help = _("Change the default user interface theme of your Check_MK
installation"),
- choices = [
- ("classic", _("Classic user interface")),
- ("facelift", _("Face lifted")),
- ],
+ choices = config.theme_choices(),
),
domain = "multisite",
)