Module: check_mk
Branch: master
Commit: 85d60143af2b5c3353df8dd18d79e42386253149
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=85d60143af2b5c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Aug 24 14:09:45 2011 +0200
Dashboard: Preservice dashboard display_options in sorter title links
---
web/htdocs/views.py | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index d860b01..3bf420a 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1079,6 +1079,14 @@ def show_view(view, show_heading = False, show_buttons = True,
show_footer = Tru
# If display option 'M' is set, then all links are targetet to the
'main'
# frame. Also the display options are removed since the view in the main
# frame should be displayed in standard mode.
+ #
+ # But there is one special case: The sorter links! These links need to know
+ # about the provided display_option parameter. The links could use
+ # "html.display_options" but this contains the implicit options which
should
+ # not be added to the URLs. So the real parameters need to be preserved for
+ # this case. It is stored in the var "html.display_options"
+ if html.var('display_options'):
+ html.title_display_options = html.var("display_options")
if 'M' not in display_options:
html.set_link_target("main")
html.del_var("display_options")
@@ -2286,8 +2294,8 @@ def paint_header(view, p):
]
if html.has_var('_body_class'):
params.append(('_body_class', html.var('_body_class')))
- if html.has_var('display_options'):
- params.append(('display_options',
html.var('display_options')))
+ if hasattr(html, 'title_display_options'):
+ params.append(('display_options', html.title_display_options))
t = "<a class=\"%s\" href=\"%s\"
title=\"%s\" target=\"_self\">%s</a>" % \
(get_primary_sorter_order(view, painter),