diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php
index 706dcc6a0a..14080cbd25 100644
--- a/pandora_console/godmode/users/configure_user.php
+++ b/pandora_console/godmode/users/configure_user.php
@@ -262,7 +262,7 @@ if (is_metaconsole() === true) {
$buttons[$tab]['active'] = true;
ui_print_standard_header(
- (empty($id) === false) ? __('Update user') : __('Create user'),
+ (empty($id) === false) ? sprintf('%s [ %s ]', __('Update User'), $config['id_user']) : __('Create User'),
'images/gm_users.png',
false,
'',
@@ -996,7 +996,7 @@ if (is_metaconsole() === true) {
html_print_div(
[
'class' => 'user_form_title',
- 'content' => ((bool) $id === true) ? __('Update User') : __('Create User'),
+ 'content' => ((bool) $id === true) ? sprintf('%s [ %s ]', __('Update User'), $config['id_user']) : __('Create User'),
]
);
}
diff --git a/pandora_console/godmode/users/user_list.php b/pandora_console/godmode/users/user_list.php
index 7d59008407..60fb457a6d 100644
--- a/pandora_console/godmode/users/user_list.php
+++ b/pandora_console/godmode/users/user_list.php
@@ -993,6 +993,7 @@ foreach ($info as $user_id => $user_info) {
}
html_print_table($table);
+$tablePagination = ui_pagination(count($info), false, 0, 0, true, 'offset', false, 'dataTables_paginate paging_simple_numbers');
unset($table);
if ($is_management_allowed === true) {
if ($config['admin_can_add_user'] !== false) {
@@ -1005,13 +1006,30 @@ if ($is_management_allowed === true) {
[ 'icon' => 'wand' ],
true
),
- ['type' => 'form_action'],
+ [
+ 'type' => 'form_action',
+ 'right_content' => $tablePagination,
+ ],
);
html_print_input_hidden('new_user', 1);
echo '';
} else {
echo ''.__("The current authentication scheme doesn't support creating users on %s", get_product_name()).'';
}
+} else {
+ html_print_action_buttons(
+ html_print_submit_button(
+ __('Create user'),
+ 'none',
+ true,
+ [ 'icon' => 'wand' ],
+ true
+ ),
+ [
+ 'type' => 'form_action',
+ 'right_content' => $tablePagination,
+ ],
+ );
}
enterprise_hook('close_meta_frame');
diff --git a/pandora_console/godmode/users/user_management.php b/pandora_console/godmode/users/user_management.php
index 5d66113d4e..c2950e80ba 100644
--- a/pandora_console/godmode/users/user_management.php
+++ b/pandora_console/godmode/users/user_management.php
@@ -31,7 +31,6 @@ global $config;
check_login();
-
// Bussiness Logic.
// Data for homescreen section.
$homeScreenValues = [
@@ -121,10 +120,6 @@ if (is_metaconsole() === false) {
$timezoneContent[] = '';
}
-
-
-
-
// Create the view.
$userManagementTable = new stdClass();
$userManagementTable->id = 'advanced';
@@ -138,7 +133,8 @@ $userManagementTable->colspan = [];
$userManagementTable->rowspan = [];
// Title for Profile information.
-$userManagementTable->data['title_profile_information'] = html_print_subtitle_table(__('Profile information'));
+$sustitleTable = ($new_user === true) ? __('Profile information') : sprintf('%s [ %s ]', __('Profile information for'), $config['id_user']);
+$userManagementTable->data['title_profile_information'] = html_print_subtitle_table($sustitleTable);
// Id user.
if ($new_user === true) {
diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php
index 9b74e6e424..457a7f506e 100644
--- a/pandora_console/include/functions_html.php
+++ b/pandora_console/include/functions_html.php
@@ -3516,6 +3516,10 @@ function html_print_button($label='OK', $name='', $disabled=false, $script='', $
$classes .= ' buttonButton';
}
+ if ($disabled === true) {
+ $classes .= ' disabled_action_button';
+ }
+
$output = sprintf(
'',
$buttonType,
diff --git a/pandora_console/include/functions_profile.php b/pandora_console/include/functions_profile.php
index 77061a25b3..e381f62a24 100644
--- a/pandora_console/include/functions_profile.php
+++ b/pandora_console/include/functions_profile.php
@@ -213,6 +213,7 @@ function profile_print_profile_table($id, $json_profile=false, $return=false, $c
$table->head['actions'] = __('Action');
$table->align['actions'] = 'center';
+ $table->headstyle['tags'] = 'width: 33%';
$table->headstyle['hierarchy'] = 'text-align: center';
$table->headstyle['actions'] = 'text-align: center';
@@ -263,17 +264,30 @@ function profile_print_profile_table($id, $json_profile=false, $return=false, $c
$lastKey = 0;
foreach ($result as $key => $profile) {
- if ($profile['id_grupo'] == -1) {
+ if ((int) $profile['id_grupo'] === -1) {
continue;
}
$data = [];
- $data['name'] = ''.profile_get_name($profile['id_perfil']).'';
+ $profileName = profile_get_name($profile['id_perfil']);
+
+ if (is_management_allowed() === false) {
+ $data['name'] = $profileName;
+ } else {
+ $data['name'] = html_print_anchor(
+ [
+ 'href' => 'index.php?sec2=godmode/users/configure_profile&id='.$profile['id_perfil'],
+ 'content' => $profileName,
+ ],
+ true
+ );
+ }
+
$data['group'] = ui_print_group_icon($profile['id_grupo'], true);
if (is_metaconsole() === false) {
- $data['group'] .= '';
+ $data['group'] .= '';
}
$data['group'] .= ' '.ui_print_truncate_text(groups_get_name($profile['id_grupo'], true), GENERIC_SIZE_TEXT);
diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php
index 9fef947846..86e5da6f3b 100755
--- a/pandora_console/include/functions_ui.php
+++ b/pandora_console/include/functions_ui.php
@@ -2127,25 +2127,26 @@ function ui_pagination(
$set_id=''
) {
global $config;
+ ui_require_css_file('tables');
- if (empty($pagination)) {
+ if (empty($pagination) === true) {
$pagination = (int) $config['block_size'];
}
- if (is_string($offset)) {
+ if (is_string($offset) === true) {
$offset_name = $offset;
$offset = (int) get_parameter($offset_name);
}
- if (empty($offset)) {
+ if (empty($offset) === true) {
$offset = (int) get_parameter($offset_name);
}
- if (empty($url)) {
+ if (empty($url) === true) {
$url = ui_get_url_refresh([$offset_name => false]);
}
- if (!empty($set_id)) {
+ if (empty($set_id) === false) {
$set_id = " id = '".$set_id."'";
}
diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css
index 891f38e4e8..3dc8f9c75c 100644
--- a/pandora_console/include/styles/pandora.css
+++ b/pandora_console/include/styles/pandora.css
@@ -10253,6 +10253,9 @@ button.submitButton.link:active > div {
background-color: #0d312f !important;
}
+button.disabled_action_button {
+ visibility: hidden;
+}
button div.camera {
mask: url(../../images/svg/picture.svg) no-repeat center / contain;
-webkit-mask: url(../../images/svg/picture.svg) no-repeat center / contain;