#10081 Add option homescreen in metaconsole again

This commit is contained in:
miguel angel rasteu 2023-04-28 09:51:30 +02:00
parent 0bc18b47db
commit c1e35a5d17
2 changed files with 435 additions and 447 deletions

View File

@ -608,7 +608,7 @@ $userManagementTable->data['fields_blocksize_eventfilter'][1] = html_print_selec
false,
false
);
if (is_metaconsole() === false) {
// Home screen table.
$homeScreenTable = new stdClass();
$homeScreenTable->class = 'w100p full_section';
@ -642,7 +642,7 @@ if (is_metaconsole() === false) {
$userManagementTable->rowclass['homescreen_table'] = 'w100p';
$userManagementTable->data['homescreen_table'] = html_print_table($homeScreenTable, true);
}
if (is_metaconsole() === true && users_is_admin() === true) {
$userManagementTable->rowclass['search_custom1_looknfeel'] = 'field_half_width';

View File

@ -462,7 +462,7 @@ $usr_groups = (users_get_groups($config['id_user'], 'AR', $display_all_group));
$id_usr = $config['id_user'];
$skin = '';
if (!$meta) {
$home_screen = '<div class="label_select"><p class="edit_user_labels">'.__('Home screen').ui_print_help_tip(__('User can customize the home page. By default, will display \'Agent Detail\'. Example: Select \'Other\' and type index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=1 to show agent detail view'), true).'</p>';
$values = [
'Default' => __('Default'),
@ -520,19 +520,7 @@ if (!$meta) {
$skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'</div>';
}
}
} else {
$home_screen = '';
// User only can change skins if has more than one group.
if (function_exists('skins_print_select')) {
if (count($usr_groups) > 1) {
$skin = '<div class="label_select"><p class="edit_user_labels">'.__('Theme').ui_print_help_tip(
__('This change will only apply to nodes'),
true
).'</p>';
$skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'</div>';
}
}
}
$timezone = '<div class="label_select"><p class="edit_user_labels">'.__('Timezone').ui_print_help_tip(__('The timezone must be that of the associated server.'), true).'</p>';
$timezone .= html_print_timezone_select('timezone', $user_info['timezone']).'</div>';