Bette behaviour for blind people
This commit is contained in:
parent
c9e80fd148
commit
1b8234d9fe
@ -908,7 +908,7 @@ class Contact extends CommonObject
|
||||
*/
|
||||
function getNomUrl($withpicto=0,$option='',$maxlen=0,$moreparam='')
|
||||
{
|
||||
global $langs;
|
||||
global $conf, $langs;
|
||||
|
||||
$result='';
|
||||
$label = '<u>' . $langs->trans("ShowContact") . '</u>';
|
||||
@ -923,7 +923,14 @@ class Contact extends CommonObject
|
||||
$label.= '<br><b>' . $langs->trans("Phone") . ':</b> '.join(', ',$phonelist);
|
||||
$label.= '<br><b>' . $langs->trans("Address") . ':</b> '.dol_format_address($this, 1, ' ', $langs);
|
||||
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'"';
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
{
|
||||
$label=$langs->trans("ShowContact");
|
||||
$link.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||
}
|
||||
$link.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||
$link.= ' class="classfortooltip">';
|
||||
$linkend='</a>';
|
||||
|
||||
if ($option == 'xxx')
|
||||
|
||||
@ -63,8 +63,9 @@ class box_contacts extends ModeleBoxes
|
||||
if ($user->rights->societe->lire)
|
||||
{
|
||||
$sql = "SELECT sp.rowid as id, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc, sp.statut as status";
|
||||
$sql.= ", s.nom as socname";
|
||||
$sql.= ", s.code_client";
|
||||
$sql.= ", sp.address, sp.zip, sp.town, sp.phone, sp.phone_perso, sp.phone_mobile";
|
||||
$sql.= ", s.nom as socname, s.name_alias";
|
||||
$sql.= ", s.client, s.fournisseur, s.code_client, s.code_fournisseur";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON sp.fk_soc = s.rowid";
|
||||
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -93,10 +94,21 @@ class box_contacts extends ModeleBoxes
|
||||
$contactstatic->firstname=$objp->firstname;
|
||||
$contactstatic->civility_id=$objp->civility_id;
|
||||
$contactstatic->statut=$objp->status;
|
||||
$societestatic->id = $objp->fk_soc;
|
||||
$societestatic->code_client = $objp->code_client;
|
||||
$contactstatic->phone_pro = $objp->phone;
|
||||
$contactstatic->phone_perso = $objp->phone_perso;
|
||||
$contactstatic->phone_mobile = $objp->phone_mobile;
|
||||
$contactstatic->address = $objp->address;
|
||||
$contactstatic->zip = $objp->zip;
|
||||
$contactstatic->town = $objp->town;
|
||||
|
||||
$societestatic->id = $objp->fk_soc;
|
||||
$societestatic->name = $objp->socname;
|
||||
|
||||
$societestatic->name_alias = $objp->name_alias;
|
||||
$societestatic->code_client = $objp->code_client;
|
||||
$societestatic->code_fournisseur = $objp->code_fournisseur;
|
||||
$societestatic->client = $objp->client;
|
||||
$societestatic->fournisseur = $objp->fournisseur;
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $contactstatic->getNomUrl(1),
|
||||
|
||||
@ -103,7 +103,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
* Informations area
|
||||
*/
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table summary="Login info" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><th class="liste_titre" colspan="2">'.$langs->trans("Informations").'</th></tr>';
|
||||
print '<tr '.$bc[false].'>';
|
||||
print '<td class="nowrap">'.$langs->trans("User").'</td><td>'.$user->getNomUrl(0).'</td></tr>';
|
||||
@ -129,7 +129,7 @@ $langs->load("contracts");
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table summary="'.$langs->trans("DolibarrStateBoard").'" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th class="liste_titre" colspan="2">'.$langs->trans("DolibarrStateBoard").'</th>';
|
||||
print '<th class="liste_titre" align="right"> </th>';
|
||||
|
||||
@ -305,7 +305,7 @@ ListOfCustomersContacts=List of customer contacts
|
||||
ListOfSuppliersContacts=List of supplier contacts
|
||||
ListOfCompanies=List of companies
|
||||
ListOfThirdParties=List of third parties
|
||||
ShowCompany=Show company
|
||||
ShowCompany=Show thirdparty
|
||||
ShowContact=Show contact
|
||||
ContactsAllShort=All (No filter)
|
||||
ContactType=Contact type
|
||||
|
||||
@ -1824,10 +1824,13 @@ class Societe extends CommonObject
|
||||
}
|
||||
|
||||
if (! empty($this->name))
|
||||
{
|
||||
$label.= '<br><b>' . $langs->trans('Name') . ':</b> '. $this->name;
|
||||
if (! empty($this->code_client))
|
||||
if (! empty($this->name_alias)) $label.=' ('.$this->name_alias.')';
|
||||
}
|
||||
if (! empty($this->code_client) && $this->client)
|
||||
$label.= '<br><b>' . $langs->trans('CustomerCode') . ':</b> '. $this->code_client;
|
||||
if (! empty($this->code_fournisseur))
|
||||
if (! empty($this->code_fournisseur) && $this->fournisseur)
|
||||
$label.= '<br><b>' . $langs->trans('SupplierCode') . ':</b> '. $this->code_fournisseur;
|
||||
|
||||
if (! empty($this->logo))
|
||||
@ -1841,7 +1844,16 @@ class Societe extends CommonObject
|
||||
|
||||
// Add type of canvas
|
||||
$link.=(!empty($this->canvas)?'&canvas='.$this->canvas:'').'"';
|
||||
$link.=($notooltip?'':' title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip"');
|
||||
if (empty($notooltip))
|
||||
{
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
{
|
||||
$label=$langs->trans("ShowCompany");
|
||||
$link.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||
}
|
||||
$link.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||
$link.=' class="classfortooltip"';
|
||||
}
|
||||
$link.='>';
|
||||
$linkend='</a>';
|
||||
|
||||
|
||||
@ -1911,7 +1911,17 @@ class User extends CommonObject
|
||||
}
|
||||
|
||||
$link.= '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'"';
|
||||
$link.= ($notooltip?'':' title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip'.($morecss?' '.$morecss:'').'"');
|
||||
if (empty($notooltip))
|
||||
{
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
{
|
||||
$langs->load("users");
|
||||
$label=$langs->trans("ShowUser");
|
||||
$link.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||
}
|
||||
$link.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||
$link.= ' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
|
||||
}
|
||||
$link.= '>';
|
||||
$linkend='</a>';
|
||||
|
||||
@ -1927,7 +1937,9 @@ class User extends CommonObject
|
||||
}
|
||||
if (abs($withpictoimg) != 2)
|
||||
{
|
||||
$result.='<div class="inline-block valignmiddle'.($morecss?' usertext'.$morecss:'').'">'.$this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen).'</div>';
|
||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='<div class="inline-block valignmiddle'.($morecss?' usertext'.$morecss:'').'">';
|
||||
$result.=$this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen);
|
||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='</div>';
|
||||
}
|
||||
$result.=$linkend;
|
||||
//if ($withpictoimg == -1) $result.='</div>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user