forked from Wavyzz/dolibarr
Enhance look for contacts forms of thirdparties.
This commit is contained in:
@@ -683,7 +683,7 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p
|
||||
if (count($keys)) $maxkey=max($keys);
|
||||
}
|
||||
|
||||
// Show tabs
|
||||
// Show tabs
|
||||
$bactive=false;
|
||||
// if =0 we don't use the feature
|
||||
$limittoshow=($conf->global->MAXTABS_IN_CARD?$conf->global->MAXTABS_IN_CARD:99);
|
||||
@@ -754,7 +754,7 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p
|
||||
$out.='<div id=moretabs class="inline-block tabsElem"><a href="" data-role="button" style="background-color: #f0f0f0;" class="tab inline-block">Plus</a>';
|
||||
$out.='<div id=moretabsList style="position: absolute; left: -999em;text-align: left;margin:0px;padding:2px">'.$outmore.'</div></div>';
|
||||
$out.="</div>\n";
|
||||
|
||||
|
||||
$out.="<script>";
|
||||
$out.="$('#moretabs').mouseenter( function() { $('#moretabsList').css('left','auto');});";
|
||||
$out.="$('#moretabs').mouseleave( function() { $('#moretabsList').css('left','-999em');});";
|
||||
@@ -762,7 +762,7 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p
|
||||
}
|
||||
|
||||
if (! $notab) $out.="\n".'<div class="tabBar">'."\n";
|
||||
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
@@ -1295,9 +1295,10 @@ function dol_print_url($url,$target='_blank',$max=32)
|
||||
* @param int $addlink 0=no link, 1=email has a html email link (+ link to create action if constant AGENDA_ADDACTIONFOREMAIL is on)
|
||||
* @param int $max Max number of characters to show
|
||||
* @param int $showinvalid Show warning if syntax email is wrong
|
||||
* @param int $widthpicto Show picto
|
||||
* @return string HTML Link
|
||||
*/
|
||||
function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid=1)
|
||||
function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid=1,$withpicto=0)
|
||||
{
|
||||
global $conf,$user,$langs;
|
||||
|
||||
@@ -1323,7 +1324,7 @@ function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid=
|
||||
{
|
||||
$type='AC_EMAIL'; $link='';
|
||||
if (! empty($conf->global->AGENDA_ADDACTIONFOREMAIL)) $link='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&actioncode='.$type.'&contactid='.$cid.'&socid='.$socid.'">'.img_object($langs->trans("AddAction"),"calendar").'</a>';
|
||||
$newemail='<table class="nobordernopadding"><tr><td>'.$newemail.' </td><td> '.$link.'</td></tr></table>';
|
||||
if ($link) $newemail='<div>'.$newemail.' '.$link.'</div>';
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1334,7 +1335,7 @@ function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid=
|
||||
$newemail.=img_warning($langs->trans("ErrorBadEMail",$email));
|
||||
}
|
||||
}
|
||||
return $newemail;
|
||||
return '<div class="nospan float" style="margin-right: 10px">'.($withpicto?img_picto($langs->trans("EMail"), 'object_email.png').' ':'').$newemail.'</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1360,18 +1361,18 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64)
|
||||
$newskype='<a href="skype:';
|
||||
$newskype.=dol_trunc($skype,$max);
|
||||
$newskype.='?call" alt="'.$langs->trans("Call").' '.$skype.'" title="'.$langs->trans("Call").' '.$skype.'">';
|
||||
$newskype.='<img src="../theme/common/skype_callbutton.png" border="0"> ';
|
||||
$newskype.='</a> <a href="skype:';
|
||||
$newskype.='<img src="../theme/common/skype_callbutton.png" border="0">';
|
||||
$newskype.='</a> <a href="skype:';
|
||||
$newskype.=dol_trunc($skype,$max);
|
||||
$newskype.='?chat" alt="'.$langs->trans("Chat").' '.$skype.'" title="'.$langs->trans("Chat").' '.$skype.'">';
|
||||
$newskype.='<img src="../theme/common/skype_chatbutton.png" border="0"> ';
|
||||
$newskype.='</a>';
|
||||
$newskype.='<img src="../theme/common/skype_chatbutton.png" border="0">';
|
||||
$newskype.='</a> ';
|
||||
|
||||
if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
$type='AC_SKYPE'; $link='';
|
||||
if (! empty($conf->global->AGENDA_ADDACTIONFORSKYPE)) $link='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&actioncode='.$type.'&contactid='.$cid.'&socid='.$socid.'">'.img_object($langs->trans("AddAction"),"calendar").'</a>';
|
||||
$newskype='<table class="nobordernopadding"><tr><td>'.$newskype.' </td><td> '.$link.'</td></tr></table>';
|
||||
$newskype='<div class="divskype nowrap">'.$newskype.($link?' '.$link:'').'</div>';
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1391,9 +1392,10 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64)
|
||||
* @param int $socid Id of third party if known
|
||||
* @param int $addlink ''=no link to create action, 'AC_TEL'=add link to clicktodial (if module enabled) and add link to create event (if conf->global->AGENDA_ADDACTIONFORPHONE set)
|
||||
* @param string $separ Separation between numbers for a better visibility example : xx.xx.xx.xx.xx
|
||||
* @param string $withpicto Show picto
|
||||
* @return string Formated phone number
|
||||
*/
|
||||
function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" ")
|
||||
function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" ",$withpicto='')
|
||||
{
|
||||
global $conf,$user,$langs,$mysoc;
|
||||
|
||||
@@ -1469,11 +1471,11 @@ function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ="
|
||||
$type='AC_TEL'; $link='';
|
||||
if ($addlink == 'AC_FAX') $type='AC_FAX';
|
||||
if (! empty($conf->global->AGENDA_ADDACTIONFORPHONE)) $link='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&actioncode='.$type.($cid?'&contactid='.$cid:'').($socid?'&socid='.$socid:'').'">'.img_object($langs->trans("AddAction"),"calendar").'</a>';
|
||||
if ($link) $newphone='<table class="nobordernopadding"><tr><td>'.$newphone.' </td><td> '.$link.'</td></tr></table>';
|
||||
if ($link) $newphone='<div>'.$newphone.' '.$link.'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
return $newphone;
|
||||
return '<div class="nospan float" style="margin-right: 10px">'.($withpicto?img_picto(($withpicto=='fax'?$langs->trans("Fax"):$langs->trans("Phone")), 'object_'.($withpicto=='fax'?'phoning_fax':'phoning').'.png').' ':'').$newphone.'</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user