From 25435a67dedbf7426e9f5e21259175955d9ad879 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Fri, 29 Jul 2011 14:33:02 +0000 Subject: [PATCH] 2011-07-29 Sergio Martin * operation/events/events_list.php: Change the events free search tag by a combo with all the possible tags for 3380040 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4656 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 ++++ .../operation/events/events_list.php | 24 +++++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index de78a4cc1e..f0998649ea 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2011-07-29 Sergio Martin + + * operation/events/events_list.php: Change the events free search tag + by a combo with all the possible tags for 3380040 + 2011-07-29 Sergio Martin * operation/servers/view_server_detail.php: Changed the progress graph diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index 3ba11123d0..b867ce5d91 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -24,6 +24,7 @@ require_once($config['homedir'] . "/include/functions_users.php"); //Users funct require_once ($config['homedir'] . '/include/functions_groups.php'); require_once ($config["homedir"] . '/include/functions_graph.php'); +require_once ($config["homedir"] . '/include/functions_tags.php'); check_login (); @@ -34,7 +35,7 @@ if (! check_acl ($config["id_user"], 0, "IR")) { return; } -$tag_search = get_parameter("tag", ""); +$tag = get_parameter("tag", ""); if ($id_agent == -2) { $text_agent = (string) get_parameter("text_agent", __("All")); @@ -134,8 +135,8 @@ if ($event_view_hr > 0) { } //Search by tag -if ($tag_search != "") { - $sql_post .= " AND tags LIKE '%".io_safe_input($tag_search)."%'"; +if ($tag != "") { + $sql_post .= " AND tags LIKE '%".io_safe_input($tag)."%'"; } $url = "index.php?sec=eventos&sec2=operation/events/events&search=" . @@ -144,7 +145,7 @@ $url = "index.php?sec=eventos&sec2=operation/events/events&search=" . $ev_group . "&refr=" . $config["refr"] . "&id_agent=" . $id_agent . "&id_event=" . $id_event . "&pagination=" . $pagination . "&group_rep=" . $group_rep . "&event_view_hr=" . - $event_view_hr . "&id_user_ack=" . $id_user_ack . "&tag_search=" . $tag_search . "&offset=" . $offset; + $event_view_hr . "&id_user_ack=" . $id_user_ack . "&tag=" . $tag . "&offset=" . $offset; echo "
"; //Link to toggle filter @@ -243,7 +244,20 @@ html_print_select ($repeated_sel, "group_rep", $group_rep, ''); echo ""; echo ""; echo __("Tag") . ""; -html_print_input_text ('tag', $tag_search, '', 15); +//html_print_input_text ('tag', $tag_search, '', 15); +$tags = tags_search_tag(); + +if($tags === false) { + $tags = array(); +} + +$tags_name = array(); +foreach($tags as $t) { + $tags_name[$t['name']] = $t['name']; +} + +html_print_select ($tags_name, "tag", $tag, '', __('All'), ""); + echo ""; echo '';