From 415dd9901b4fe5c1569d90fafbd03485baa8d688 Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Mon, 31 Dec 2012 09:02:10 +0000 Subject: [PATCH] 2012-12-31 Juan Manuel Ramon * godmode/tag/tag.php godmode/tag/edit_tag.php: Tag editor compatible with metaconsole. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7345 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 ++++ pandora_console/godmode/tag/edit_tag.php | 21 +++++++++++--- pandora_console/godmode/tag/tag.php | 37 +++++++++++++++--------- 3 files changed, 46 insertions(+), 17 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 7deb13a419..7ac916beb5 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-12-31 Juan Manuel Ramon + + * godmode/tag/tag.php + godmode/tag/edit_tag.php: Tag editor compatible with metaconsole. + 2012-12-31 Juan Manuel Ramon * godmode/reporting/reporting_builder.php: Fixes in template diff --git a/pandora_console/godmode/tag/edit_tag.php b/pandora_console/godmode/tag/edit_tag.php index 8619fa8375..d87e9ce264 100644 --- a/pandora_console/godmode/tag/edit_tag.php +++ b/pandora_console/godmode/tag/edit_tag.php @@ -37,16 +37,29 @@ $url_tag = (string) get_parameter ("url_tag", ""); $email_tag = (string) get_parameter ("email_tag", ""); $tab = (string) get_parameter ("tab", "list"); +if (defined('METACONSOLE')) + $sec = 'advanced'; +else + $sec = 'gmodules'; + $buttons = array( 'list' => array( 'active' => false, - 'text' => '' . + 'text' => '' . html_print_image ("images/god6.png", true, array ("title" => __('List tags'))) .'')); $buttons[$tab]['active'] = true; -// Header -ui_print_page_header (__('Tags configuration'), "images/setup.png", false, "", true, $buttons); +if (defined('METACONSOLE')) { + // Print header + ui_meta_print_header(__('Tags'), "", $buttons); +} +else { + + // Header + ui_print_page_header (__('Tags configuration'), "images/setup.png", false, "", true, $buttons); + +} // Two actions can performed in this page: update and create tags // Update tag: update an existing tag @@ -125,7 +138,7 @@ else { } // Create/Update tag form -echo '
'; +echo ''; echo '
'; diff --git a/pandora_console/godmode/tag/tag.php b/pandora_console/godmode/tag/tag.php index 79c429c9b3..9748e00367 100644 --- a/pandora_console/godmode/tag/tag.php +++ b/pandora_console/godmode/tag/tag.php @@ -56,16 +56,31 @@ if (is_ajax ()) { return; } +if (defined('METACONSOLE')) + $sec = 'advanced'; +else + $sec = 'gmodules'; + $buttons = array( 'list' => array( 'active' => false, - 'text' => '' . + 'text' => '' . html_print_image ("images/god6.png", true, array ("title" => __('List tags'))) .'')); $buttons[$tab]['active'] = true; -// Header -ui_print_page_header (__('Tags configuration'), "images/setup.png", false, "", true, $buttons); +if (defined('METACONSOLE')) { + + // Print header + ui_meta_print_header(__('Tags'), "", $buttons); + +} +else { + + // Header + ui_print_page_header (__('Tags configuration'), "images/setup.png", false, "", true, $buttons); + +} // Two actions can performed in this page: search and delete tags @@ -106,7 +121,7 @@ echo ""; echo '' . __("Name") . "/" . __("Description") . ''; echo ""; echo ""; - echo ''; + echo ''; html_print_input_hidden ("search_tag", "1"); html_print_input_text ('tag_name', $tag_name, '', 30, 255, false); echo "   "; @@ -114,7 +129,7 @@ echo ""; echo ""; echo ""; echo ""; - echo '
'; + echo ''; html_print_input_hidden ("create_tag", "1", true); html_print_submit_button (__('Create tag'), 'create_button', false, 'class="sub next"'); echo "
"; @@ -158,26 +173,22 @@ if (!empty($result)) { $data = array (); - $data[0] = "" . $tag["name"] . ""; + $data[0] = "" . $tag["name"] . ""; $data[1] = ui_print_truncate_text($tag["description"], 'description', false); $data[2] = '' . $tag["url"] . ''; $data[3] = ' ' . + href="' . ui_get_full_url(false, false, false, false) . '/ajax.php?page=godmode/tag/tag&get_tag_tooltip=1&id_tag=' . $tag['id_tag'] . '">' . html_print_image("images/zoom.png", true, array("id" => 'tag-details-'.$tag['id_tag'], "class" => "img_help")) . ' '; $data[3] .= tags_get_modules_count($tag["id_tag"]); $data[4] = $tag["email"]; - $data[5] = "" . html_print_image("images/config.png", true, array("title" => "Edit")) . "  "; - $data[5] .= '' . html_print_image("images/cross.png", true, array("title" => "Delete")) . ''; + $data[5] = "" . html_print_image("images/config.png", true, array("title" => "Edit")) . "  "; + $data[5] .= '' . html_print_image("images/cross.png", true, array("title" => "Delete")) . ''; array_push ($table->data, $data); } html_print_table ($table); } -else { - // No tags available or selected - echo "
".__('No tags selected')."
"; -} ui_require_css_file ('cluetip'); ui_require_jquery_file ('cluetip');