From c12d672109f93ecc7d1cf9bf2b25b5cf34a19af7 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Thu, 5 Sep 2019 12:01:25 +0200 Subject: [PATCH] Add visual condition for JA and CH Lenguage --- pandora_console/godmode/agentes/modificar_agente.php | 2 +- pandora_console/operation/agentes/estado_agente.php | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 699efef940..a383de35c4 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -446,7 +446,7 @@ if ($agents !== false) { // Agent name size and description for Chinese and Japanese languages ​​are adjusted $agent_font_size = '7'; $description_font_size = '6.5'; - if ($config['language'] == 'ja' || $config['language'] == 'zh_CN') { + if ($config['language'] == 'ja' || $config['language'] == 'zh_CN' || $own_info['language'] == 'ja' || $own_info['language'] == 'zh_CN') { $agent_font_size = '15'; $description_font_size = '11'; } diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index bb9dc7cef7..df2c36a1cd 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -624,6 +624,13 @@ if (empty($agents)) { $agents = []; } +$agent_font_size = 'font-size: 7px'; +$description_font_size = 'font-size: 6.5px'; +if ($config['language'] == 'ja' || $config['language'] == 'zh_CN' || $own_info['language'] == 'ja' || $own_info['language'] == 'zh_CN') { + $agent_font_size = 'font-size: 15px'; + $description_font_size = 'font-size: 11px'; +} + // Urls to sort the table. $url_up_agente = 'index.php?sec=view&sec2=operation/agentes/estado_agente&refr='.$refr.'&offset='.$offset.'&group_id='.$group_id.'&recursion='.$recursion.'&search='.$search.'&status='.$status.'&sort_field=name&sort=up'; $url_down_agente = 'index.php?sec=view&sec2=operation/agentes/estado_agente&refr='.$refr.'&offset='.$offset.'&group_id='.$group_id.'&recursion='.$recursion.'&search='.$search.'&status='.$status.'&sort_field=name&sort=down'; @@ -739,7 +746,7 @@ foreach ($agents as $agent) { $data[0] = '
'; $data[0] .= ''; - $data[0] .= ' '.$agent['alias'].''; + $data[0] .= ' '.$agent['alias'].''; $data[0] .= ''; if ($agent['quiet']) { @@ -772,7 +779,7 @@ foreach ($agents as $agent) { $data[0] .= '
'; - $data[1] = ui_print_truncate_text($agent['description'], 'description', false, true, true, '[…]', 'font-size: 6.5pt'); + $data[1] = ui_print_truncate_text($agent['description'], 'description', false, true, true, '[…]', $description_font_size); $data[10] = '';