Module: check_mk
Branch: master
Commit: 4f2ef43a8347a0817cf7e9f72c3156d134fbfe47
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4f2ef43a8347a0…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu May 12 09:46:34 2011 +0200
Multisite: show custom title also in single layout
---
web/plugins/views/layouts.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/web/plugins/views/layouts.py b/web/plugins/views/layouts.py
index 960c8e6..ea4e029 100644
--- a/web/plugins/views/layouts.py
+++ b/web/plugins/views/layouts.py
@@ -45,7 +45,11 @@ def render_single_dataset(rows, view, group_painters, painters,
num_columns):
thispart = rows[rownum:rownum + num_columns]
for p in painters:
painter, link = p[0:2]
- html.write("<tr class=data><td
class=left>%s</td>" % painter["title"])
+ if len(p) >= 5 and p[4]:
+ title = p[4] # Use custom title
+ else:
+ title = painter["title"]
+ html.write("<tr class=data><td
class=left>%s</td>" % title)
for row in thispart:
paint(p, row)
if len(thispart) < num_columns: