From e94d26e789361a7bd716d6e5684134ff91370e0a Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 13 Mar 2012 16:56:39 +0000 Subject: [PATCH] 2012-03-13 Miguel de Dios * godmode/reporting/reporting_builder.preview.php: fixed when the Pandora have not enterprise part and show "-1" instead empty string. * operation/reporting/reporting_viewer.php: added the enterprise posibility to generate PDF from this report. And added the posibility to go to edit the report from this page. Finally fixed the hidden first row of form, now show again the check to select method to calculate and the title and other things. * include/functions_ui.php: fixed into the function "ui_print_page_header" when the header have not any active tab. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5758 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 14 ++++++++++++ .../reporting/reporting_builder.preview.php | 5 ++++- pandora_console/include/functions_ui.php | 6 +++-- .../operation/reporting/reporting_viewer.php | 22 ++++++++++++++----- 4 files changed, 38 insertions(+), 9 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 3f69a50485..898b5e7c81 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,17 @@ +2012-03-13 Miguel de Dios + + * godmode/reporting/reporting_builder.preview.php: fixed when the Pandora + have not enterprise part and show "-1" instead empty string. + + * operation/reporting/reporting_viewer.php: added the enterprise posibility + to generate PDF from this report. And added the posibility to go to edit the + report from this page. Finally fixed the hidden first row of form, now show + again the check to select method to calculate and the title and other + things. + + * include/functions_ui.php: fixed into the function "ui_print_page_header" + when the header have not any active tab. + 2012-03-13 Miguel de Dios * godmode/reporting/reporting_builder.preview.php: fixed the calendar js diff --git a/pandora_console/godmode/reporting/reporting_builder.preview.php b/pandora_console/godmode/reporting/reporting_builder.preview.php index df5f7ec7fa..5b780ee63e 100644 --- a/pandora_console/godmode/reporting/reporting_builder.preview.php +++ b/pandora_console/godmode/reporting/reporting_builder.preview.php @@ -100,7 +100,10 @@ $table->data[1][0] = __('Date'); $table->data[1][1] = html_print_input_text ('date', $date, '', 12, 10, true). ' '; $table->data[1][1] .= html_print_input_text ('time', $time, '', 7, 7, true). ' '; $table->data[1][1] .= html_print_submit_button (__('Update'), 'date_submit', false, 'class="sub next"', true); -$table->data[1][1] .= enterprise_hook('reporting_print_button_PDF', array($id_report)); +$html_enterprise = enterprise_hook('reporting_print_button_PDF', array($id_report)); +if ($html_enterprise !== ENTERPRISE_NOT_HOOK) { + $table->data[1][1] .= $html_enterprise; +} $table->data[1][2] = __('Set initial date of all reports') . html_print_checkbox('enable_init_date', 1, $enable_init_date, true); $table->data[1][3] = '' . __('Date') . '' . ui_print_help_tip(__('This is the begin date for all reports'), true); $table->data[1][4] = html_print_input_text ('date_init', $date_init, '', 12, 10, true). ' '; diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 837d7f8188..9f0a3b87e6 100644 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1821,8 +1821,10 @@ function ui_print_page_header ($title, $icon = "", $return = false, $help = "", else { if (is_array($option)) { $class = 'nomn'; - if ($option['active']) { - $class = 'nomn_high'; + if (isset($option['active'])) { + if ($option['active']) { + $class = 'nomn_high'; + } } $buffer .= '
  • '; diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index ff094d7258..24022d59b2 100644 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -41,6 +41,8 @@ if (! check_acl ($config['id_user'], $report['id_group'], "AR")) { require_once ('include/functions_reporting.php'); require_once ('include/functions_groups.php'); +enterprise_include("include/functions_reporting.php"); + // Check if the report is a private report. if ($report['private'] && ($report['id_user'] != $config['id_user'] && ! is_user_admin ($config['id_user']))) { include ("general/noaccess.php"); @@ -65,6 +67,10 @@ $enable_init_date = get_parameter('enable_init_date', 0); $url = "index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=$id_report&date=$date&time=$time"; +$options['setup'] = "" +. html_print_image ("images/setup.png", true, array ("title" => __('Setup'))) +. ""; + if ($config["pure"] == 0) { $options['screen'] = "" . html_print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode'))) @@ -76,7 +82,8 @@ else { . ""; } -ui_print_page_header (__('Reporting'). " » ". __('Custom reporting'). " - ".$report["name"], "images/reporting.png", false, "", false, $options); +ui_print_page_header (__('Reporting'). " » ". __('Custom reporting'). " - ".$report["name"], + "images/reporting.png", false, "", false, $options); if ($enable_init_date) { if ($datetime_init > $datetime) { @@ -119,6 +126,10 @@ else { } $table->data[0][3] = ''.__('Set initial date of all reports') . html_print_checkbox('enable_init_date', 1, $enable_init_date, true).''; +$html_enterprise = enterprise_hook('reporting_print_button_PDF', array($id_report)); +if ($html_enterprise !== ENTERPRISE_NOT_HOOK) { + $table->data[0][3] .= $html_enterprise; +} $table->data[1][0] = '' . __('From') . ':'; $table->data[1][1] = html_print_input_text ('date_init', $date_init, '', 12, 10, true). ' '; @@ -144,9 +155,6 @@ echo ''; /* We must add javascript here. Otherwise, the date picker won't work if the date is not correct because php is returning. */ -ui_require_css_file ('datepicker'); -ui_require_jquery_file ('ui.core'); -ui_require_jquery_file ('ui.datepicker'); ui_require_jquery_file ('timeentry'); ?>