Module: check_mk
Branch: master
Commit: ad66c979b74fbcb9acc8f6088d80bce4c76fbbc6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ad66c979b74fbc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Aug 1 11:25:16 2016 +0200
Small improvement of pending changes button
---
web/htdocs/wato.py | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 5f7e261..fdc1949 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -15981,12 +15981,18 @@ def home_button():
def changelog_button():
pending = parse_audit_log("pending")
- if len(pending) > 0:
- buttontext = "%d " % len(pending) + _("Changes")
+ num_pending = len(pending)
+ if num_pending >= 1:
hot = True
icon = "wato_changes"
+
+ if num_pending == 1:
+ buttontext = _("1 change")
+ else:
+ buttontext = _("%d changes") % num_pending
+
else:
- buttontext = _("No Changes")
+ buttontext = _("No changes")
hot = False
icon = "wato_nochanges"
html.context_button(buttontext, folder_preserving_link([("mode",
"changelog")]), icon, hot)