Merge branch 'ent-4457-bug-visual-style-font' into 'develop'

font size for jap and chinese adjusted agents

See merge request artica/pandorafms!2635
This commit is contained in:
Daniel Rodriguez 2019-09-05 13:32:07 +02:00
commit 9c6bf8184f
2 changed files with 19 additions and 4 deletions

View File

@ -443,6 +443,14 @@ ui_pagination($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modific
if ($agents !== false) {
// Urls to sort the table.
// 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' || $own_info['language'] == 'ja' || $own_info['language'] == 'zh_CN') {
$agent_font_size = '15';
$description_font_size = '11';
}
$url_up_agente = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=up&disabled=$disabled';
$url_down_agente = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=down&disabled=$disabled';
$url_up_remote = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=remote&sort=up&disabled=$disabled';
@ -529,7 +537,7 @@ if ($agents !== false) {
} else {
echo '<a alt ='.$agent['nombre']." href='index.php?sec=gagente&
sec2=godmode/agentes/configurar_agente&tab=$main_tab&
id_agente=".$agent['id_agente']."'>".'<span style="font-size: 7pt" title="'.$agent['nombre'].'">'.$agent['alias'].'</span>'.'</a>';
id_agente=".$agent['id_agente']."'>".'<span style="font-size: '.$agent_font_size.'pt" title="'.$agent['nombre'].'">'.$agent['alias'].'</span>'.'</a>';
}
echo '</strong>';
@ -629,7 +637,7 @@ if ($agents !== false) {
// Group icon and name
echo "<td class='$tdcolor' align='left' valign='middle'>".ui_print_group_icon($agent['id_grupo'], true).'</td>';
// Description
echo "<td class='".$tdcolor."f9'>".ui_print_truncate_text($agent['comentarios'], 'description', true, true, true, '[&hellip;]', 'font-size: 6.5pt;').'</td>';
echo "<td class='".$tdcolor."f9'>".ui_print_truncate_text($agent['comentarios'], 'description', true, true, true, '[&hellip;]', 'font-size: '.$description_font_size.'pt;').'</td>';
// Action
// When there is only one element in page it's necesary go back page.
if ((count($agents) == 1) && ($offset >= $config['block_size'])) {

View File

@ -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&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=name&amp;sort=up';
$url_down_agente = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=name&amp;sort=down';
@ -739,7 +746,7 @@ foreach ($agents as $agent) {
$data[0] = '<div class="left_'.$agent['id_agente'].'">';
$data[0] .= '<span>';
$data[0] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente'].'"> <span style="font-size: 7pt;font-weight:bold" title ="'.$agent['nombre'].'">'.$agent['alias'].'</span></a>';
$data[0] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente'].'"> <span style="'.$agent_font_size.';font-weight:bold" title ="'.$agent['nombre'].'">'.$agent['alias'].'</span></a>';
$data[0] .= '</span>';
if ($agent['quiet']) {
@ -772,7 +779,7 @@ foreach ($agents as $agent) {
$data[0] .= '</div></div>';
$data[1] = ui_print_truncate_text($agent['description'], 'description', false, true, true, '[&hellip;]', 'font-size: 6.5pt');
$data[1] = ui_print_truncate_text($agent['description'], 'description', false, true, true, '[&hellip;]', $description_font_size);
$data[10] = '';