Module: check_mk
Branch: master
Commit: 6a40ee9ea3ee1fd7ed174c02d5e5a0dbdedd2224
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6a40ee9ea3ee1f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Dec 5 13:34:41 2014 +0100
Moved "add dashlet" choice to top of dashboard editor menu
---
web/htdocs/dashboard.py | 34 ++++++++++++++++++++++++----------
1 file changed, 24 insertions(+), 10 deletions(-)
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index 6449c2f..7fa419f 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -431,18 +431,11 @@ def render_dashboard(name):
html.write('<li><a
href="%s">%s</a></li>\n' % (html.makeuri([('edit',
1)]), _('Edit Dashboard')))
else:
- # Show these options only to the owner of the dashboard
- html.write('<li><a
href="edit_dashboard.py?load_name=%s&back=%s" '
- 'onmouseover="hide_submenus();"
>%s</a></li>\n' %
- (name, html.urlencode(html.makeuri([])), _('Properties')))
+ #
+ # Add dashlet menu
+ #
- # Links visible during editing
display = html.var('edit') == '1' and 'block' or
'none'
- html.write('<li id="control_view"
style="display:%s"><a href="javascript:void(0)" '
- 'onmouseover="hide_submenus();" '
-
'onclick="toggle_dashboard_edit(false)">%s</a>\n' %
- (display, _('Stop Editing')))
-
html.write('<li id="control_add" class="sublink"
style="display:%s" '
'onmouseover="show_submenu(\'control_add\')"><a
href="javascript:void(0)">%s</a>\n' %
(display, _('Add dashlet')))
@@ -468,7 +461,28 @@ def render_dashboard(name):
html.write('</li>\n')
+ #
+ # Properties link
+ #
+
+ html.write('<li><a
href="edit_dashboard.py?load_name=%s&back=%s" '
+ 'onmouseover="hide_submenus();"
>%s</a></li>\n' %
+ (name, html.urlencode(html.makeuri([])), _('Properties')))
+
+ #
+ # Stop editing
+ #
+
+ display = html.var('edit') == '1' and 'block' or
'none'
+ html.write('<li id="control_view"
style="display:%s"><a href="javascript:void(0)" '
+ 'onmouseover="hide_submenus();" '
+
'onclick="toggle_dashboard_edit(false)">%s</a></li>\n' %
+ (display, _('Stop Editing')))
+
+ #
# Enable editing link
+ #
+
display = html.var('edit') != '1' and 'block' or
'none'
html.write('<li id="control_edit"
style="display:%s"><a href="javascript:void(0)" '
'onclick="toggle_dashboard_edit(true)">%s</a></li>\n' %