diff --git a/htdocs/partnership/class/partnership.class.php b/htdocs/partnership/class/partnership.class.php
index a9645efaae2..a202bdbd284 100644
--- a/htdocs/partnership/class/partnership.class.php
+++ b/htdocs/partnership/class/partnership.class.php
@@ -145,6 +145,7 @@ class Partnership extends CommonObject
public $last_check_backlink;
public $reason_decline_or_cancel;
public $fk_soc;
+ public $fk_member;
// END MODULEBUILDER PROPERTIES
@@ -938,6 +939,29 @@ class Partnership extends CommonObject
return $this->setStatusCommon($user, self::STATUS_APPROVED, $notrigger, 'PARTNERSHIP_REOPEN');
}
+ /**
+ * getTooltipContentArray
+ *
+ * @param array $params ex option, infologin
+ * @since v18
+ * @return array
+ */
+ public function getTooltipContentArray($params)
+ {
+ global $langs;
+
+ $langs->load('partnership');
+
+ $datas = [];
+ $datas['picto'] = img_picto('', $this->picto).' '.$langs->trans("Partnership").'';
+ if (isset($this->status)) {
+ $datas['picto'] .= ' '.$this->getLibStatut(5);
+ }
+ $datas['ref'] = '
'.$langs->trans('Ref').': '.$this->ref;
+
+ return $datas;
+ }
+
/**
* Return a link to the object card (with optionaly the picto)
*
@@ -957,13 +981,19 @@ class Partnership extends CommonObject
}
$result = '';
-
- $label = img_picto('', $this->picto).' '.$langs->trans("Partnership").'';
- if (isset($this->status)) {
- $label .= ' '.$this->getLibStatut(5);
+ $params = [
+ 'id' => $this->id,
+ 'objecttype' => $this->element,
+ 'option' => $option,
+ ];
+ $classfortooltip = 'classfortooltip';
+ $dataparams = '';
+ if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
+ $classfortooltip = 'classforajaxtooltip';
+ $dataparams = ' data-params='.json_encode($params);
+ // $label = $langs->trans('Loading');
}
- $label .= '
';
- $label .= ''.$langs->trans('Ref').': '.$this->ref;
+ $label = implode($this->getTooltipContentArray($params));
$url = DOL_URL_ROOT.'/partnership/partnership_card.php?id='.$this->id;
@@ -984,8 +1014,8 @@ class Partnership extends CommonObject
$label = $langs->trans("ShowPartnership");
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
}
- $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
- $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"';
+ $linkclose .= $dataparams.' title="'.dol_escape_htmltag($label, 1).'"';
+ $linkclose .= ' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"';
} else {
$linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
}
@@ -1006,7 +1036,7 @@ class Partnership extends CommonObject
if (empty($this->showphoto_on_popup)) {
if ($withpicto) {
- $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
+ $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : $dataparams.' class="'.(($withpicto != 2) ? 'paddingright ' : '').$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1);
}
} else {
if ($withpicto) {