Added standard headers

This commit is contained in:
José González 2021-04-30 13:50:58 +02:00
parent cea27392c8
commit ab984b8c32
2 changed files with 38 additions and 11 deletions

View File

@ -95,7 +95,7 @@ if ($id_group) {
}
// Header
if (defined('METACONSOLE')) {
if (is_metaconsole() === true) {
agents_meta_print_header();
$sec = 'advanced';
} else {
@ -105,13 +105,24 @@ if (defined('METACONSOLE')) {
$title_in_header = __('Create group');
}
ui_print_page_header(
// Header.
ui_print_standard_header(
$title_in_header,
'images/group.png',
false,
'',
true,
''
false,
[],
[
[
'link' => '',
'label' => __('Profiles'),
],
[
'link' => '',
'label' => __('Manage agents group'),
],
]
);
$sec = 'gagente';
}

View File

@ -333,6 +333,7 @@ $title = __('Groups defined in %s', get_product_name());
switch ($tab) {
case 'tree':
$buttons['tree']['active'] = true;
$title .= sprintf(' » %s', __('Tree view'));
break;
case 'credbox':
@ -343,23 +344,38 @@ switch ($tab) {
case 'groups':
default:
$buttons['groups']['active'] = true;
$title .= sprintf(' » %s', __('Table view'));
break;
}
// Header.
if (is_metaconsole() === true) {
agents_meta_print_header();
echo '<div class="notify">';
echo __('Edit or delete groups can cause problems with synchronization');
echo '</div>';
html_print_div(
[
'class' => 'notify',
'content' => __('Edit or delete groups can cause problems with synchronization'),
]
);
} else {
ui_print_page_header(
// Header.
ui_print_standard_header(
$title,
'images/group.png',
false,
'',
true,
$buttons
false,
$buttons,
[
[
'link' => '',
'label' => __('Profiles'),
],
[
'link' => '',
'label' => __('Manage agents group'),
],
]
);
}
@ -471,7 +487,7 @@ if ($update_group) {
$values = [
'nombre' => $name,
'icon' => empty($icon) ? '' : substr($icon, 0, -4),
'parent' => $id_parent == -1 ? 0 : $id_parent,
'parent' => ($id_parent == -1) ? 0 : $id_parent,
'disabled' => !$alerts_enabled,
'custom_id' => $custom_id,
'id_skin' => $skin,