Module: check_mk
Branch: master
Commit: b80ebfc3895fcbaa09c0a11cd475abd857ca08ad
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b80ebfc3895fcb…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Nov 7 15:44:10 2011 +0100
WATO: icon instead of button for edit rule
---
web/htdocs/images/button_edit_hi.png | Bin 544 -> 2795 bytes
web/htdocs/images/button_edit_lo.png | Bin 549 -> 3408 bytes
web/htdocs/wato.py | 21 ++++++++-------------
3 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/web/htdocs/images/button_edit_hi.png b/web/htdocs/images/button_edit_hi.png
index 2fdca44..fb33ba5 100644
Binary files a/web/htdocs/images/button_edit_hi.png and
b/web/htdocs/images/button_edit_hi.png differ
diff --git a/web/htdocs/images/button_edit_lo.png b/web/htdocs/images/button_edit_lo.png
index 973bbff..bddd87b 100644
Binary files a/web/htdocs/images/button_edit_lo.png and
b/web/htdocs/images/button_edit_lo.png differ
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 02cb90e..fddf823 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8563,7 +8563,6 @@ def mode_edit_ruleset(phase):
"<th>" + _("Folder") +
"</th>"
"<th>" + _("Value") +
"</th>"
"<th>" + _("Conditions") +
"</th>"
- "<th></th>" # Edit
"<th></th>" # Several icons
"</tr>\n")
@@ -8603,6 +8602,14 @@ def mode_edit_ruleset(phase):
rule_button("down", _("Move this rule one position
down"), folder, rel_rulenr)
else:
rule_button(None)
+ edit_url = make_link([
+ ("mode", "edit_rule"),
+ ("varname", varname),
+ ("rulenr", rel_rulenr),
+ ("host", hostname),
+ ("item", repr(item)),
+ ("rule_folder", folder[".path"])])
+ icon_button(edit_url, _("Edit this rule"), "edit")
rule_button("insert", _("Insert a copy of this rule into the
folder '%s'")
% g_folder["title"], folder, rel_rulenr)
rule_button("delete", _("Delete this rule"), folder,
rel_rulenr)
@@ -8667,18 +8674,6 @@ def mode_edit_ruleset(phase):
render_conditions(rulespec, tag_specs, host_list, item_list, varname,
folder)
html.write("</td>")
- # Edit
- html.write("<td class=buttons>")
- url = make_link([
- ("mode", "edit_rule"),
- ("varname", varname),
- ("rulenr", rel_rulenr),
- ("host", hostname),
- ("item", repr(item)),
- ("rule_folder", folder[".path"])])
- html.buttonlink(url, _("Edit"))
- html.write("</td>")
-
# Icons
html.write("<td>")
# "this folder"