Skip to content
Snippets Groups Projects
Commit d92604f6 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

FIX Link of project must be cickable if user has permission to read all

projects
FIX Missing information into the alt of project picto
parent 53d86e16
No related branches found
No related tags found
No related merge requests found
......@@ -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>";
......
......@@ -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>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment