224 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
226 global $conf, $langs, $hookmanager;
228 if (!empty($conf->dol_no_mouse_hover)) {
237 'objecttype' => $this->element,
240 $classfortooltip =
'classfortooltip';
243 $classfortooltip =
'classforajaxtooltip';
253 if ($option !=
'nolink') {
255 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
256 if ($save_lastsearch_value == -1 && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
257 $add_save_lastsearch_values = 1;
259 if ($add_save_lastsearch_values) {
260 $url .=
'&save_lastsearch_values=1';
265 if (empty($notooltip)) {
267 $label = $langs->trans(
"ShowPartnership");
270 $linkclose .= ($label ?
' title="' .
dol_escape_htmltag($label, 1) .
'"' :
' title="tocomplete"');
271 $linkclose .= $dataparams .
' class="' . $classfortooltip . ($morecss ?
' ' . $morecss :
'') .
'"';
273 $linkclose = ($morecss ?
' class="' . $morecss .
'"' :
'');
276 if ($option ==
'nolink') {
277 $linkstart =
'<span';
279 $linkstart =
'<a href="' . $url .
'"';
281 $linkstart .= $linkclose .
'>';
282 if ($option ==
'nolink') {
283 $linkend =
'</span>';
288 $result .= $linkstart;
290 if (empty($this->showphoto_on_popup)) {
292 $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);
296 require_once DOL_DOCUMENT_ROOT .
'/core/lib/files.lib.php';
298 list($class, $module) = explode(
'@', $this->picto);
301 $filename = $filearray[0][
'name'];
302 if (!empty($filename)) {
303 $pospoint = strpos($filearray[0][
'name'],
'.');
305 $pathtophoto = $class .
'/' . $this->
ref .
'/thumbs/' . substr($filename, 0, $pospoint) .
'_mini' . substr($filename, $pospoint);
306 if (!
getDolGlobalString(strtoupper($module .
'_' . $class) .
'_FORMATLISTPHOTOSASUSERS')) {
307 $result .=
'<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo' . $module .
'" alt="No photo" border="0" src="' . DOL_URL_ROOT .
'/viewimage.php?modulepart=' . $module .
'&entity=' . $conf->entity .
'&file=' . urlencode($pathtophoto) .
'"></div></div>';
309 $result .=
'<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="' . DOL_URL_ROOT .
'/viewimage.php?modulepart=' . $module .
'&entity=' . $conf->entity .
'&file=' . urlencode($pathtophoto) .
'"></div>';
314 $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);
319 if ($withpicto != 2) {
320 $result .= $this->ref;
326 global $action, $hookmanager;
327 $hookmanager->initHooks(array(
'partnershipdao'));
328 $parameters = array(
'id' => $this->
id,
'getnomurl' => &$result);
329 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
331 $result = $hookmanager->resPrint;
333 $result .= $hookmanager->resPrint;