[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>
<?php
if ($config['tutorial_mode'] !== 'expert') {
if ($config['tutorial_mode'] !== 'expert' && !$config['disable_help']) {
$table->data[0]['clippy'] =
'<a href="javascript: show_clippy();">' .
html_print_image(
@ -307,11 +307,15 @@ config_check();
$table->data[0][3] = $maintenance_img;
// Main help icon
$table->data[0][4] = '<a href="#" class="modalpopup" id="helpmodal">'.html_print_image("images/header_help.png",
true, array(
"title" => __('Main help'),
"id" => "helpmodal",
"class" => "modalpopup")).'</a>';
if (!$config['disable_help']) {
$table->data[0][4] =
'<a href="#" class="modalpopup" id="helpmodal">' .
html_print_image("images/header_help.png", true, array(
"title" => __('Main help'),
"id" => "helpmodal",
"class" => "modalpopup")) .
'</a>';
}
// Logout
$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 '<div style="text-align: right; width: 100%;padding-top:10px;padding-bottom:10px">';
echo "<strong>";
echo "<a style='color: #373737;' target='_blank' href='http://pandorafms.com/Library/Library/'>".__("Get more modules on Monitoring Library")."</a>";
echo "</strong>";
echo '</div>';
if (!$config['disable_help']) {
echo '<div style="text-align: right; width: 100%;padding-top:10px;padding-bottom:10px">';
echo "<strong>";
echo "<a style='color: #373737;' target='_blank' href='http://pandorafms.com/Library/Library/'>".__("Get more modules on Monitoring Library")."</a>";
echo "</strong>";
echo '</div>';
}
if (! isset ($id_agente))
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');
$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][1] = __('Yes') . '&nbsp;' .

View File

@ -585,8 +585,10 @@ function config_update_config () {
$error_update[] = __('Autohidden menu');
if (!config_update_value ('visual_animation', get_parameter('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')))
$error_update[] = __('Fixed graph');
$error_update[] = __('Fixed graph');
if (!config_update_value ('fixed_header', get_parameter('fixed_header')))
$error_update[] = __('Fixed header');
if (!config_update_value ('fixed_menu', get_parameter('fixed_menu')))
@ -1185,7 +1187,11 @@ function config_process_config () {
if (!isset ($config["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"])) {
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) {
global $config;
// Do not display the help icon if help is disabled
if ($config['disable_help']) return '';
if (empty($home_url))
$home_url = "";