220 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
222 global $conf, $langs, $hookmanager;
224 if (!empty($conf->dol_no_mouse_hover)) {
233 'objecttype' => $this->element,
236 $classfortooltip =
'classfortooltip';
239 $classfortooltip =
'classforajaxtooltip';
249 if ($option !=
'nolink') {
251 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
252 if ($save_lastsearch_value == -1 && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
253 $add_save_lastsearch_values = 1;
255 if ($add_save_lastsearch_values) {
256 $url .=
'&save_lastsearch_values=1';
261 if (empty($notooltip)) {
263 $label = $langs->trans(
"ShowPartnership");
266 $linkclose .= ($label ?
' title="' .
dol_escape_htmltag($label, 1) .
'"' :
' title="tocomplete"');
267 $linkclose .= $dataparams .
' class="' . $classfortooltip . ($morecss ?
' ' . $morecss :
'') .
'"';
269 $linkclose = ($morecss ?
' class="' . $morecss .
'"' :
'');
272 if ($option ==
'nolink') {
273 $linkstart =
'<span';
275 $linkstart =
'<a href="' . $url .
'"';
277 $linkstart .= $linkclose .
'>';
278 if ($option ==
'nolink') {
279 $linkend =
'</span>';
284 $result .= $linkstart;
286 if (empty($this->showphoto_on_popup)) {
288 $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);
292 require_once DOL_DOCUMENT_ROOT .
'/core/lib/files.lib.php';
294 list($class, $module) = explode(
'@', $this->picto);
297 $filename = $filearray[0][
'name'];
298 if (!empty($filename)) {
299 $pospoint = strpos($filearray[0][
'name'],
'.');
301 $pathtophoto = $class .
'/' . $this->
ref .
'/thumbs/' . substr($filename, 0, $pospoint) .
'_mini' . substr($filename, $pospoint);
302 if (!
getDolGlobalString(strtoupper($module .
'_' . $class) .
'_FORMATLISTPHOTOSASUSERS')) {
303 $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>';
305 $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>';
310 $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);
315 if ($withpicto != 2) {
316 $result .= $this->ref;
322 global $action, $hookmanager;
323 $hookmanager->initHooks(array(
'partnershipdao'));
324 $parameters = array(
'id' => $this->
id,
'getnomurl' => &$result);
325 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
327 $result = $hookmanager->resPrint;
329 $result .= $hookmanager->resPrint;