diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 6bc2c266d3..fc666af8b0 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -399,29 +399,34 @@ echo sprintf('
', $menuTypeClass); // User. - if (is_user_admin($config['id_user']) == 1) { - $header_user = html_print_image( - 'images/header_user_admin_green.png', - true, - [ - 'title' => __('Edit my user'), - 'class' => 'bot', - 'alt' => 'user', - ] - ); - } else { - $header_user = html_print_image( - 'images/header_user_green.png', - true, - [ - 'title' => __('Edit my user'), - 'class' => 'bot', - 'alt' => 'user', - ] - ); - } + $headerUserImage = (is_user_admin($config['id_user']) === true) ? 'images/header_user_admin_green.png' : 'images/header_user_green.png'; - $header_user = '
'.$header_user.' ('.$config['id_user'].')
'; + $headerUser = []; + $headerUser[] = html_print_image( + $headerUserImage, + true, + [ + 'title' => __('Edit my user'), + 'class' => 'bot', + 'alt' => 'user', + ] + ); + + $headerUser[] = sprintf('[ %s ]', $config['id_user']); + + $header_user = html_print_div( + [ + 'id' => 'header_user', + 'content' => html_print_anchor( + [ + 'href' => sprintf('index.php?sec=gusuarios&sec2=godmode/users/configure_user&edit_user=1&pure=0&id_user=%s', $config['id_user']), + 'content' => implode('', $headerUser), + ], + true + ), + ], + true + ); // Logout. $header_logout = '
'; diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index b9020b556a..a4cc8b5454 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -580,7 +580,7 @@ $tableAgent->data['description'][0] = html_print_textarea( html_print_div( [ - 'class' => 'box-shadow white_table_graph white_box agent_details_col', + 'class' => 'box-shadow white_table_flex white_box agent_details_col', 'style' => 'display: flex; justify-content: space-between; align-items: flex-start;', 'content' => html_print_table($tableAgent, true).$CodeQRTable, ] diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index 3d69068e38..8c9d0fe062 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -735,38 +735,38 @@ echo ''; $outputForm = '
'; $outputForm .= ui_toggle( html_print_table($table_simple, true), - __('Base options'), + ''.__('Base options').'', '', '', false, true, '', '', - 'box-shadow white_table_graph white_table_graph_fixed' + 'box-shadow white_table_flex white_table_graph_fixed' ); $outputForm .= ui_toggle( html_print_table($table_advanced, true), - __('Advanced options'), + ''.__('Advanced options').'', '', '', true, true, '', '', - 'box-shadow white_table_graph white_table_graph_fixed' + 'box-shadow white_table_flex white_table_graph_fixed' ); $outputForm .= ui_toggle( html_print_table($table_macros, true), - __('Custom macros'), + ''.__('Custom macros').'', '', '', true, true, '', '', - 'box-shadow white_table_graph white_table_graph_fixed' + 'box-shadow white_table_flex white_table_graph_fixed' ); if ((int) $moduletype !== 13) { @@ -778,14 +778,14 @@ if ((int) $moduletype !== 13) { $table_relations, true ), - __('Module relations'), + ''.__('Module relations').'', '', '', true, true, '', '', - 'box-shadow white_table_graph white_table_graph_fixed' + 'box-shadow white_table_flex white_table_graph_fixed' ); } diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php index 153cca45e5..b8bcf06b41 100755 --- a/pandora_console/include/functions_treeview.php +++ b/pandora_console/include/functions_treeview.php @@ -720,7 +720,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false) false, '', 'white-box-content', - 'white_table_graph margin-bottom-10 border-bottom-gray' + 'white_table_flex margin-bottom-10 border-bottom-gray' ); if ($config['agentaccess']) { @@ -740,7 +740,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false) false, '', 'white-box-content border-bottom-gray', - 'white_table_graph margin-top-10 margin-bottom-10' + 'white_table_flex margin-top-10 margin-bottom-10' ); } @@ -913,7 +913,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false) false, '', 'white-box-content border-bottom-gray', - 'white_table_graph margin-top-10 margin-bottom-10' + 'white_table_flex margin-top-10 margin-bottom-10' ); if (empty($server_data) === false && is_metaconsole() === true) { diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 279ec0a23b..2639936bfa 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -634,19 +634,20 @@ function ui_print_timestamp($unixtime, $return=false, $option=[]) * Prints a username with real name, link to the user_edit page etc. * * @param string $username The username to render. + * @param boolean $fullname If true, returns the user fullname. * @param boolean $return Whether to return or print. * - * @return string HTML code if return parameter is true. + * @return void|string HTML code if return parameter is true. */ -function ui_print_username($username, $return=false) +function ui_print_username($username, $fullname=false, $return=false) { - $string = ''.get_user_fullname($username).''; - - if ($return) { - return $string; - } - - echo $string; + return html_print_anchor( + [ + 'href' => sprintf('index.php?sec=gusuarios&sec2=godmode/users/configure_user&edit_user=1&pure=0&id_user=%s', $username), + 'content' => ($fullname === true) ? get_user_fullname($username) : $username, + ], + $return + ); } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 5e7561a65e..1a153156c7 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -10417,7 +10417,8 @@ button.ui-button.ui-widget.submit-cancel:active { table#simple tr td, table#advanced tr td, -.white_table_graph > table tr td { +.white_table_flex > table tr td, +.table_section table tr td { display: flex; flex-direction: row; align-items: center; @@ -10427,7 +10428,8 @@ table#advanced tr td, table#simple > tbody > tr, table#advanced > tbody > tr, -.white_table_graph tr { +.white_table_flex tr, +.table_section table tr { display: flex; flex-wrap: nowrap; flex-direction: row;