Module: check_mk
Branch: master
Commit: 7877bbf28d92830beaf1cac451595f2ae1238d89
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7877bbf28d9283…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jun 1 17:00:18 2011 +0200
WATO: improved search dialog
---
web/htdocs/check_mk.css | 8 ++++++--
web/htdocs/wato.py | 13 +++++--------
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css
index 8c73694..2ea3954 100644
--- a/web/htdocs/check_mk.css
+++ b/web/htdocs/check_mk.css
@@ -1629,11 +1629,15 @@ table.add_snapin i {
position: relative;*/
}
+.wato table.form td.legend {
+ border-right-style: none;
+}
+
.wato table.form td.checkbox {
width: 40px;
height: 40px;
- vertical-align: middle;
- text-align: center;
+ vertical-align: top;
+ text-align: right;
border: 1px solid white;
border-left-style: none;
}
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index d06f0ce..1036139 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -849,12 +849,6 @@ def mode_search(phase):
html.begin_form("search")
html.write("<table class=form>")
- # Wether to search only in this folder
- html.write("<tr><td class=legend></td><td colspan=2
class=content>")
- html.checkbox("onlyhere", True)
- html.write(_(" Search only in the folder <b>%s</b> and
below") % g_folder["title"])
- html.write("</td></tr>")
-
# host name
html.write("<tr><td class=legend>" +
_("Hostname") + "</td><td class=content></td><td
class=content>")
html.text_input("host")
@@ -866,9 +860,12 @@ def mode_search(phase):
# Button
html.write('<tr><td class="buttons" colspan=3>')
- html.button("save", _("Search"), "submit")
+ html.button("_global", _("Search globally"),
"submit")
+ html.button("_local", _("Search in %s") %
g_folder["title"], "submit")
html.write("</td></tr>\n")
+
+
html.write("</table>\n")
html.hidden_fields()
html.end_form()
@@ -882,7 +879,7 @@ def mode_search(phase):
crit.update(collect_attributes(do_validate = False))
html.write("<h3>" + _("Search results:") +
"</h3>")
- if html.var("onlyhere"):
+ if html.has_var("_local"):
folder = g_folder
else:
folder = g_root_folder