forked from Wavyzz/dolibarr
add socialnetworks dictionary
This commit is contained in:
@@ -2199,42 +2199,42 @@ function dol_print_socialnetworks($value, $cid, $socid, $type)
|
||||
{
|
||||
global $conf,$user,$langs;
|
||||
|
||||
$newskype=$value;
|
||||
$htmllink=$value;
|
||||
|
||||
if (empty($value)) return ' ';
|
||||
|
||||
if (! empty($type))
|
||||
{
|
||||
$newskype ='<div class="divsocialnetwork inline-block valignmiddle">';
|
||||
$newskype.=img_picto($langs->trans(strtoupper($type)), $type.'.png', '', false, 0, 0, '', 'paddingright');
|
||||
$newskype.=$value;
|
||||
$htmllink ='<div class="divsocialnetwork inline-block valignmiddle">';
|
||||
$htmllink.=img_picto($langs->trans(strtoupper($type)), $type.'.png', '', false, 0, 0, '', 'paddingright');
|
||||
$htmllink.=$value;
|
||||
if ($type == 'skype')
|
||||
{
|
||||
$newskype.= ' ';
|
||||
$newskype.='<a href="skype:';
|
||||
$newskype.=$value;
|
||||
$newskype.='?call" alt="'.$langs->trans("Call").' '.$value.'" title="'.$langs->trans("Call").' '.$value.'">';
|
||||
$newskype.='<img src="'.DOL_URL_ROOT.'/theme/common/skype_callbutton.png" border="0">';
|
||||
$newskype.='</a><a href="skype:';
|
||||
$newskype.=$value;
|
||||
$newskype.='?chat" alt="'.$langs->trans("Chat").' '.$value.'" title="'.$langs->trans("Chat").' '.$value.'">';
|
||||
$newskype.='<img class="paddingleft" src="'.DOL_URL_ROOT.'/theme/common/skype_chatbutton.png" border="0">';
|
||||
$newskype.='</a>';
|
||||
$htmllink.= ' ';
|
||||
$htmllink.='<a href="skype:';
|
||||
$htmllink.=$value;
|
||||
$htmllink.='?call" alt="'.$langs->trans("Call").' '.$value.'" title="'.$langs->trans("Call").' '.$value.'">';
|
||||
$htmllink.='<img src="'.DOL_URL_ROOT.'/theme/common/skype_callbutton.png" border="0">';
|
||||
$htmllink.='</a><a href="skype:';
|
||||
$htmllink.=$value;
|
||||
$htmllink.='?chat" alt="'.$langs->trans("Chat").' '.$value.'" title="'.$langs->trans("Chat").' '.$value.'">';
|
||||
$htmllink.='<img class="paddingleft" src="'.DOL_URL_ROOT.'/theme/common/skype_chatbutton.png" border="0">';
|
||||
$htmllink.='</a>';
|
||||
}
|
||||
if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create && $type=='skype')
|
||||
{
|
||||
$addlink='AC_SKYPE'; $link='';
|
||||
if (! empty($conf->global->AGENDA_ADDACTIONFORSKYPE)) $link='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&actioncode='.$addlink.'&contactid='.$cid.'&socid='.$socid.'">'.img_object($langs->trans("AddAction"), "calendar").'</a>';
|
||||
$newskype.=($link?' '.$link:'');
|
||||
$htmllink.=($link?' '.$link:'');
|
||||
}
|
||||
$newskype.='</div>';
|
||||
$htmllink.='</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$langs->load("errors");
|
||||
$newskype.=img_warning($langs->trans("ErrorBadSocialNetworkValue", $value));
|
||||
$htmllink.=img_warning($langs->trans("ErrorBadSocialNetworkValue", $value));
|
||||
}
|
||||
return $newskype;
|
||||
return $htmllink;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user