Ajout lien su fiche user dans login du contact
This commit is contained in:
parent
a34cd531d8
commit
40bc7b9716
@ -776,5 +776,6 @@ class Contact
|
|||||||
$result.=$lien.$this->name.' '.$this->firstname.$lienfin;
|
$result.=$lien.$this->name.' '.$this->firstname.$lienfin;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -98,10 +98,11 @@ class User
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Charge un objet user avec toutes ces caractéristiques depuis un id ou login
|
* \brief Charge un objet user avec toutes ces caractéristiques depuis un id ou login
|
||||||
* \param login Si défini, login a utiliser pour recherche
|
* \param login Si défini, login a utiliser pour recherche
|
||||||
*/
|
* \return int <0 si ko, >0 si ok
|
||||||
|
*/
|
||||||
function fetch($login='')
|
function fetch($login='')
|
||||||
{
|
{
|
||||||
// Recupere utilisateur
|
// Recupere utilisateur
|
||||||
@ -163,7 +164,8 @@ class User
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error($this->db);
|
$this->error=$this->db->error();
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recupere parametrage global propre à l'utilisateur
|
// Recupere parametrage global propre à l'utilisateur
|
||||||
@ -187,7 +189,8 @@ class User
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error($this->db);
|
$this->error=$this->db->error();
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recupere parametrage propre à la page et à l'utilisateur
|
// Recupere parametrage propre à la page et à l'utilisateur
|
||||||
@ -217,9 +220,12 @@ class User
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error($this->db);
|
$this->error=$this->db->error();
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1084,6 +1090,32 @@ class User
|
|||||||
$result.=$lien.$this->nom.' '.$this->prenom.$lienfin;
|
$result.=$lien.$this->nom.' '.$this->prenom.$lienfin;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Renvoie login clicable (avec eventuellement le picto)
|
||||||
|
* \param withpicto Inclut le picto dans le lien
|
||||||
|
* \param option Sur quoi pointe le lien
|
||||||
|
* \return string Chaine avec URL
|
||||||
|
*/
|
||||||
|
function getLoginUrl($withpicto=0,$option='')
|
||||||
|
{
|
||||||
|
global $langs;
|
||||||
|
|
||||||
|
$result='';
|
||||||
|
|
||||||
|
$lien = '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$this->id.'">';
|
||||||
|
$lienfin='</a>';
|
||||||
|
|
||||||
|
if ($option == 'xxx')
|
||||||
|
{
|
||||||
|
$lien = '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$this->id.'">';
|
||||||
|
$lienfin='</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowUser"),'user').$lienfin.' ');
|
||||||
|
$result.=$lien.$this->login.$lienfin;
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1196,7 +1196,7 @@ else
|
|||||||
if ($conf->fckeditor->enabled)
|
if ($conf->fckeditor->enabled)
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('note','',180,'dolibarr_notes','',false);
|
$doleditor=new DolEditor('note',$fuser->note,180,'dolibarr_notes','',false);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user