diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 53d8bb981ce..85b596ce49c 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -1152,7 +1152,7 @@ class Facture extends CommonInvoice
{
global $langs, $conf, $user, $form;
- if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
+ if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
$result='';
diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php
index f16d18c8143..65e6085a650 100644
--- a/htdocs/compta/sociales/class/chargesociales.class.php
+++ b/htdocs/compta/sociales/class/chargesociales.class.php
@@ -464,21 +464,58 @@ class ChargeSociales extends CommonObject
/**
* Return a link to the object card (with optionaly the picto)
*
- * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
- * @param int $maxlen Max length of label
- * @param int $notooltip 1=Disable tooltip
- * @return string String with link
+ * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
+ * @param int $maxlen Max length of label
+ * @param int $notooltip 1=Disable tooltip
+ * @param int $short 1=Return just URL
+ * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
+ * @return string String with link
*/
- function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0)
+ function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0, $short=0, $save_lastsearch_value=-1)
{
- global $langs;
+ global $langs, $conf, $user, $form;
+
+ if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
$result='';
- if (empty($this->ref)) $this->ref=$this->lib;
- $label = $langs->trans("ShowSocialContribution").': '.$this->ref;
+ $url = DOL_URL_ROOT.'/compta/sociales/card.php?id='.$this->id;
- $linkstart = '';
+ if ($short) return $url;
+
+ if ($option !== 'nolink')
+ {
+ // Add param to save lastsearch_values or not
+ $add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
+ if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
+ if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
+ }
+
+
+ if (empty($this->ref)) $this->ref=$this->lib;
+
+ $label = ''.$langs->trans("ShowSocialContribution").'';
+ if (! empty($this->ref))
+ $label .= '
'.$langs->trans('Ref') . ': ' . $this->ref;
+ if (! empty($this->lib))
+ $label .= '
'.$langs->trans('Label') . ': ' . $this->lib;
+ if (! empty($this->type_libelle))
+ $label .= '
'.$langs->trans('Type') . ': ' . $this->type_libelle;
+
+ $linkclose='';
+ if (empty($notooltip) && $user->rights->facture->lire)
+ {
+ if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
+ {
+ $label=$langs->trans("ShowSocialContribution");
+ $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
+ }
+ $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
+ $linkclose.=' class="classfortooltip"';
+ }
+
+ $linkstart='';
$linkend='';
$result .= $linkstart;
diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php
index d38ae348c90..8721e133c84 100644
--- a/htdocs/compta/sociales/index.php
+++ b/htdocs/compta/sociales/index.php
@@ -28,9 +28,7 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php';
-$langs->load("compta");
-$langs->load("banks");
-$langs->load("bills");
+$langs->loadLangs(array("compta","banks","bills"));
// Security check
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
@@ -189,10 +187,10 @@ if ($resql)
print '