diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 89d658fa01a085841ed9eae505824ca367270472..15c4627c4d738168e4989fb0d29b117155aabacf 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -348,7 +348,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t $projectstatic->id=$lines[$i]->fk_project; $projectstatic->ref=$lines[$i]->projectref; $projectstatic->public=$lines[$i]->public; - if ($lines[$i]->public || in_array($lines[$i]->fk_project,$projectsArrayId)) print $projectstatic->getNomUrl(1); + if ($lines[$i]->public || in_array($lines[$i]->fk_project,$projectsArrayId) || ! empty($user->rights->projet->all->lire)) print $projectstatic->getNomUrl(1); else print $projectstatic->getNomUrl(1,'nolink'); if ($showlineingray) print '</i>'; print "</td>"; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 094ae60c59e135dec6ce079a3fd93a2095d09939..68aa963ca8c9a4677623c71c6c4d4ad5984beed2 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -882,15 +882,17 @@ class Project extends CommonObject $result = ''; $link = ''; $linkend = ''; - $label = '<u>' . $langs->trans("ShowProject") . '</u>'; + $label=''; + if ($option != 'nolink') $label = '<u>' . $langs->trans("ShowProject") . '</u>'; if (! empty($this->ref)) - $label .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref; + $label .= ($label?'<br>':'').'<b>' . $langs->trans('Ref') . ': </b>' . $this->ref; // The space must be after the : to not being explode when showing the title in img_picto if (! empty($this->title)) - $label .= '<br><b>' . $langs->trans('Label') . ':</b> ' . $this->title; + $label .= ($label?'<br>':'').'<b>' . $langs->trans('Label') . ': </b>' . $this->title; // The space must be after the : to not being explode when showing the title in img_picto if ($moreinpopup) $label.='<br>'.$moreinpopup; $linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; - if ($option != 'nolink') { + if ($option != 'nolink') + { if (preg_match('/\.php$/',$option)) { $link = '<a href="' . dol_buildpath($option,1) . '?id=' . $this->id . $linkclose; $linkend = '</a>';