Minor fixes for solve visual issues

This commit is contained in:
Jose Gonzalez 2023-02-03 12:37:09 +01:00
parent bd26aa8f8d
commit b9992c5a67
6 changed files with 53 additions and 45 deletions

View File

@ -399,29 +399,34 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
// User. // User.
if (is_user_admin($config['id_user']) == 1) { $headerUserImage = (is_user_admin($config['id_user']) === true) ? 'images/header_user_admin_green.png' : 'images/header_user_green.png';
$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',
]
);
}
$header_user = '<div id="header_user"><a href="index.php?sec=workspace&sec2=operation/users/user_edit">'.$header_user.'<span id="user_name_header"> ('.$config['id_user'].')</span></a></div>'; $headerUser = [];
$headerUser[] = html_print_image(
$headerUserImage,
true,
[
'title' => __('Edit my user'),
'class' => 'bot',
'alt' => 'user',
]
);
$headerUser[] = sprintf('<span id="user_name_header">[ %s ]</span>', $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. // Logout.
$header_logout = '<div id="header_logout"><a class="white" href="'.ui_get_full_url('index.php?bye=bye').'">'; $header_logout = '<div id="header_logout"><a class="white" href="'.ui_get_full_url('index.php?bye=bye').'">';

View File

@ -580,7 +580,7 @@ $tableAgent->data['description'][0] = html_print_textarea(
html_print_div( 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;', 'style' => 'display: flex; justify-content: space-between; align-items: flex-start;',
'content' => html_print_table($tableAgent, true).$CodeQRTable, 'content' => html_print_table($tableAgent, true).$CodeQRTable,
] ]

View File

@ -735,38 +735,38 @@ echo '<h3 id="message" class="error invisible"></h3>';
$outputForm = '<form method="post" id="module_form">'; $outputForm = '<form method="post" id="module_form">';
$outputForm .= ui_toggle( $outputForm .= ui_toggle(
html_print_table($table_simple, true), html_print_table($table_simple, true),
__('Base options'), '<span class="subsection_header_title">'.__('Base options').'</span>',
'', '',
'', '',
false, false,
true, true,
'', '',
'', '',
'box-shadow white_table_graph white_table_graph_fixed' 'box-shadow white_table_flex white_table_graph_fixed'
); );
$outputForm .= ui_toggle( $outputForm .= ui_toggle(
html_print_table($table_advanced, true), html_print_table($table_advanced, true),
__('Advanced options'), '<span class="subsection_header_title">'.__('Advanced options').'</span>',
'', '',
'', '',
true, true,
true, true,
'', '',
'', '',
'box-shadow white_table_graph white_table_graph_fixed' 'box-shadow white_table_flex white_table_graph_fixed'
); );
$outputForm .= ui_toggle( $outputForm .= ui_toggle(
html_print_table($table_macros, true), html_print_table($table_macros, true),
__('Custom macros'), '<span class="subsection_header_title">'.__('Custom macros').'</span>',
'', '',
'', '',
true, true,
true, true,
'', '',
'', '',
'box-shadow white_table_graph white_table_graph_fixed' 'box-shadow white_table_flex white_table_graph_fixed'
); );
if ((int) $moduletype !== 13) { if ((int) $moduletype !== 13) {
@ -778,14 +778,14 @@ if ((int) $moduletype !== 13) {
$table_relations, $table_relations,
true true
), ),
__('Module relations'), '<span class="subsection_header_title">'.__('Module relations').'<span>',
'', '',
'', '',
true, true,
true, true,
'', '',
'', '',
'box-shadow white_table_graph white_table_graph_fixed' 'box-shadow white_table_flex white_table_graph_fixed'
); );
} }

View File

@ -720,7 +720,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
false, false,
'', '',
'white-box-content', 'white-box-content',
'white_table_graph margin-bottom-10 border-bottom-gray' 'white_table_flex margin-bottom-10 border-bottom-gray'
); );
if ($config['agentaccess']) { if ($config['agentaccess']) {
@ -740,7 +740,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
false, false,
'', '',
'white-box-content border-bottom-gray', '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, false,
'', '',
'white-box-content border-bottom-gray', '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) { if (empty($server_data) === false && is_metaconsole() === true) {

View File

@ -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. * Prints a username with real name, link to the user_edit page etc.
* *
* @param string $username The username to render. * @param string $username The username to render.
* @param boolean $fullname If true, returns the user fullname.
* @param boolean $return Whether to return or print. * @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 = '<a href="index.php?sec=usuario&amp;sec2=operation/users/user_edit&amp;id='.$username.'">'.get_user_fullname($username).'</a>'; return html_print_anchor(
[
if ($return) { 'href' => sprintf('index.php?sec=gusuarios&sec2=godmode/users/configure_user&edit_user=1&pure=0&id_user=%s', $username),
return $string; 'content' => ($fullname === true) ? get_user_fullname($username) : $username,
} ],
$return
echo $string; );
} }

View File

@ -10417,7 +10417,8 @@ button.ui-button.ui-widget.submit-cancel:active {
table#simple tr td, table#simple tr td,
table#advanced 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; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
@ -10427,7 +10428,8 @@ table#advanced tr td,
table#simple > tbody > tr, table#simple > tbody > tr,
table#advanced > tbody > tr, table#advanced > tbody > tr,
.white_table_graph tr { .white_table_flex tr,
.table_section table tr {
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
flex-direction: row; flex-direction: row;