New: add getNomUrl() method
This commit is contained in:
parent
43929ab3f9
commit
5d0a8945c1
@ -189,11 +189,11 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
if ($action == 'editdelivery_address')
|
if ($action == 'editdelivery_address')
|
||||||
{
|
{
|
||||||
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'fk_address','propal',$object->id);
|
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'fk_address','propal',$object->id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'none','propal',$object->id);
|
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'none','propal',$object->id);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -720,7 +720,7 @@ class FormOther
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show form to select addresse
|
* Show form to select address
|
||||||
*
|
*
|
||||||
* @param int $page Page
|
* @param int $page Page
|
||||||
* @param string $selected Id condition pre-selectionne
|
* @param string $selected Id condition pre-selectionne
|
||||||
|
|||||||
@ -632,7 +632,6 @@ function show_addresses($conf,$langs,$db,$object,$backtopage='')
|
|||||||
print '<td>'.$langs->trans("Country").'</td>';
|
print '<td>'.$langs->trans("Country").'</td>';
|
||||||
print '<td>'.$langs->trans("Tel").'</td>';
|
print '<td>'.$langs->trans("Tel").'</td>';
|
||||||
print '<td>'.$langs->trans("Fax").'</td>';
|
print '<td>'.$langs->trans("Fax").'</td>';
|
||||||
//print '<td>'.$langs->trans("EMail").'</td>';
|
|
||||||
print "<td> </td>";
|
print "<td> </td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
@ -647,8 +646,9 @@ function show_addresses($conf,$langs,$db,$object,$backtopage='')
|
|||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
|
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $address->label;
|
$addressstatic->id = $address->id;
|
||||||
//print $addressstatic->getNomUrl(1);
|
$addressstatic->label = $address->label;
|
||||||
|
print $addressstatic->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td>'.$address->name.'</td>';
|
print '<td>'.$address->name.'</td>';
|
||||||
@ -665,11 +665,6 @@ function show_addresses($conf,$langs,$db,$object,$backtopage='')
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print dol_print_phone($address->fax,$address->country_code,$address->id,$object->id,'AC_FAX');
|
print dol_print_phone($address->fax,$address->country_code,$address->id,$object->id,'AC_FAX');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
/*
|
|
||||||
print '<td>';
|
|
||||||
print dol_print_email($address->email,$address->id,$object->id,'AC_EMAIL');
|
|
||||||
print '</td>';
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ($user->rights->societe->creer)
|
if ($user->rights->societe->creer)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -434,6 +434,28 @@ class Address
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return name of address with link (and eventually picto)
|
||||||
|
* Use $this->id, $this->label, $this->socid
|
||||||
|
*
|
||||||
|
* @param int $withpicto Include picto with link
|
||||||
|
* @param string $option Where the link point to
|
||||||
|
* @return string String with URL
|
||||||
|
*/
|
||||||
|
function getNomUrl($withpicto=0,$option='')
|
||||||
|
{
|
||||||
|
global $langs;
|
||||||
|
|
||||||
|
$result='';
|
||||||
|
|
||||||
|
$lien = '<a href="'.DOL_URL_ROOT.'/comm/address.php?id='.$this->id.'&socid='.$this->socid.'">';
|
||||||
|
$lienfin='</a>';
|
||||||
|
|
||||||
|
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowAddress").': '.$this->label,'address').$lienfin.' ');
|
||||||
|
$result.=$lien.$this->label.$lienfin;
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Charge les informations d'ordre info dans l'objet societe
|
* Charge les informations d'ordre info dans l'objet societe
|
||||||
|
|||||||
BIN
htdocs/theme/auguria/img/object_address.png
Normal file
BIN
htdocs/theme/auguria/img/object_address.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
htdocs/theme/bureau2crea/img/object_address.png
Normal file
BIN
htdocs/theme/bureau2crea/img/object_address.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
htdocs/theme/cameleo/img/object_address.png
Normal file
BIN
htdocs/theme/cameleo/img/object_address.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
htdocs/theme/eldy/img/object_address.png
Normal file
BIN
htdocs/theme/eldy/img/object_address.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Loading…
Reference in New Issue
Block a user