Module: check_mk
Branch: master
Commit: 06089c0105bdbd2d54836ee6e6291f7b7c164cf1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=06089c0105bdbd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jul 4 11:00:35 2012 +0200
FIX: view editor shows "(Mobile)" hint in view titles when linking to views
---
ChangeLog | 1 +
web/htdocs/views.py | 6 +++++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 374af9d..7cb1750 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,7 @@
* FIX: fixed exception when refering to a language which does not exist
* FIX: Removing all downtimes of a host/service is now possible again
* FIX: The refresh time in footer is updated now when changing the value
+ * FIX: view editor shows "(Mobile)" hint in view titles when linking to
views
WATO:
* Main menu of ruleeditor (Host & Service Parameters) now has
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 2c3f7e2..b0856ac 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -433,7 +433,11 @@ def select_view(varname, only_with_hidden = False):
choices = [("", "")]
for name, view in html.available_views.items():
if not only_with_hidden or len(view["hide_filters"]) > 0:
- choices.append(("%s" % name, view["title"]))
+ if view.get('mobile', False):
+ title = view["title"] + _(' (Mobile)')
+ else:
+ title = view["title"]
+ choices.append(("%s" % name, title))
html.sorted_select(varname, choices, "")
# -------------------------------------------------------------------------