Hi again
Sorry to recover this issue, but is there any way to tell the SugarWidget which icon to show for Calls history subpanel depending on the Call direction.
I have reviewed the ForActivites.php file in custom\modules\Calls\metadata\subpanels and included this code:
PHP Code:
$tipo_llamada = $this->bean->direction;
switch ($tipo_llamada)
{
case '1to1': $icono = '/themes/default/images/1to1.gif'; break;
case 'inbound': $icono = '/themes/default/images/call_in.gif'; break;
case 'outbound': $icono = '/themes/default/images/call_out.gif'; break;
case 'selection': $icono = '/themes/default/images/selection.gif'; break;
default: $icono = '/themes/default/images/call_in.gif'; break;
}
$subpanel_layout = array(
//Removed button because this layout def is a component of
//the activities sub-panel.
//'where' => "(calls.status=\'Planned\')",
'where' => "(calls.status != 'Held' AND calls.status != 'Not Held')",
'list_fields' => array(
'object_image'=>array(
'vname' => 'LBL_OBJECT_IMAGE',
'widget_class' => $icono,
'width' => '2%',
),
However is not working.... any suggestions please??
Thanks a lot
Bookmarks