[Rebranding] Added hide help on node

This commit is contained in:
fermin831 2018-05-25 10:29:40 +02:00
parent 6675597b62
commit a54c074b11
5 changed files with 35 additions and 14 deletions

View File

@ -158,7 +158,7 @@ config_check();
</script> </script>
<?php <?php
if ($config['tutorial_mode'] !== 'expert') { if ($config['tutorial_mode'] !== 'expert' && !$config['disable_help']) {
$table->data[0]['clippy'] = $table->data[0]['clippy'] =
'<a href="javascript: show_clippy();">' . '<a href="javascript: show_clippy();">' .
html_print_image( html_print_image(
@ -307,11 +307,15 @@ config_check();
$table->data[0][3] = $maintenance_img; $table->data[0][3] = $maintenance_img;
// Main help icon // Main help icon
$table->data[0][4] = '<a href="#" class="modalpopup" id="helpmodal">'.html_print_image("images/header_help.png", if (!$config['disable_help']) {
true, array( $table->data[0][4] =
"title" => __('Main help'), '<a href="#" class="modalpopup" id="helpmodal">' .
"id" => "helpmodal", html_print_image("images/header_help.png", true, array(
"class" => "modalpopup")).'</a>'; "title" => __('Main help'),
"id" => "helpmodal",
"class" => "modalpopup")) .
'</a>';
}
// Logout // Logout
$table->data[0][5] = '<a class="white" href="' . ui_get_full_url('index.php?bye=bye') . '">'; $table->data[0][5] = '<a class="white" href="' . ui_get_full_url('index.php?bye=bye') . '">';

View File

@ -151,12 +151,13 @@ if (($policy_page) || (isset($agent))) {
echo "</table>"; echo "</table>";
if (!$config['disable_help']) {
echo '<div style="text-align: right; width: 100%;padding-top:10px;padding-bottom:10px">'; echo '<div style="text-align: right; width: 100%;padding-top:10px;padding-bottom:10px">';
echo "<strong>"; echo "<strong>";
echo "<a style='color: #373737;' target='_blank' href='http://pandorafms.com/Library/Library/'>".__("Get more modules on Monitoring Library")."</a>"; echo "<a style='color: #373737;' target='_blank' href='http://pandorafms.com/Library/Library/'>".__("Get more modules on Monitoring Library")."</a>";
echo "</strong>"; echo "</strong>";
echo '</div>'; echo '</div>';
}
if (! isset ($id_agente)) if (! isset ($id_agente))
return; return;

View File

@ -411,6 +411,13 @@ $table_styles->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button_extended ('fixed_graph', 0, '', $config["fixed_graph"], $open, '','',true, $open,'visualmodal'); html_print_radio_button_extended ('fixed_graph', 0, '', $config["fixed_graph"], $open, '','',true, $open,'visualmodal');
$row++; $row++;
$table_styles->data[$row][0] = __('Disable helps');
$table_styles->data[$row][1] = __('Yes') . '&nbsp;' .
html_print_radio_button ('disable_help', 1, '', $config["disable_help"], true) .
'&nbsp;&nbsp;';
$table_styles->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button ('disable_help', 0, '', $config["disable_help"], true);
$row++;
$table_styles->data[$row][0] = __('Fixed header'); $table_styles->data[$row][0] = __('Fixed header');
$table_styles->data[$row][1] = __('Yes') . '&nbsp;' . $table_styles->data[$row][1] = __('Yes') . '&nbsp;' .

View File

@ -585,8 +585,10 @@ function config_update_config () {
$error_update[] = __('Autohidden menu'); $error_update[] = __('Autohidden menu');
if (!config_update_value ('visual_animation', get_parameter('visual_animation'))) if (!config_update_value ('visual_animation', get_parameter('visual_animation')))
$error_update[] = __('visual_animation'); $error_update[] = __('visual_animation');
if (!config_update_value ('disable_help', get_parameter('disable_help')))
$error_update[] = __('Disable help');
if (!config_update_value ('fixed_graph', get_parameter('fixed_graph'))) if (!config_update_value ('fixed_graph', get_parameter('fixed_graph')))
$error_update[] = __('Fixed graph'); $error_update[] = __('Fixed graph');
if (!config_update_value ('fixed_header', get_parameter('fixed_header'))) if (!config_update_value ('fixed_header', get_parameter('fixed_header')))
$error_update[] = __('Fixed header'); $error_update[] = __('Fixed header');
if (!config_update_value ('fixed_menu', get_parameter('fixed_menu'))) if (!config_update_value ('fixed_menu', get_parameter('fixed_menu')))
@ -1185,7 +1187,11 @@ function config_process_config () {
if (!isset ($config["graphviz_bin_dir"])) { if (!isset ($config["graphviz_bin_dir"])) {
config_update_value ('graphviz_bin_dir', ""); config_update_value ('graphviz_bin_dir', "");
} }
if (!isset ($config["disable_help"])) {
config_update_value ('disable_help', false);
}
if (!isset ($config["fixed_header"])) { if (!isset ($config["fixed_header"])) {
config_update_value ('fixed_header', false); config_update_value ('fixed_header', false);
} }

View File

@ -1104,6 +1104,9 @@ function ui_print_alert_template_example ($id_alert_template, $return = false, $
function ui_print_help_icon ($help_id, $return = false, $home_url = '', $image = "images/help.png", $is_relative = false) { function ui_print_help_icon ($help_id, $return = false, $home_url = '', $image = "images/help.png", $is_relative = false) {
global $config; global $config;
// Do not display the help icon if help is disabled
if ($config['disable_help']) return '';
if (empty($home_url)) if (empty($home_url))
$home_url = ""; $home_url = "";