diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 8be490bc0c..a82ca64233 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,14 @@ +2013-07-18 Sergio Martin <sergio.martin@artica.es> + + * operation/reporting/reporting_viewer.php + images/report_list.png + godmode/events/event_edit_filter.php + godmode/reporting/reporting_builder.php: Fix the manage + tabs wich appeared in the view report section even when + the user hasnt RW permissions for bug #2347 + Added some new buttons and icon to make more usable the + reports section + 2013-07-18 Sergio Martin <sergio.martin@artica.es> * include/functions_events.php: Fixed the access to the diff --git a/pandora_console/godmode/events/event_edit_filter.php b/pandora_console/godmode/events/event_edit_filter.php index ad91d97ee2..d07526808f 100644 --- a/pandora_console/godmode/events/event_edit_filter.php +++ b/pandora_console/godmode/events/event_edit_filter.php @@ -153,7 +153,7 @@ $table->width = '98%'; $table->border = 0; $table->cellspacing = 3; $table->cellpadding = 5; -$table->class = "databox_color"; +$table->class = "databox"; $table->style[0] = 'vertical-align: top;'; $table->valign[1] = 'top'; diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 0b11834693..8c52c261ff 100644 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -233,7 +233,7 @@ switch ($action) { $buttons = array( 'list_reports' => array('active' => false, 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">' . - html_print_image("images/op_reporting.png", true, array ("title" => __('Main'))) .'</a>') + html_print_image("images/report_list.png", true, array ("title" => __('Reports list'))) .'</a>') ); if ($enterpriseEnable) { @@ -1352,7 +1352,7 @@ switch ($action) { $buttons = array( 'list_reports' => array('active' => false, 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">' . - html_print_image("images/op_reporting.png", true, array ("title" => __('Main'))) .'</a>') + html_print_image("images/op_reporting.png", true, array ("title" => __('Reports list'))) .'</a>') ); $buttons = reporting_enterprise_add_main_Tabs($buttons); diff --git a/pandora_console/images/report_list.png b/pandora_console/images/report_list.png new file mode 100644 index 0000000000..110565701c Binary files /dev/null and b/pandora_console/images/report_list.png differ diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index 326023e5bd..d53741b97a 100644 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -63,23 +63,28 @@ $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&pure=$pure"; -$options['main']['text'] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=main&action=edit&id_report=' . $id_report . '&pure='.$pure.'">' . - html_print_image("images/op_reporting.png", true, array ("title" => __('Main data'))) .'</a>'; +if (check_acl ($config['id_user'], 0, "RW")) { + $options['main']['text'] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=main&action=edit&id_report=' . $id_report . '&pure='.$pure.'">' . + html_print_image("images/op_reporting.png", true, array ("title" => __('Main data'))) .'</a>'; -$options['list_items']['text'] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $id_report . '&pure='.$pure.'">' . - html_print_image("images/list.png", true, array ("title" => __('List items'))) .'</a>'; + $options['list_items']['text'] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $id_report . '&pure='.$pure.'">' . + html_print_image("images/list.png", true, array ("title" => __('List items'))) .'</a>'; -$options['item_editor']['text'] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=new&id_report=' . $id_report . '&pure='.$pure.'">' . - html_print_image("images/pen.png", true, array ("title" => __('Item editor'))) .'</a>'; + $options['item_editor']['text'] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=new&id_report=' . $id_report . '&pure='.$pure.'">' . + html_print_image("images/pen.png", true, array ("title" => __('Item editor'))) .'</a>'; -if (enterprise_installed()) { - $options = reporting_enterprise_add_Tabs($options, $id_report); + if (enterprise_installed()) { + $options = reporting_enterprise_add_Tabs($options, $id_report); + } } - $options['view'] = array('active' => true, 'text' => '<a href="index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=' . $id_report . '&pure='.$pure.'">' . html_print_image("images/operation.png", true, array ("title" => __('View report'))) .'</a>'); +$options['list_reports'] = array('active' => false, + 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">' . + html_print_image("images/report_list.png", true, array ("title" => __('Report list'))) .'</a>'); + if (!defined('METACONSOLE')) { if ($config["pure"] == 0) { $options['screen']['text'] = "<a href='$url&pure=1&enable_init_date=$enable_init_date&date_init=$date_init&time_init=$time_init'>" @@ -118,7 +123,7 @@ if ($enable_init_date) { } $table->id = 'controls_table'; -$table->width = '99%'; +$table->width = '98%'; $table->class = 'databox'; $table->style = array (); $table->style[0] = 'width: 60px;'; @@ -167,6 +172,8 @@ $table->data[1][2] .= html_print_input_text ('date', $date, '', 12, 10, true). ' $table->data[1][2] .= html_print_input_text ('time', $time, '', 10, 7, true). ' '; $table->data[1][2] .= html_print_submit_button (__('Update'), 'date_submit', false, 'class="sub next"', true); +enterprise_hook('open_meta_frame'); + echo '<form method="post" action="'.$url.'&pure='.$config["pure"].'" style="margin-right: 0px;">'; html_print_table ($table); html_print_input_hidden ('id_report', $id_report); @@ -320,4 +327,6 @@ foreach ($contents as $content) { flush (); } + +enterprise_hook('close_meta_frame'); ?>