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

View File

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